/* =========================================================================
   Wardogs RCON — front-end design system
   Scoped under .wdrcon so it never leaks into (or inherits chaos from) the theme.
   Identity: tactical charcoal, gold command accent, faction colour-coding.
   ========================================================================= */

.wdrcon {
	--wd-bg:        #0f0f12;
	--wd-panel:     #16161b;
	--wd-panel-2:   #1d1d24;
	--wd-line:      #2a2a33;
	--wd-ink:       #f2f2f5;
	--wd-ink-dim:   #a2a2ad;
	--wd-ink-faint: #6c6c78;
	--wd-gold:      #d4a843;
	--wd-gold-soft: rgba(212,168,67,.14);
	--wd-red:       #d86060;
	--wd-blu:       #5b95d8;
	--wd-grn:       #7bc462;
	--wd-ok:        #7bc462;
	--wd-warn:      #e0a13a;
	--wd-danger:    #d8524e;
	--wd-radius:    14px;
	--wd-radius-sm: 9px;
	--wd-shadow:    0 10px 30px rgba(0,0,0,.35);
	--wd-mono:      "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--wd-sans:      "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

	color: var(--wd-ink);
	font-family: var(--wd-sans);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	container-type: inline-size;
}

.wdrcon *, .wdrcon *::before, .wdrcon *::after { box-sizing: border-box; }

/* Light-theme host pages: keep the console dark on purpose (it's a HUD),
   but soften the drop shadow so it doesn't look like a hole in the page. */
@media (prefers-color-scheme: light) {
	.wdrcon { --wd-shadow: 0 8px 24px rgba(20,20,30,.18); }
}

/* ------------------------------------------------------------------ Board */

.wdrcon-board {
	background:
		radial-gradient(1200px 300px at 80% -10%, rgba(212,168,67,.08), transparent 60%),
		var(--wd-bg);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius);
	padding: clamp(16px, 3vw, 28px);
	box-shadow: var(--wd-shadow);
}

.wd-board-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.wd-kpis { display: flex; gap: 10px; flex-wrap: wrap; }

.wd-kpi {
	background: var(--wd-panel);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius-sm);
	padding: 10px 16px;
	min-width: 118px;
}
.wd-kpi-val {
	display: block;
	font-family: var(--wd-mono);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -.5px;
	color: var(--wd-gold);
	font-variant-numeric: tabular-nums;
}
.wd-kpi-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--wd-ink-faint);
	margin-top: 2px;
}

.wd-live-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--wd-mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .18em;
	color: var(--wd-ink-dim);
	padding: 8px 12px;
	border: 1px solid var(--wd-line);
	border-radius: 999px;
	background: var(--wd-panel);
}
.wd-pulse {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--wd-ok);
	box-shadow: 0 0 0 0 rgba(123,196,98,.6);
	animation: wd-pulse 1.8s infinite;
}
@keyframes wd-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(123,196,98,.55); }
	70%  { box-shadow: 0 0 0 8px rgba(123,196,98,0); }
	100% { box-shadow: 0 0 0 0 rgba(123,196,98,0); }
}
@media (prefers-reduced-motion: reduce) { .wd-pulse { animation: none; } }

/* -------------------------------------------------------------- Card grid */

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

.wd-card {
	position: relative;
	background: var(--wd-panel);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .18s ease, border-color .18s ease;
}
.wd-card:hover { transform: translateY(-3px); border-color: rgba(212,168,67,.5); }

