:root {
	--bg: #0f1115;
	--panel: #181b22;
	--border: #2a2f3a;
	--text: #e6e8ee;
	--muted: #9aa3b2;
	--accent: #4f8cff;
	--ok: #4ade80;
	--err: #f87171;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	background: var(--bg);
	color: var(--text);
	padding: 2rem 1rem 4rem;
	max-width: 1100px;
	margin-inline: auto;
}

header h1 { margin: 0 0 .25rem; font-size: 1.6rem; }
header .sub { margin: 0 0 1.5rem; color: var(--muted); font-size: .95rem; }

#search-form {
	display: flex;
	gap: .5rem;
	margin-bottom: 1.5rem;
}

#q {
	flex: 1;
	padding: .8rem 1rem;
	font-size: 1rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--panel);
	color: var(--text);
}

#q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
	padding: .8rem 1.4rem;
	background: var(--accent);
	color: white;
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
}
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: progress; }

.status {
	padding: .75rem 1rem;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 8px;
	margin-bottom: 1rem;
	color: var(--muted);
}

.shop-status { margin-bottom: 1.5rem; }
.shop-status h2 { font-size: 1rem; color: var(--muted); margin: 0 0 .5rem; font-weight: 500; }
.shop-status ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.shop-status li {
	padding: .25rem .6rem;
	border-radius: 999px;
	font-size: .8rem;
	background: var(--panel);
	border: 1px solid var(--border);
}
.shop-status li.ok { border-color: rgba(74, 222, 128, .4); }
.shop-status li.ok .badge { color: var(--ok); }
.shop-status li.err { border-color: rgba(248, 113, 113, .4); }
.shop-status li.err .badge { color: var(--err); }
.shop-status li .badge { margin-right: .3rem; font-weight: 700; }
.shop-status li .reason { color: var(--muted); }

.toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: .75rem;
	flex-wrap: wrap;
	gap: .5rem;
}
.toolbar h2 { margin: 0; font-size: 1.1rem; }
.count { color: var(--muted); font-weight: 400; margin-left: .4rem; }

select {
	padding: .35rem .5rem;
	background: var(--panel);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 6px;
}

table {
	width: 100%;
	border-collapse: collapse;
	background: var(--panel);
	border-radius: 8px;
	overflow: hidden;
}

th, td {
	padding: .65rem .75rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: middle;
}

th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: rgba(255,255,255,.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255,255,255,.02); }

img.thumb {
	width: 48px;
	height: 48px;
	object-fit: contain;
	background: white;
	border-radius: 4px;
}

td.title a { color: var(--text); text-decoration: none; }
td.title a:hover { text-decoration: underline; }

.shop-pill {
	display: inline-block;
	padding: .15rem .55rem;
	font-size: .75rem;
	border-radius: 999px;
	background: rgba(79, 140, 255, .15);
	color: #b4cdff;
}

.btn-open {
	display: inline-block;
	padding: .35rem .7rem;
	background: transparent;
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 6px;
	text-decoration: none;
	font-size: .85rem;
}
.btn-open:hover { background: var(--accent); color: white; }

.price { font-weight: 600; }
.price.no { color: var(--muted); font-weight: 400; }
