/*** FILTERS ***/
.dpln-toolbar { 
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex-direction: column;
	padding: 15px;
	border-radius: 12px;
	background: rgba(255,255,255,0.4);
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	margin-bottom: 10px;
	position: relative;
}
.toolbar-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.toolbar-row .dpln-label { color: #3b3b3b; }
/* Search */
.search-wrap {
	flex: 1;
	position: relative;
}
#dplnSearch {
	width: 100%;
	padding: 8px 10px 8px 12px;
	border: 1px solid #d4b87a;
	border-radius: 8px;
	font-size: 14px;
	background: #fdf6e8;
	box-sizing: border-box;
}
#dplnSearch:focus { outline: none; border-color: #b8923a; }
/* Special filters */
.dpln-group {
	display: flex;
	border: 1px solid #8a7666;
	border-radius: 8px;
	overflow: hidden;
}
.dpln-group button {
	border: none;
	background: transparent;
	padding: 7px 12px;
	font-size: 13px;
	cursor: pointer;
	color: #3b3b3b;
	white-space: nowrap;
}
.dpln-group button + button { border-left: 1px solid #d4b87a; }
.dpln-group button.dpln-active { background: #a4805f; color: #fff; }
.dpln-group button:hover:not(.dpln-active) { background: #f5e8c4; }
.dpln-filter {
	border: 1px solid #8a7666;
	border-radius: 8px;
	background: transparent;
	padding: 7px 12px;
	font-size: 13px;
	cursor: pointer;
	color: #3b3b3b;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.dpln-filter.dpln-active {
	background: #7a5c3a;
	color: #fde9b0;
	border-color: #7a5c3a;
}
.dpln-filter:hover:not(.dpln-active) { background: #f5e8c4; }
.dpln-select {
	padding: 7px 10px;
	border: 1px solid #8a7666;
	border-radius: 8px;
	background: transparent;
	font-size: 13px;
	color: #3b3b3b;
	cursor: pointer;
}
.dpln-select:focus { outline: none; border-color: #b8923a; }
.quest-level-input-wrap {
	display: flex;
	background: rgba(164, 128, 95, 0.16);
	padding: 2px 5px;
	border-radius: 8px;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #3b3b3b;
}
.quest-level-input-wrap label { white-space: nowrap; }
#questLevelInput {
	width: 70px;
	padding: 6px 8px;
	border: 1px solid #d4b87a;
	border-radius: 8px;
	font-size: 13px;
	background: #fdf6e8;
	color: #333;
}
#questLevelInput:focus { outline: none; border-color: #b8923a; }
#questLevelInput::-webkit-inner-spin-button, #questLevelInput::-webkit-outer-spin-button { -webkit-appearance: none; }
#questLevelInput { -moz-appearance: textfield; }
.quest-mode-btns {
	display: flex;
	border: 1px solid #8a7666;
	border-radius: 8px;
	overflow: visible;
}
.quest-mode-btns button {
	border: none;
	background: transparent;
	padding: 6px 10px;
	font-size: 12px;
	cursor: pointer;
	color: #3b3b3b;
	white-space: nowrap;
	position: relative;
}
.quest-mode-btns button + button { border-left: 1px solid #d4b87a; }
.quest-mode-btns button.dpln-active { background: #a4805f; color: #fff; }
.quest-mode-btns button:hover:not(.dpln-active) { background: #f5e8c4; }
.quest-mode-btns button:first-child {
	border-radius: 7px 0 0 7px;
}
.quest-mode-btns button:last-child {
	border-radius: 0 7px 7px 0;
}
/* Actives bonuses */
.btn-stat {
	display: flex;
	align-items: center;
	gap: 5px;
	border: 1px solid #8a7666;
	border-radius: 8px;
	background: transparent;
	padding: 5px 10px;
	font-size: 12px;
	cursor: pointer;
	color: #3b3b3b;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-stat img { width: 18px; height: 18px; }
.btn-stat.dpln-active {
	background: #7a5c3a;
	color: #fde9b0;
	border-color: #7a5c3a;
	font-weight: bold;
}
.btn-stat:hover:not(.dpln-active) { background: #f5e8c4; }
/* Reset btn */
.btn-reset-dpln {
	position: absolute;
	bottom: 10px;
	right: 10px;
	border: 1px solid #da4444;
	border-radius: 8px;
	background: transparent;
	padding: 5px 10px;
	font-size: 12px;
	cursor: pointer;
	color: #da4444;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.btn-reset-dpln:hover { background: #da4444; color: #fff; }
/* Sorting */
.dpln-sorting {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	flex-direction: column;
	align-items: flex-end;
}
.dpln-sorting-inner {
	display: flex;
	align-items: center;
	gap: 8px;
}
.dpln-sorting span.dpln-label {
	font-size: 12px;
	color: #3b3b3b;
}
.dpln-result {
	font-size: 12px;
	color: #3b3b3b;
	white-space: nowrap;
}
/* Filters tooltips */
.toolbar-row [data-tooltip] {
	position: relative;
}
.toolbar-row [data-tooltip]::after {
	content: attr(data-tooltip);
	display: none;
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #3b3019;
	color: #fde9b0;
	font-size: 13px;
	padding: 5px 9px;
	border-radius: 6px;
	white-space: nowrap;
	width: max-content;
	max-width: 220px;
	white-space: normal;
	text-align: center;
	line-height: 18px;
	z-index: 100;
	pointer-events: none;
}
.toolbar-row [data-tooltip]:hover::after { display: block; }
/*** CARDS ***/
.dofus-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 10px 0;
}
.dofus-card {
	background: #ecd1a3;
	border: 1px solid #dabc8b;
	border-radius: 12px;
	padding: 6px 8px;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex: 1 1 240px;
	position: relative;
	transition: border-color 0.15s, background 0.15s;
	user-select: text;
}
.dofus-card:hover {
	border-color: #c9a050;
	background: #dabc8b;
}
.card-level {
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: 11px;
	font-weight: bold;
	background: #f5e8c4;
	color: #3b3b3b;
	border: 1px solid #e2c98a;
	border-radius: 6px;
	padding: 2px 8px;
	line-height: 14px;
}
.card-obtain-icons {
	position: absolute;
	top: 38px;
	right: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.obtain-icon {
	position: relative;
	font-size: 14px;
	cursor: default;
	line-height: 13px;
}
.obtain-icon .dpln-tooltip {
	display: none;
	position: absolute;
	right: 0;
	top: 120%;
	background: #3b3019;
	color: #fde9b0;
	font-size: 13px;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
	z-index: 10;
	pointer-events: none;
}
.obtain-icon:hover .dpln-tooltip { display: block; }
.card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	padding-right: 64px;
}
.card-header img { width: 70px; height: 70px; flex-shrink: 0; }
.card-header .card-title { font-size: 18px; color: #3b3b3b; font-weight: bold; line-height: 20px; }
.dofus-bonus { font-size: 14px; }
.table-view .dofus-bonus { font-size: 16px; }
.dofus-bonus-label {
	display: inline-block;
	font-size: 11px;
	font-weight: bold;
	padding: 2px 8px;
	border-radius: 10px;
	margin: 6px 0 4px;
	line-height: normal;
}
.label-actif { background: #d4edda; color: #1a5c2a; }
.label-passif { background: #d0e4f7; color: #0d4080; }
.dofus-bonus-actif-items li { font-weight: bold; }
.dofus-bonus-actif-items {
	list-style: none;
	padding-left: 4px;
	color: #3d3d3d;
	line-height: 22px;
}
.dofus-bonus-actif-items li {
	display: flex;
	align-items: center;
	gap: 6px;
}
.dofus-bonus-actif-items li img.stat-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.dofus-bonus ul { padding-left: 16px; color: #3b3b3b; line-height: 22px; }
.dofus-bonus div:nth-child(2) { margin-top: 5px; }
.card-quest-level {
	display: none;
	position: absolute;
	bottom: 12px;
	right: 20px;
	font-size: 11px;
	font-weight: bold;
	color: #414141;
	padding: 2px 8px;
	white-space: nowrap;
	line-height: 14px;
}
.dofus-card.show-quest-level {
	padding-bottom: 30px;
}
.dofus-card.show-quest-level .card-quest-level {
	display: inline-block;
}
.t-quest-level {
	display: none;
	font-size: 11px;
	font-weight: bold;
	color: #3b3b3b;
}
.show-quest-level-table .t-quest-level { display: block; }
.card-chevron {
	position: absolute;
	bottom: 10px;
	right: 14px;
	font-size: 30px;
	color: #3b3b3b;
	line-height: 30px;
	transition: color 0.15s, transform 0.15s;
}
.dofus-card:hover .card-chevron { color: #1a1a1a; transform: translateX(3px); }
/*** TABLE ***/
.table-view {
	display: none;
	border: 1px solid #e2c98a;
	border-radius: 12px;
	overflow: hidden;
	background: #ecd1a3;
	margin: 10px 0;
}
.table-view.dpln-visible { display: block; }
.dpln-table-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 44px 12px 16px;
	border-bottom: 1px solid #dabc8b;
	text-decoration: none;
	color: inherit;
	position: relative;
	transition: background 0.1s;
}
.dpln-table-row:last-child { border-bottom: none; }
.dpln-table-row:hover { background: #dabc8b; }
.t-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 210px;
	flex-shrink: 0;
}
.t-left img { width: 80px; height: 80px; }
.t-name { font-size: 18px; color: #3b3b3b; font-weight: bold; }
.t-level { font-size: 11px; color: #636363; margin-top: 2px; }
.t-obtain-icons { display: flex; gap: 3px; margin-top: 3px; }
.dpln-table-row .obtain-icon .dpln-tooltip{
	right: auto;
	left: 0;
}
.row-chevron {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 30px;
	color: #414141;
	transition: color 0.15s, transform 0.15s;
}
.dpln-table-row:hover .row-chevron { color: #3b3b3b; transform: translateY(-50%) translateX(2px); }
/*** DOFUS PRIMORDIAUX ***/
.dofus-card.primordial-emeraude {
	background: linear-gradient(135deg, #c8e8d0 0%, #40a860 50%, #60c878 100%);
	border-color: #308050;
}
.dofus-card.primordial-emeraude:hover {
	background: linear-gradient(135deg, #b0d8b8 0%, #309050 50%, #50b868 100%);
	border-color: #206040;
}
.dofus-card.primordial-emeraude .card-level {
	background: #3ead60;
	border-color: #68cb7f;
	color: #3b3b3b;
}
.dpln-table-row.primordial-emeraude {
	background: linear-gradient(90deg, #c8e8d0, #50b868);
	border-bottom-color: #308050;
}
.dpln-table-row.primordial-emeraude:hover { background: linear-gradient(90deg, #b0d8b8, #309050); }
.dofus-card.primordial-pourpre {
	background: linear-gradient(135deg, #e2a19c 0%, #d77a52 50%, #e3b06e 100%);
	border-color: #b45b55;
}
.dofus-card.primordial-pourpre:hover {
	background: linear-gradient(135deg, #d78c86 0%, #cb6d47 50%, #d69a56 100%);
	border-color: #9e4c46;
}
.dofus-card.primordial-pourpre .card-level {
	background: #d77a52;
	border-color: #b45b55;
	color: #3b3b3b;
}
.dpln-table-row.primordial-pourpre {
	background: linear-gradient( 90deg, #e3b06e , #d8746d);
	border-bottom-color: #b45b55;
}
.dpln-table-row.primordial-pourpre:hover { background: linear-gradient(90deg, #d69a56, #c85c55); }
.dpln-table-row.primordial-pourpre .t-level{ color: #3b3b3b; }
.dofus-card.primordial-turquoise {
	background: linear-gradient(135deg, #c0e8e8 0%, #30a8b8 50%, #50c0d0 100%);
	border-color: #2080a0;
}
.dofus-card.primordial-turquoise:hover {
	background: linear-gradient(135deg, #a8d8d8 0%, #2090a0 50%, #40b0c0 100%);
	border-color: #106080;
}
.dofus-card.primordial-turquoise .card-level {
	background: #30a8b8;
	border-color: #50c0d0;
	color: #3b3b3b;
}
.dpln-table-row.primordial-turquoise {
	background: linear-gradient(90deg, #c0e8e8, #40b0c0);
	border-bottom-color: #2080a0;
}
.dpln-table-row.primordial-turquoise:hover { background: linear-gradient(90deg, #a8d8d8, #2090a0); }
.dofus-card.primordial-ocre {
	background: linear-gradient(135deg, #f5e0a0 0%, #e8c46a 50%, #f0d080 100%);
	border-color: #c8a030;
}
.dofus-card.primordial-ocre:hover {
	background: linear-gradient(135deg, #edd580 0%, #d4a820 50%, #e8c840 100%);
	border-color: #a07020;
}
.dofus-card.primordial-ocre .card-level {
	background: #e8c46a;
	border-color: #f0d080;
	color: #3b3b3b;
}
.dpln-table-row.primordial-ocre {
	background: linear-gradient(90deg, #f5e0a0, #e8c46a);
	border-bottom-color: #c8a030;
}
.dpln-table-row.primordial-ocre:hover { background: linear-gradient(90deg, #edd580, #d4a820); }
.dofus-card.primordial-ivoire {
	background: linear-gradient(135deg, #fdfaf0 0%, #f0e8c8 50%, #f8f0e0 100%);
	border-color: #d8d0a0;
}
.dofus-card.primordial-ivoire:hover {
	background: linear-gradient(135deg, #f5f0e0 0%, #e8e0b8 50%, #f0e8d0 100%);
	border-color: #c0b880;
}
.dofus-card.primordial-ivoire .card-level {
	background: #f0e8c8;
	border-color: #f8f0e0;
	color: #3b3b3b;
}
.dpln-table-row.primordial-ivoire {
	background: linear-gradient(90deg, #fdfaf0, #f0e8c8);
	border-bottom-color: #d8d0a0;
}
.dpln-table-row.primordial-ivoire:hover { background: linear-gradient(90deg, #f5f0e0, #e8e0b8); }
.dofus-card.primordial-ebene {
	background: linear-gradient(135deg, #5a4a3a 0%, #2a1e14 50%, #3e2e20 100%);
	border-color: #1a100a;
	color: #e8d8c0;
}
.dofus-card.primordial-ebene:hover {
	background: linear-gradient(135deg, #6a5a4a 0%, #3a2e22 50%, #4e3e2e 100%);
	border-color: #2a1a10;
}
.dofus-card.primordial-ebene .card-level {
	background: #3e2e20;
	border-color: #5a4030;
	color: #c8b090;
}
.dofus-card.primordial-ebene .card-title, .dofus-card.primordial-ebene .t-name { color: #f0e0c8 !important; }
.dofus-card.primordial-ebene .dofus-bonus ul, .dofus-card.primordial-ebene .card-quest-level { color: #d0c0a0; }
.dofus-card.primordial-ebene .card-chevron, .dofus-card.primordial-ebene .card-level { color: #c8b090; }
.dofus-card.primordial-ebene:hover .card-chevron { color: #f0e0c8; }
.dpln-table-row.primordial-ebene {
	background: linear-gradient(90deg, #5a4a3a, #2a1e14);
	border-bottom-color: #1a100a;
	color: #e8d8c0;
}	
.dpln-table-row.primordial-ebene:hover { background: linear-gradient(90deg, #6a5a4a, #3a2e22); }
.dpln-table-row.primordial-ebene .dofus-bonus ul { color: #d0c0a0; }
.dpln-table-row.primordial-ebene .t-level, .dpln-table-row.primordial-ebene .row-chevron, .dpln-table-row.primordial-ebene .t-quest-level { color: #e8d8c0; }
.dpln-table-row.primordial-ebene .t-name, .dpln-table-row.primordial-ebene:hover .row-chevron { color: #f0e0c8; }
/*** NOTHING ***/
.empty-state {
	display: none;
	text-align: center;
	padding: 40px;
	background: #ecd1a3;
	border-radius: 10px;
	color: #3b3b3b;
	font-size: 16px;
}
@media (max-width: 450px) {
	#statFilters {
		max-height: 100px;
		overflow-y: auto;
		flex-wrap: wrap;
	}
	.btn-stat {
		font-size: 10px !important;
	}
	.btn-stat img {
		width: 12px !important;
		height: 12px !important;
	}
	.dpln-table-row {
		flex-direction: column;
	}
}