.wd-card-art {
	position: relative;
	aspect-ratio: 16 / 6;
	background:
		linear-gradient(180deg, rgba(15,15,18,0) 30%, rgba(15,15,18,.92) 100%),
		repeating-linear-gradient(135deg, #24242c 0 12px, #1f1f26 12px 24px);
	display: flex; align-items: flex-end;
}
.wd-card-art img { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.wd-card-art::after {
	content:""; position:absolute; inset:0;
	background: linear-gradient(180deg, rgba(15,15,18,0) 35%, rgba(15,15,18,.92) 100%);
}
.wd-card-arttext {
	position: relative; z-index: 1;
	padding: 12px 14px;
	display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 10px;
}
.wd-card-map { font-weight: 600; font-size: 15px; }
.wd-card-mode { font-size: 11px; color: var(--wd-ink-dim); text-transform: uppercase; letter-spacing: .1em; }

.wd-status-chip {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	padding: 4px 9px; border-radius: 999px;
	border: 1px solid var(--wd-line); background: rgba(0,0,0,.35);
}
.wd-status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wd-ink-faint); }
.wd-status-chip.is-online { color: var(--wd-ok); border-color: rgba(123,196,98,.4); }
.wd-status-chip.is-online .dot { background: var(--wd-ok); }
.wd-status-chip.is-offline { color: var(--wd-danger); border-color: rgba(216,82,78,.4); }
.wd-status-chip.is-offline .dot { background: var(--wd-danger); }

.wd-card-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.wd-card-title { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.wd-card-name { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.wd-card-players {
	font-family: var(--wd-mono); font-size: 13px; color: var(--wd-ink-dim);
	font-variant-numeric: tabular-nums; white-space: nowrap;
}
.wd-card-players b { color: var(--wd-ink); }

/* faction score bars */
.wd-scores { display: flex; flex-direction: column; gap: 7px; }
.wd-score-row { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 10px; }
.wd-score-name { font-size: 12px; color: var(--wd-ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-score-track { height: 8px; background: var(--wd-panel-2); border-radius: 999px; overflow: hidden; }
.wd-score-fill { height: 100%; border-radius: 999px; width: 0; transition: width .6s cubic-bezier(.22,1,.36,1); }
.wd-score-val { font-family: var(--wd-mono); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

.wd-card-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	border-top: 1px solid var(--wd-line); padding-top: 10px; margin-top: auto;
	font-size: 12px; color: var(--wd-ink-faint);
}
.wd-card-foot .wd-clock { font-family: var(--wd-mono); color: var(--wd-ink-dim); font-variant-numeric: tabular-nums; }

.wd-empty, .wd-error {
	grid-column: 1 / -1;
	padding: 28px; text-align: center; color: var(--wd-ink-faint);
	border: 1px dashed var(--wd-line); border-radius: var(--wd-radius);
	font-size: 14px;
}
.wd-error { color: var(--wd-danger); border-color: rgba(216,82,78,.35); }

.wd-updated { margin: 14px 0 0; font-size: 11px; color: var(--wd-ink-faint); text-align: right; font-family: var(--wd-mono); }

.wd-skeleton { position: relative; overflow: hidden; }
.wd-skeleton::after {
	content:""; position:absolute; inset:0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
	transform: translateX(-100%); animation: wd-shimmer 1.4s infinite;
}
@keyframes wd-shimmer { 100% { transform: translateX(100%); } }

/* ============================================================ Admin panel */

.wdrcon-admin {
	background: var(--wd-bg);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius);
	box-shadow: var(--wd-shadow);
	overflow: hidden;
}
.wdrcon-locked {
	background: var(--wd-panel); border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius); padding: 22px; color: var(--wd-ink-dim);
}

.wd-admin-bar {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	padding: 12px 16px; border-bottom: 1px solid var(--wd-line);
	background: var(--wd-panel);
}
.wd-srvpick { font-size: 12px; color: var(--wd-ink-dim); text-transform: uppercase; letter-spacing: .1em; display:flex; align-items:center; gap:8px; }
.wd-srvpick select, .wd-select {
	font-family: var(--wd-sans); font-size: 14px; color: var(--wd-ink);
	background: var(--wd-panel-2); border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius-sm); padding: 7px 10px;
}

.wd-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.wd-tab {
	appearance: none; cursor: pointer;
	font-family: var(--wd-sans); font-size: 13px; font-weight: 600;
	color: var(--wd-ink-dim); background: transparent;
	border: 1px solid transparent; border-radius: 999px; padding: 7px 14px;
	transition: color .15s, background .15s, border-color .15s;
}
.wd-tab:hover { color: var(--wd-ink); }
.wd-tab.is-active { color: #1a1a1f; background: var(--wd-gold); border-color: var(--wd-gold); }
.wd-tab:focus-visible { outline: 2px solid var(--wd-gold); outline-offset: 2px; }

.wd-admin-body { padding: clamp(14px, 2.5vw, 22px); }

.wd-panel {
	background: var(--wd-panel); border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius); padding: 16px; margin-bottom: 16px;
}
.wd-panel h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--wd-ink-dim); }

