input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.logo-transition { transition: opacity 0.3s ease-in-out; }

/* Rendu net des sprites pixel-art (monstres) : evite le flou qui les fait paraitre petits */
.box-card-sprite, .needs-card-sprite, .trade-monster-head img, .trade-row-label img, .ts-monster-info img,
.creature-card img, .trade-sheet-table img {
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}
/* Petites icones PNG : rendu net sans lissage excessif */
img[src*="/assets/icon/"] { image-rendering: -webkit-optimize-contrast; }

/* GRILLE RESPONSIVE : autant de cartes que possible a une taille lisible, sans limite fixe de colonnes */
.force-grid-6 { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
.step-card-grid { display: grid; gap: 0.5rem; }
.needs-card-sprite { width: clamp(4.5rem, 42vw, 7rem); height: clamp(4.5rem, 42vw, 7rem); margin-top: 1.5rem; }
.character-table-wrap { max-height: 70vh; overflow: auto; }
.character-table-top-scroll { overflow-x: auto; overflow-y: hidden; height: 14px; margin: 0 0 0.35rem; }
.character-table-top-scroll > div { height: 1px; }
.character-progress-table { border-collapse: separate; border-spacing: 0; }
.character-progress-table thead th { position: sticky; top: 0; z-index: 20; }
.character-progress-table .character-monster-cell { position: sticky; left: 0; }
.character-progress-table .character-monster-header { z-index: 30; }
.needs-toolbar-layout { flex-direction: column; }
.collection-stat-detail, .collection-stat-mob { display: none; }
@media (min-width: 640px) { .collection-stat-detail { display: inline-flex; } }
@media (min-width: 1024px) { .collection-stat-mob { display: inline-flex; } }
@media (min-width: 768px) { .needs-toolbar-layout { flex-direction: row; align-items: center; justify-content: space-between; } }

.force-grid-9 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; }
@media (min-width: 640px) { .force-grid-9 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .force-grid-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } }

/* Les cartes adaptent leur contenu a leur propre largeur, pas seulement au viewport. */
.creature-box-card { container-type: inline-size; }
.creature-box-card .box-card-sprite { width: clamp(3.5rem, 52cqw, 9rem); height: clamp(3.5rem, 52cqw, 9rem); }
.creature-box-card .box-card-id { font-size: clamp(0.625rem, 6cqw, 0.875rem); }
.creature-box-card .box-card-local-id { font-size: clamp(0.5rem, 4.5cqw, 0.675rem); }
.creature-box-card .box-card-gen-badge { color: #fde047; }
.creature-box-card .box-card-shiny-icon { width: clamp(1.15rem, 12cqw, 1.8rem); height: clamp(1.15rem, 12cqw, 1.8rem); }
.creature-box-card .box-card-name { font-size: clamp(0.6rem, 6cqw, 0.875rem); }
.creature-box-card .box-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.15; overflow: hidden; word-break: break-word; }

@container (min-width: 10rem) {
	.creature-box-card .box-card-sprite { width: min(58cqw, 10rem); height: min(58cqw, 10rem); }
}

.header-main-nav { pointer-events: none; }
.header-main-nav button { pointer-events: auto; }