.wd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.wd-stat { background: var(--wd-panel-2); border: 1px solid var(--wd-line); border-radius: var(--wd-radius-sm); padding: 12px 14px; }
.wd-stat .v { font-family: var(--wd-mono); font-size: 22px; font-weight: 700; color: var(--wd-gold); font-variant-numeric: tabular-nums; }
.wd-stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--wd-ink-faint); margin-top: 2px; }

/* tables */
.wd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wd-table-wrap { overflow-x: auto; border: 1px solid var(--wd-line); border-radius: var(--wd-radius-sm); }
.wd-table th, .wd-table td { padding: 9px 12px; text-align: left; white-space: nowrap; }
.wd-table thead th {
	position: sticky; top: 0; background: var(--wd-panel-2);
	font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--wd-ink-faint);
	border-bottom: 1px solid var(--wd-line);
}
.wd-table tbody tr { border-bottom: 1px solid var(--wd-line); }
.wd-table tbody tr:hover { background: rgba(255,255,255,.02); }
.wd-table .mono { font-family: var(--wd-mono); font-variant-numeric: tabular-nums; color: var(--wd-ink-dim); }

.wd-player { display: flex; align-items: center; gap: 9px; }
.wd-avatar { width: 26px; height: 26px; border-radius: 6px; background: var(--wd-panel-2); border: 1px solid var(--wd-line); object-fit: cover; flex: none; }
.wd-faction { display:inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 2px; }

/* buttons */
.wd-btn {
	appearance: none; cursor: pointer; font-family: var(--wd-sans); font-weight: 600; font-size: 12px;
	color: var(--wd-ink); background: var(--wd-panel-2); border: 1px solid var(--wd-line);
	border-radius: 8px; padding: 6px 11px; transition: filter .15s, border-color .15s, background .15s;
}
.wd-btn:hover { filter: brightness(1.15); }
.wd-btn:focus-visible { outline: 2px solid var(--wd-gold); outline-offset: 2px; }
.wd-btn-gold { background: var(--wd-gold); border-color: var(--wd-gold); color: #1a1a1f; }
.wd-btn-danger { color: #fff; background: #7a2d2b; border-color: #96413e; }
.wd-btn-danger:hover { background: #93332f; }
.wd-btn-sm { padding: 4px 8px; font-size: 11px; }
.wd-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

.wd-input, .wd-textarea {
	width: 100%; font-family: var(--wd-sans); font-size: 14px; color: var(--wd-ink);
	background: var(--wd-panel-2); border: 1px solid var(--wd-line);
	border-radius: var(--wd-radius-sm); padding: 9px 11px;
}
.wd-textarea { min-height: 76px; resize: vertical; }
.wd-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wd-field label { font-size: 12px; color: var(--wd-ink-dim); text-transform: uppercase; letter-spacing: .08em; }
.wd-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }

/* toast */
.wd-toast {
	margin: 0 16px; padding: 10px 14px; border-radius: var(--wd-radius-sm);
	font-size: 13px; font-weight: 600; border: 1px solid var(--wd-line);
	background: var(--wd-panel);
}
.wd-toast.is-ok { color: var(--wd-ok); border-color: rgba(123,196,98,.4); background: rgba(123,196,98,.08); }
.wd-toast.is-err { color: var(--wd-danger); border-color: rgba(216,82,78,.4); background: rgba(216,82,78,.08); }

.wd-audit { font-family: var(--wd-mono); font-size: 12px; }
.wd-audit .ev { color: var(--wd-gold); }

.wd-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--wd-line); }
.wd-pill-ok { color: var(--wd-ok); border-color: rgba(123,196,98,.4); background: rgba(123,196,98,.10); }
.wd-pill-no { color: var(--wd-danger); border-color: rgba(216,82,78,.4); background: rgba(216,82,78,.10); }
.wd-pill-dim { color: var(--wd-ink-faint); }
.wd-note { font-size: 13px; color: var(--wd-ink-dim); }
.wd-note code, .wd-audit code { font-family: var(--wd-mono); color: var(--wd-gold); }

/* ======================================================= Single-server dash */

/* The dashboard shell is the glass "rear layer": translucent so the page/website
   background behind it shows through, frosted (and refracted where supported). */
.wdrcon-dash {
	background:
		radial-gradient(1200px 340px at 85% -12%, rgba(212, 168, 67, .10), transparent 60%),
		rgba(15, 15, 18, .58);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: var(--wd-radius);
	padding: clamp(16px, 3vw, 28px);
	box-shadow: var(--wd-shadow);
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	backdrop-filter: blur(14px) saturate(1.3);
}
@supports (backdrop-filter: url(#wd-liquid-glass)) or (-webkit-backdrop-filter: url(#wd-liquid-glass)) {
	.wdrcon-dash {
		-webkit-backdrop-filter: url(#wd-liquid-glass) blur(10px) saturate(1.35);
		backdrop-filter: url(#wd-liquid-glass) blur(10px) saturate(1.35);
	}
}
.wd-dash-loading { padding: 40px; text-align: center; color: var(--wd-ink-faint); }

.wd-dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.wd-dash-name { margin: 0; font-size: clamp(20px, 3vw, 27px); font-weight: 700; letter-spacing: -.4px; }
.wd-dash-sub { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.wd-dash-players { font-family: var(--wd-mono); font-size: 13px; color: var(--wd-ink-dim); }
.wd-dash-players b { color: var(--wd-gold); }

/* map strip */
.wd-maps { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; margin-bottom: 18px; }
.wd-map {
	position: relative; overflow: hidden; display: flex;
	background: var(--wd-panel); border: 1px solid var(--wd-line); border-radius: var(--wd-radius);
	min-height: 108px;
}
.wd-map-art {
	position: absolute; inset: 0; background-size: cover; background-position: center;
	opacity: 0; transition: opacity .5s ease; transform: scale(1.02);
}
.wd-map-art.has-art { opacity: .95; }
.wd-map-next .wd-map-art.has-art { opacity: .72; }
.wd-map-inner {
	position: relative; z-index: 1; width: 100%;
	padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; justify-content: flex-end;
}
.wd-map-now { border-color: rgba(212,168,67,.5); }
.wd-map-now .wd-map-inner { background: linear-gradient(180deg, rgba(212,168,67,.20) 0%, rgba(14,14,18,.62) 100%); }
.wd-map-next .wd-map-inner { background: linear-gradient(180deg, rgba(22,22,28,.30) 0%, rgba(14,14,18,.66) 100%); }
.wd-map-name { text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.wd-map-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--wd-ink-faint); }
.wd-map-now .wd-map-tag { color: var(--wd-gold); }
.wd-map-name { font-size: clamp(18px, 2.6vw, 24px); font-weight: 700; letter-spacing: -.3px; }
.wd-map-meta { font-size: 12px; color: var(--wd-ink-dim); font-family: var(--wd-mono); }
.wd-map-arrow { display: flex; align-items: center; justify-content: center; color: var(--wd-ink-faint); font-size: 22px; }

/* metrics + scores */
.wd-dash-stats { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-bottom: 18px; align-items: start; }
.wd-dash-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wdrcon-dash .wd-scores { background: var(--wd-panel); border: 1px solid var(--wd-line); border-radius: var(--wd-radius); padding: 14px 16px; gap: 9px; }

/* Cash Kings leaderboard */
.wd-kings { background: var(--wd-panel); border: 1px solid var(--wd-line); border-radius: var(--wd-radius); padding: 16px 18px; }
.wd-kings-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.wd-kings-head h3 { margin: 0; font-size: 15px; letter-spacing: .01em; }
.wd-kings-note { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--wd-ink-faint); }
.wd-kings-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wd-king {
	display: grid; grid-template-columns: 30px 30px 1fr auto auto; align-items: center; gap: 12px;
	padding: 8px 10px; border-radius: var(--wd-radius-sm); background: var(--wd-panel-2); border: 1px solid transparent;
}
.wd-king-rank { font-family: var(--wd-mono); font-weight: 700; color: var(--wd-ink-faint); text-align: center; }
.wd-king-av { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; border: 1px solid var(--wd-line); }
.wd-king-av-ph { display: grid; place-items: center; background: var(--wd-panel); color: var(--wd-ink-dim); font-weight: 700; font-size: 13px; }
.wd-king-name { display: flex; align-items: center; gap: 7px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-king-kd { font-family: var(--wd-mono); font-size: 12px; color: var(--wd-ink-dim); font-variant-numeric: tabular-nums; }
.wd-king-cash { font-family: var(--wd-mono); font-weight: 700; color: var(--wd-gold); font-variant-numeric: tabular-nums; }
.wd-king-empty { display: block; text-align: center; color: var(--wd-ink-faint); }

.wd-king-top { border-color: rgba(212,168,67,.35); }
.wd-king-r1 { background: linear-gradient(90deg, rgba(212,168,67,.20), var(--wd-panel-2) 60%); border-color: rgba(212,168,67,.6); }
.wd-king-r1 .wd-king-rank { color: var(--wd-gold); }
.wd-king-r2 { background: linear-gradient(90deg, rgba(200,200,210,.12), var(--wd-panel-2) 60%); }
.wd-king-r2 .wd-king-rank { color: #cfd2da; }
.wd-king-r3 { background: linear-gradient(90deg, rgba(205,127,50,.14), var(--wd-panel-2) 60%); }
.wd-king-r3 .wd-king-rank { color: #d08a4e; }

/* ---------------------------------------------------- liquid glass utility */
/* Frosted fallback everywhere; SVG-turbulence refraction where supported. */
.wd-glass {
	background: rgba(22, 22, 28, .48);
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(0, 0, 0, .22), 0 10px 34px rgba(0, 0, 0, .4);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	backdrop-filter: blur(12px) saturate(1.4);
}
@supports (backdrop-filter: url(#wd-liquid-glass)) or (-webkit-backdrop-filter: url(#wd-liquid-glass)) {
	.wd-glass-refract {
		-webkit-backdrop-filter: url(#wd-liquid-glass) blur(6px) saturate(1.5);
		backdrop-filter: url(#wd-liquid-glass) blur(6px) saturate(1.5);
	}
}

/* Map-card glass lives on .wd-map-inner (see the map section); it refracts the .wd-map-art behind it. */

/* hero (banner art + glass panel) */
.wd-dash-hero { position: relative; border: 1px solid var(--wd-line); border-radius: var(--wd-radius); overflow: hidden; margin-bottom: 16px; min-height: 160px; display: flex; }
.wd-dash-hero-art {
	position: absolute; inset: 0;
	background-image: var(--wd-hero); background-size: cover; background-position: center;
	opacity: .85;
}
.wd-dash-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 20% 0%, transparent 40%, rgba(10,10,14,.55) 100%); pointer-events: none; }
/* Hero panel is a plain scrim (NOT glass) so the banner image stays sharp/undistorted. */
.wd-hero-panel {
	position: relative; z-index: 1; margin: 14px; border-radius: var(--wd-radius);
	padding: clamp(14px, 2vw, 20px); display: flex; flex-direction: column; gap: 14px;
	align-self: stretch; width: 100%;
	background: linear-gradient(180deg, rgba(10, 10, 14, .34) 0%, rgba(10, 10, 14, .74) 100%);
	border: 1px solid rgba(255, 255, 255, .10);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 24px rgba(0, 0, 0, .35);
}
.wd-dash-hero .wd-status-chip { background: rgba(0, 0, 0, .42); }
.wd-dash-hero .wd-live-tag { background: rgba(0, 0, 0, .42); border-color: rgba(255, 255, 255, .14); color: #fff; }
.wd-dash-hero-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wd-dash-hero .wd-dash-name { text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.wd-cap { position: relative; z-index: 1; }
.wd-cap-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.wd-cap-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--wd-ink-dim); }
.wd-cap-count { font-family: var(--wd-mono); font-size: 13px; color: var(--wd-ink); font-variant-numeric: tabular-nums; }
.wd-cap-count b { color: var(--wd-gold); }
.wd-cap-track { height: 10px; background: rgba(0,0,0,.4); border: 1px solid var(--wd-line); border-radius: 999px; overflow: hidden; }
.wd-cap-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--wd-gold), #e8c56b); transition: width .6s cubic-bezier(.22,1,.36,1); }
.wd-cap-fill.is-full { background: linear-gradient(90deg, var(--wd-danger), #e8776f); }

/* battle status grouping */
.wd-battle { background: var(--wd-panel); border: 1px solid var(--wd-line); border-radius: var(--wd-radius); padding: 14px 16px; }
.wdrcon-dash .wd-battle .wd-scores { background: none; border: 0; padding: 0; }
.wd-battle-head { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--wd-ink-faint); margin-bottom: 10px; }
.wd-dash-metrics { grid-template-columns: repeat(3, 1fr); }

/* admin persistent context strip */
.wd-context {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	padding: 10px 16px; border-bottom: 1px solid var(--wd-line);
	background: linear-gradient(180deg, var(--wd-panel-2), var(--wd-panel));
	font-size: 13px;
}
.wd-ctx-name { font-weight: 700; letter-spacing: -.2px; }
.wd-ctx-item { color: var(--wd-ink-dim); font-size: 12px; }
.wd-ctx-item b { color: var(--wd-gold); font-family: var(--wd-mono); }
.wd-ctx-map { padding: 2px 8px; border: 1px solid var(--wd-line); border-radius: 999px; }
.wd-ctx-clock { margin-left: auto; color: var(--wd-ink); }

/* ------------------------------------------------------- motion & polish */
@keyframes wd-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wd-king { animation: wd-rise .38s cubic-bezier(.22,1,.36,1) both; transition: transform .16s ease, border-color .16s ease; }
.wd-king:hover { transform: translateX(2px); }
.wd-king:nth-child(1) { animation-delay: .02s; }
.wd-king:nth-child(2) { animation-delay: .06s; }
.wd-king:nth-child(3) { animation-delay: .10s; }
.wd-king:nth-child(4) { animation-delay: .14s; }
.wd-king:nth-child(5) { animation-delay: .18s; }
.wd-king:nth-child(n+6) { animation-delay: .22s; }

/* #1 Cash King sheen sweep */
.wd-king-r1 { position: relative; overflow: hidden; }
.wd-king-r1::after {
	content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
	transform: skewX(-18deg); animation: wd-sheen 4.5s ease-in-out infinite;
}
@keyframes wd-sheen { 0%, 60% { left: -60%; } 88%, 100% { left: 130%; } }

.wd-stat { transition: transform .16s ease, border-color .16s ease; }
.wd-stat:hover { transform: translateY(-2px); border-color: rgba(212, 168, 67, .4); }
.wd-map { transition: transform .18s ease, border-color .18s ease; }
.wd-map-now:hover { transform: translateY(-2px); }
.wd-map-name { transition: color .2s ease; }

.wd-kpi { transition: transform .16s ease, border-color .16s ease; }
.wd-kpi:hover { transform: translateY(-2px); border-color: rgba(212, 168, 67, .35); }

/* Hero chrome is a solid scrim (no blur) so the banner behind stays undistorted. */

@media (prefers-reduced-motion: reduce) {
	.wd-king, .wd-king-r1::after { animation: none; }
	.wd-king, .wd-stat, .wd-map, .wd-kpi, .wd-card { transition: none; }
}

@container (max-width: 640px) {
	.wd-maps { grid-template-columns: 1fr; }
	.wd-map-arrow { transform: rotate(90deg); }
	.wd-dash-stats { grid-template-columns: 1fr; }
	.wd-king { grid-template-columns: 26px 26px 1fr auto; }
	.wd-king-kd { display: none; }
}

@container (max-width: 520px) {
	.wd-score-row { grid-template-columns: 60px 1fr 30px; }
	.wd-board-head { flex-direction: column; align-items: stretch; }
}