.dashboard-panel {
	position: relative;
	isolation: isolate;
	display: grid;
	gap: 1rem;
	overflow: hidden;
	border: 1px solid rgba(21, 128, 61, 0.12);
	border-radius: 1rem;
	background:
		radial-gradient(circle at top left, rgba(227, 0, 15, 0.12), transparent 22rem),
		linear-gradient(135deg, #ffffff 0%, #f7fff9 48%, #fff8ec 100%);
	box-shadow: 0 20px 55px rgba(21, 128, 61, 0.12);
	padding: clamp(1rem, 2vw, 1.5rem);
}
.dark .dashboard-panel {
	background:
		radial-gradient(circle at top left, rgba(227, 0, 15, 0.16), transparent 22rem),
		linear-gradient(135deg, #1e1e1e 0%, #142018 55%, #241c15 100%);
	border-color: rgba(255, 255, 255, 0.08);
}
.dashboard-heading { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0; pointer-events: none; }
.dashboard-eyebrow { display: inline-flex; margin-bottom: 0.25rem; color: #15803d; font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.dashboard-heading h2 { font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 950; color: #17231b; line-height: 1.05; }
.dark .dashboard-heading h2 { color: #f8fafc; }
.dashboard-heading p { color: #647064; font-size: 0.85rem; font-weight: 700; }
.dark .dashboard-heading p { color: #a7b4aa; }
.dashboard-champion { display: flex; align-items: center; gap: 0.75rem; max-width: 24rem; border: 1px solid rgba(21, 128, 61, 0.16); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.74); padding: 0.75rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.dark .dashboard-champion { background: rgba(18, 18, 18, 0.45); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-champion img, .dashboard-server-name img { width: 2.1rem; height: 2.1rem; border-radius: 999px; object-fit: cover; background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); }
.dashboard-champion div div { color: #15803d; font-size: 0.65rem; font-weight: 900; text-transform: uppercase; }
.dashboard-champion strong { display: block; color: #111827; font-size: 1rem; font-weight: 950; }
.dark .dashboard-champion strong { color: #fff; }
.dashboard-champion span { color: #6b7280; font-size: 0.72rem; font-weight: 800; }
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.dashboard-stat { display: flex; align-items: flex-start; gap: 0.75rem; border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.82); padding: 0.9rem; box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06); }
.dark .dashboard-stat { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-stat-icon { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: 0.75rem; background: var(--stat-bg); color: var(--stat); flex: 0 0 auto; }
.dashboard-stat-value { color: var(--stat); font-size: 1.45rem; line-height: 1; font-weight: 950; }
.dashboard-stat-label { color: #1f2937; font-size: 0.76rem; font-weight: 950; }
.dark .dashboard-stat-label { color: #f3f4f6; }
.dashboard-stat-caption { color: #6b7280; font-size: 0.66rem; font-weight: 800; line-height: 1.15; margin-top: 0.2rem; }
.dashboard-blue { --stat: #1d4ed8; --stat-bg: #dbeafe; }
.dashboard-green { --stat: #15803d; --stat-bg: #dcfce7; }
.dashboard-amber { --stat: #b45309; --stat-bg: #fef3c7; }
.dashboard-rose { --stat: #be123c; --stat-bg: #ffe4e6; }
.dashboard-cyan { --stat: #0e7490; --stat-bg: #cffafe; }
.dashboard-insights { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(13rem, 0.7fr); gap: 0.75rem; margin-bottom: 1rem; }
.dashboard-chart-card { border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.72); padding: 0.9rem; }
.dark .dashboard-chart-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-section-title { display: flex; align-items: center; gap: 0.4rem; color: #243328; font-size: 0.78rem; font-weight: 950; margin-bottom: 0.75rem; text-transform: uppercase; }
.dark .dashboard-section-title { color: #e5e7eb; }
.dashboard-flow { display: flex; align-items: flex-end; gap: 0.35rem; min-height: 9rem; }
.dashboard-flow-bar { display: flex; flex: 1; min-width: 0; height: 8rem; flex-direction: column; justify-content: flex-end; gap: 0.35rem; }
.dashboard-flow-bar span { display: block; min-height: 0.5rem; border-radius: 0.45rem 0.45rem 0.2rem 0.2rem; background: linear-gradient(180deg, #ef4444, #15803d); box-shadow: 0 8px 16px rgba(21, 128, 61, 0.18); }
.dashboard-flow-bar small { color: #7a837c; font-size: 0.58rem; font-weight: 900; text-align: center; }
.dashboard-radial-card { display: grid; align-content: start; }
.dashboard-radial { width: min(11rem, 100%); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; text-align: center; border-radius: 999px; background: conic-gradient(#15803d calc(var(--value) * 1%), #fee2e2 0); position: relative; }
.dashboard-radial::before { content: ''; position: absolute; inset: 0.85rem; border-radius: inherit; background: #fff; }
.dark .dashboard-radial::before { background: #1e1e1e; }
.dashboard-radial strong, .dashboard-radial span { position: relative; z-index: 1; display: block; }
.dashboard-radial strong { color: #15803d; font-size: 1.8rem; line-height: 1; font-weight: 950; }
.dashboard-radial span { max-width: 7rem; color: #667066; font-size: 0.68rem; font-weight: 850; line-height: 1.15; }
.dashboard-server-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.7rem; }
.dashboard-server-row { display: grid; gap: 0.8rem; border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 1rem; background: rgba(255, 255, 255, 0.78); padding: 0.85rem; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045); }
.dark .dashboard-server-row { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-server-name { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.dashboard-server-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #111827; font-size: 0.85rem; font-weight: 950; }
.dark .dashboard-server-name strong { color: #f8fafc; }
.dashboard-server-name small { display: block; color: #64748b; font-size: 0.65rem; font-weight: 850; line-height: 1.1; }
.dashboard-server-value { color: #6b7280; font-size: 0.68rem; font-weight: 850; margin-top: 0.15rem; }
.dashboard-server-bar { display: none; }
.dashboard-server-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.dashboard-server-metrics span { border-radius: 0.75rem; background: rgba(21, 128, 61, 0.075); color: #64748b; font-size: 0.62rem; font-weight: 900; line-height: 1.1; padding: 0.55rem; }
.dashboard-server-metrics b { display: block; color: #15803d; font-size: 0.95rem; line-height: 1; font-weight: 950; margin-bottom: 0.15rem; }
.dashboard-loading, .dashboard-empty { border: 1px dashed rgba(107, 114, 128, 0.3); border-radius: 0.9rem; color: #6b7280; font-size: 0.82rem; font-weight: 850; padding: 1rem; text-align: center; }
.trade-sheet-page { min-height: 100vh; padding: .75rem; background: #ecfdf5; }
.trade-sheet-header, .trade-sheet-panel { width: 100%; }
.trade-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.trade-back { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: #15803d; color: #fff; font-size: 0.75rem; font-weight: 800; }
.trade-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; color: #4b5563; font-size: 0.75rem; font-weight: 800; }
.trade-context span, .trade-context strong { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.5rem; border-radius: 8px; background: #fff; border: 1px solid #d1d5db; }
.trade-context img { width: 1.25rem; height: 1.25rem; object-fit: contain; border-radius: 9999px; }
.trade-sheet-panel { background: #fff; border: 1px solid #d1d5db; border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .06); overflow: hidden; }
.trade-sheet-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid #e5e7eb; }
.trade-sheet-title h1 { color: #166534; font-size: 1.1rem; font-weight: 900; }
.trade-sheet-title p { margin-top: .2rem; color: #6b7280; font-size: .75rem; font-weight: 700; }
.trade-sheet-title > span { padding: .35rem .5rem; border-radius: 9999px; background: #ecfdf5; color: #15803d; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.trade-sheet-scroll { overflow: auto; max-height: calc(100vh - 180px); }
.trade-sheet-table { border-collapse: separate; border-spacing: 0; min-width: max-content; width: 100%; font-size: .72rem; }
.trade-sheet-table th, .trade-sheet-table td { min-width: 116px; padding: .55rem; text-align: center; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.trade-sheet-table thead th { position: sticky; top: 0; z-index: 2; background: #f0fdf4; color: #166534; }
.trade-sheet-table tbody th, .trade-row-label { position: sticky; left: 0; z-index: 3; min-width: 145px; background: #f9fafb; color: #374151; text-align: left; font-weight: 900; }
.trade-sheet-table thead .trade-row-label { z-index: 4; background: #dcfce7; }
.trade-monster-head { display: grid; justify-items: center; gap: .3rem; max-width: 105px; margin: auto; }
.trade-monster-head img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
.trade-monster-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 105px; }
.trade-sheet-table small { display: block; margin-top: .15rem; color: #9ca3af; font-size: .6rem; }
.trade-stock-row td { color: #15803d; font-size: .9rem; font-weight: 900; }
.trade-sheet-table input { width: 70px; padding: .35rem; border: 1px solid #d1d5db; border-radius: 6px; text-align: center; font-weight: 800; outline-color: #15803d; }
.trade-total-row { background: #ecfdf5; color: #166534; font-weight: 900; }
.trade-sheet-empty { padding: 2rem; text-align: center; color: #6b7280; font-size: .85rem; font-weight: 700; }
/* Tableur partage : code couleur des saisies, partage, filtres, etapes, troc, facture */
.ts-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 1rem; border-bottom: 1px solid #e5e7eb; background: #fff; font-size: .68rem; font-weight: 800; color: #4b5563; }
.ts-legend-chip { padding: .12rem .6rem; border-radius: 9999px; border: 2px solid transparent; }
.ts-legend-me { border-color: #15803d; color: #15803d; background: #f0fdf4; }
.ts-legend-other { border-color: #ea580c; color: #ea580c; background: #fff7ed; }
.ts-by-me { border-color: #15803d !important; background: #f0fdf4 !important; }
.ts-by-other { border-color: #ea580c !important; background: #fff7ed !important; }
input[type="checkbox"].ts-by-me { accent-color: #15803d; }
input[type="checkbox"].ts-by-other { accent-color: #ea580c; }
.ts-share { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-bottom: 1px solid #e5e7eb; background: #fff; }
.ts-share input { flex: 1; min-width: 0; padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #f9fafb; color: #4b5563; font-size: .68rem; font-weight: 700; }
.ts-share button { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .7rem; border-radius: 8px; background: #15803d; color: #fff; font-size: .68rem; font-weight: 900; white-space: nowrap; cursor: pointer; }
.ts-share button.ts-copied { background: #0369a1; }
.ts-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.ts-filter-bar select { padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font-size: .7rem; font-weight: 800; }
.ts-filter-bar label { display: inline-flex; align-items: center; gap: .3rem; color: #374151; font-size: .7rem; font-weight: 800; cursor: pointer; }
.ts-filter-btn { padding: .35rem .6rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #b45309; font-size: .68rem; font-weight: 900; cursor: pointer; }
.ts-filter-btn:hover { border-color: #b45309; }
.ts-step-row td { background: #f0fdf4; color: #166534; text-align: left; font-weight: 900; }
.ts-step-row small { display: inline; margin-left: .5rem; color: #65a30d; font-size: .6rem; }
.ts-stock { color: #15803d; font-size: .9rem; font-weight: 900; }
.ts-need { font-weight: 900; }
.ts-need-open { color: #E3000F; }
.ts-need-ok { color: #9ca3af; }
.ts-dir-btn { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; }
.ts-dir-btn:hover { border-color: #15803d; }
.ts-dir-static { display: inline-flex; align-items: center; gap: .25rem; color: #374151; }
.ts-troc-badge { display: inline-block; padding: .15rem .6rem; border-radius: 9999px; background: #ede9fe; color: #6d28d9; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.ts-free-hint { display: block; margin-top: .15rem; color: #d97706; font-size: .58rem; font-weight: 800; }
.ts-troc-pending { outline: 2px dashed #d97706; outline-offset: 1px; }
.ts-exclude-btn { display: inline-flex; padding: .3rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #6b7280; cursor: pointer; }
.ts-exclude-btn:hover { border-color: #E3000F; color: #E3000F; }
.ts-disabled th, .ts-disabled td { opacity: .45; }
.ts-disabled th img { filter: grayscale(1); }
.trade-total-cell { color: #166534; font-weight: 900; }
.ts-user-chip { display: inline-flex; align-items: center; gap: .3rem; }
.ts-user-chip em { padding: .05rem .4rem; border-radius: 9999px; background: #15803d; color: #fff; font-size: .55rem; font-style: normal; text-transform: uppercase; }
.ts-invoice { padding: 1rem; border-top: 2px solid #d1d5db; background: #f9fafb; }
.ts-invoice-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(120px, .8fr); gap: .75rem; }
.ts-invoice-card.ts-card-troc { padding: .75rem .9rem; }
@media (max-width: 768px) { .ts-invoice-grid { grid-template-columns: 1fr; } }
.ts-invoice-card { padding: .75rem 1rem; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ts-invoice-card .label { color: #6b7280; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.ts-invoice-card .amount { margin-top: .25rem; color: #166534; font-size: 1.05rem; font-weight: 900; }
/* Carte duo : 2 lignes (vous devez / on vous doit) */
.ts-invoice-card.ts-duo { display: flex; flex-direction: column; gap: .6rem; }
.ts-duo-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ts-duo-line .amount { margin-top: 0; font-size: .95rem; }
.ts-fair-ok { color: #15803d; font-size: .68rem; font-weight: 900; }
.ts-fair-ko { color: #b45309; font-size: .68rem; font-weight: 900; }
/* Carte troc : fond colore selon l'equite */
.ts-invoice-card.ts-troc-ok { background: #f0fdf4; border-color: #86efac; }
.ts-invoice-card.ts-troc-ko { background: #fff7ed; border-color: #fdba74; }
.dark .ts-invoice-card.ts-troc-ok { background: #052e16; border-color: #166534; }
.dark .ts-invoice-card.ts-troc-ko { background: #431407; border-color: #9a3412; }
/* Solde : payeur -> montant -> receveur avec avatars */
.ts-balance-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; }
.ts-balance-user { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.ts-balance-user b { font-size: .72rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-balance-mid { display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.ts-balance-eq { justify-content: center; gap: .35rem; color: #6b7280; }
/* Nouvelle mise en page : en-tete compact, une colonne par utilisateur */
.ts-copy-head { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .6rem; border-radius: 8px; background: #15803d; color: #fff; font-size: .68rem; font-weight: 900; cursor: pointer; white-space: nowrap; }
.ts-copy-head.ts-copied { background: #0369a1; }
.ts-head-users { gap: .5rem; }
.ts-user-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem .15rem .15rem; border-radius: 9999px; border: 2px solid transparent; }
.ts-user-col-head { min-width: 118px; }
.ts-col-user { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 9999px; font-size: .68rem; font-weight: 900; }
.ts-col-user span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-col-user img { width: 1.1rem; height: 1.1rem; }
.ts-col-me { color: #15803d; background: #fff; border: 1.5px solid #86efac; }
.ts-col-other { color: #c2410c; background: #fff; border: 1.5px solid #fdba74; }
.ts-user-cell { vertical-align: top; position: relative; }
.ts-user-cell.ts-is-need { vertical-align: middle; }
.ts-user-cell.ts-is-need .ts-cell-top { margin-bottom: 0; }
.ts-cell-top { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; margin-bottom: .3rem; min-height: 1rem; }
.ts-tag { padding: .1rem .45rem; border-radius: 9999px; font-size: .6rem; font-weight: 900; white-space: nowrap; }
.ts-tag-need { background: #fee2e2; color: #b91c1c; }
.ts-tag-stock { background: #dcfce7; color: #15803d; }
.ts-tag-none { color: #d1d5db; }
.ts-is-provider { background: #f8fafc; }
.ts-user-cell input { width: 66px; }
/* Auteur d'une valeur : avatar + pseudo en bas a droite de la case */
.ts-author { position: absolute; bottom: .2rem; right: .25rem; display: inline-flex; align-items: center; gap: .2rem; font-size: .52rem; font-weight: 900; color: #9ca3af; line-height: 1; }
.ts-author b { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-author img, .ts-author span { width: .875rem; height: .875rem; font-size: .45rem; }
/* Prix + troc fusionnes */
.ts-price-cell { position: relative; }
.ts-price-cell input[type="number"] { width: 70px; }
/* Badge "Troc" automatique quand le prix est a 0 */
.ts-troc-auto { display: inline-block; margin-top: .25rem; padding: .12rem .5rem; border-radius: 9999px; background: #ede9fe; color: #6d28d9; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
/* Totaux en haut */
.ts-invoice-top { border-top: none; border-bottom: 2px solid #d1d5db; padding: .75rem 1rem; }
.ts-excl-sep { font-size: .62rem; font-weight: 900; color: #9ca3af; margin-left: .25rem; }
/* Barre de filtres adaptative : desktop complet, mobile condense avec bouton modal */
.ts-filter-mobile { display: none; }
.ts-filter-modal-btn { display: inline-flex; align-items: center; justify-content: center; padding: .4rem .55rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; }
@media (max-width: 1100px) {
    .ts-filter-desktop { display: none; }
    .ts-filter-mobile { display: flex; align-items: center; gap: .5rem; }
    .ts-filter-mobile select { flex: 1; min-width: 0; }
}
/* Case monstre compacte */
.ts-monster-box { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.ts-monster-info { display: flex; align-items: center; gap: .45rem; min-width: 0; text-align: left; }
.ts-monster-img { position: relative; width: 2.4rem; height: 2.4rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.ts-monster-img > img:first-child { width: 100%; height: 100%; object-fit: contain; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
.ts-monster-cat { position: absolute; bottom: -2px; right: -2px; width: .9rem; height: .9rem; background: #fff; border: 1px solid #d1d5db; border-radius: 9999px; padding: 1px; object-fit: contain; }
.dark .ts-monster-cat { background: #262626; border-color: #404040; }
.ts-monster-actions { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }
.ts-mini-btn { display: inline-flex; padding: .22rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #6b7280; cursor: pointer; }
.ts-mini-btn:hover { border-color: #15803d; color: #15803d; }
.ts-mini-btn.ts-exclude:hover { border-color: #E3000F; color: #E3000F; }
.dark .ts-copy-head { color: #fff; }
.dark .ts-is-provider { background: #1f2937; }
.dark .ts-tag-need { background: #450a0a; color: #fca5a5; }
.dark .ts-tag-stock { background: #052e16; color: #4ade80; }
.dark .ts-mini-btn { background: #1e1e1e; border-color: #525252; color: #d1d5db; }
.dark .ts-legend, .dark .ts-share, .dark .ts-filter-bar { background: #262626; border-color: #404040; color: #e5e7eb; }
.dark .ts-filter-bar select, .dark .ts-share input, .dark .ts-dir-btn, .dark .ts-exclude-btn, .dark .ts-filter-btn { background: #1e1e1e; border-color: #525252; color: #e5e7eb; }
.dark .ts-filter-bar label, .dark .ts-dir-static { color: #e5e7eb; }
.dark .ts-step-row td { background: #14532d; color: #dcfce7; }
.dark .ts-by-me { background: #052e16 !important; }
.dark .ts-by-other { background: #431407 !important; }
.dark .ts-legend-me { background: #052e16; }
.dark .ts-legend-other { background: #431407; }
.dark .ts-invoice { background: #1a1a1a; border-color: #404040; }
.dark .ts-invoice-card { background: #262626; border-color: #404040; }
.dark .ts-invoice-card .amount, .dark .trade-total-cell, .dark .ts-stock { color: #4ade80; }
.dark .trade-sheet-page { background: #052e16; }.dark .trade-sheet-panel { background: #1e1e1e; border-color: #404040; }.dark .trade-sheet-title { border-color: #404040; }.dark .trade-context span, .dark .trade-context strong, .dark .trade-sheet-table tbody th { background: #262626; color: #e5e7eb; border-color: #404040; }.dark .trade-sheet-table thead th { background: #14532d; color: #dcfce7; }.dark .trade-sheet-table th, .dark .trade-sheet-table td { border-color: #404040; }.dark .trade-sheet-table input { background: #262626; color: #fff; border-color: #525252; }
@media (max-width: 639px) { .trade-sheet-page { padding: .75rem; }.trade-sheet-header { align-items: flex-start; flex-direction: column; }.trade-context { justify-content: flex-start; }.trade-sheet-title { flex-direction: column; }.trade-sheet-scroll { max-height: calc(100vh - 240px); } }
.dashboard-tabs { position: relative; z-index: 5; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; border-radius: 0.9rem; background: rgba(21, 128, 61, 0.08); padding: 0.35rem; }
.dashboard-tab { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 0.7rem; color: #4b5563; font-size: 0.78rem; font-weight: 950; padding: 0.55rem 0.8rem; transition: 0.18s ease; }
.dashboard-tab:hover { background: rgba(255, 255, 255, 0.75); color: #15803d; }
.dashboard-tab.is-active { background: #15803d; color: #fff; box-shadow: 0 10px 22px rgba(21, 128, 61, 0.24); }
.dark .dashboard-tabs { background: rgba(255, 255, 255, 0.06); }
.dark .dashboard-tab { color: #d1d5db; }
.dark .dashboard-tab:hover { background: rgba(255, 255, 255, 0.08); }
.dashboard-filterbar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.dashboard-filter { border-radius: 999px; border: 1px solid rgba(21, 128, 61, 0.16); background: rgba(255, 255, 255, 0.72); color: #475569; font-size: 0.72rem; font-weight: 950; padding: 0.45rem 0.75rem; transition: 0.18s ease; }
.dashboard-filter:hover { border-color: rgba(21, 128, 61, 0.35); color: #15803d; }
.dashboard-filter.is-active { background: #15803d; border-color: #15803d; color: #fff; box-shadow: 0 8px 18px rgba(21, 128, 61, 0.2); }
.dashboard-subtotal { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.55rem; margin-bottom: 0.8rem; }
.dashboard-subtotal div { border-radius: 0.85rem; background: linear-gradient(135deg, rgba(21, 128, 61, 0.1), rgba(14, 116, 144, 0.08)); padding: 0.75rem; }
.dashboard-subtotal strong { display: block; color: #0f766e; font-size: 1.25rem; line-height: 1; font-weight: 950; }
.dashboard-subtotal span { color: #475569; font-size: 0.66rem; font-weight: 900; }
.dashboard-block { border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 1rem; background: rgba(255, 255, 255, 0.58); margin-top: 0.8rem; overflow: hidden; }
.dark .dashboard-block { background: rgba(255, 255, 255, 0.035); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-block-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem; border-bottom: 1px solid rgba(17, 24, 39, 0.05); }
.dashboard-block-head > button { display: inline-flex; align-items: center; gap: 0.45rem; color: #1f2937; font-size: 0.78rem; font-weight: 950; text-transform: uppercase; }
.dashboard-block-head > button:last-child { border-radius: 0.65rem; padding: 0.45rem; color: #64748b; transition: 0.18s ease; }
.dashboard-block-head > button:last-child:hover { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.dashboard-block-head span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dark .dashboard-block-head > button { color: #f3f4f6; }
.dashboard-block-body { padding: 0.75rem; }
.dashboard-honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.7rem; }
.dashboard-honor { display: flex; gap: 0.7rem; align-items: flex-start; border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.78); padding: 0.85rem; color: #15803d; }
.dark .dashboard-honor { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-honor.is-gold { color: #b45309; background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(255, 255, 255, 0.72)); }
.dark .dashboard-honor.is-gold { background: linear-gradient(135deg, rgba(120, 53, 15, 0.3), rgba(255, 255, 255, 0.05)); }
.dashboard-honor span { display: block; color: #64748b; font-size: 0.66rem; font-weight: 950; text-transform: uppercase; }
.dashboard-honor strong { display: block; color: #111827; font-size: 0.94rem; font-weight: 950; line-height: 1.15; }
.dark .dashboard-honor strong { color: #f8fafc; }
.dashboard-honor small { display: block; color: #6b7280; font-size: 0.68rem; font-weight: 800; line-height: 1.2; margin-top: 0.15rem; }
.dashboard-game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.7rem; }
.dashboard-game-card { border-radius: 0.9rem; background: linear-gradient(135deg, rgba(21, 128, 61, 0.1), rgba(227, 0, 15, 0.07)); padding: 0.9rem; border: 1px solid rgba(21, 128, 61, 0.1); }
.dashboard-game-card strong { display: block; color: #111827; font-size: 1rem; font-weight: 950; text-transform: capitalize; }
.dark .dashboard-game-card strong { color: #fff; }
.dashboard-game-card span, .dashboard-game-card small { display: block; color: #64748b; font-size: 0.72rem; font-weight: 850; }
.dashboard-game-card b { display: block; color: #15803d; font-size: 1.3rem; line-height: 1.1; font-weight: 950; margin: 0.35rem 0; }
.dashboard-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.dashboard-mini-title { color: #475569; font-size: 0.72rem; font-weight: 950; margin: 0 0 0.5rem; text-transform: uppercase; }
.dashboard-rank-row { display: grid; grid-template-columns: 2.2rem minmax(6rem, 0.8fr) minmax(9rem, 1.2fr); align-items: center; gap: 0.5rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.72); padding: 0.55rem; margin-top: 0.35rem; }
.dark .dashboard-rank-row { background: rgba(255, 255, 255, 0.05); }
.dashboard-rank-row span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 0.75rem; font-weight: 950; }
.dashboard-rank-row strong { overflow: hidden; color: #111827; font-size: 0.82rem; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.dark .dashboard-rank-row strong { color: #fff; }
.dashboard-rank-row em { color: #64748b; font-size: 0.68rem; font-style: normal; font-weight: 800; }
.dashboard-ocre-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.65rem; }
.dashboard-ocre-grid div { border-radius: 0.85rem; background: rgba(21, 128, 61, 0.08); padding: 0.85rem; text-align: center; }
.dashboard-ocre-grid strong { display: block; color: #15803d; font-size: 1.55rem; line-height: 1; font-weight: 950; }
.dashboard-ocre-grid span { color: #4b5563; font-size: 0.7rem; font-weight: 900; }
.dashboard-flow-bar b { display: block; min-height: 0.45rem; border-radius: 0.45rem 0.45rem 0.2rem 0.2rem; background: linear-gradient(180deg, #f59e0b, #e3000f); box-shadow: 0 8px 16px rgba(227, 0, 15, 0.15); }
.dashboard-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.75rem; color: #64748b; font-size: 0.7rem; font-weight: 900; }
.dashboard-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.dashboard-legend i, .dashboard-legend b { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 0.25rem; background: linear-gradient(180deg, #ef4444, #15803d); }
.dashboard-legend b { background: linear-gradient(180deg, #f59e0b, #e3000f); }
.dashboard-server-name em { border-radius: 999px; background: rgba(21, 128, 61, 0.1); color: #15803d; font-size: 0.58rem; font-style: normal; font-weight: 950; padding: 0.15rem 0.4rem; text-transform: uppercase; }
.dashboard-focus { width: min(94vw, 72rem); max-height: 88vh; overflow: hidden; border-radius: 1.1rem; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.dark .dashboard-focus { background: #1e1e1e; }
.dashboard-focus-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #15803d; color: #fff; padding: 0.9rem 1rem; }
.dashboard-focus-head strong { font-size: 0.95rem; font-weight: 950; }
.dashboard-focus-head button { border-radius: 999px; padding: 0.45rem; transition: 0.18s ease; }
.dashboard-focus-head button:hover { background: rgba(255, 255, 255, 0.18); }
.dashboard-focus-body { max-height: calc(88vh - 3.4rem); overflow: auto; padding: 1rem; background: linear-gradient(135deg, #ffffff, #f7fff9); }
.dark .dashboard-focus-body { background: #1e1e1e; }

.manage-modal { max-width: 56rem; }
.header-account-mobile-actions { display: none; }

@media (max-width: 639px) {
	.dashboard-heading, .dashboard-champion, .dashboard-server-row { display: block; }
	.dashboard-champion { margin-top: 0.75rem; }
	.dashboard-insights { grid-template-columns: 1fr; }
	.dashboard-flow { overflow-x: auto; padding-bottom: 0.25rem; }
	.dashboard-flow-bar { min-width: 2.3rem; }
	.dashboard-server-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dashboard-tabs { justify-content: stretch; }
	.dashboard-tab { flex: 1 1 8rem; justify-content: center; }
	.dashboard-rank-grid { grid-template-columns: 1fr; }
	.dashboard-rank-row { grid-template-columns: 2rem minmax(5rem, 1fr); }
	.dashboard-rank-row em { grid-column: 2; }
	.character-table-top-scroll { display: none; }
	.header-user-name { display: none; }
	.header-server-name { display: none; }
	.header-desktop-utility { display: none; }
	.header-account-mobile-actions { display: grid; }
	.header-main-nav { border-radius: 0; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
