/* A.S.I.C. Trading Post — Vault-Tec themed shell. Palette ported from the pool UI. */
:root {
	--bg: #0a0d0a;
	--panel: #12160f;
	--panel-2: #171c12;
	--ink: #d7e4c9;
	--muted: #8aa07a;
	--accent: #ffd200;
	--accent-rgb: 255, 210, 0;
	--accent-2: #7bb661;
	--danger: #e2603a;
	--line: rgba(123, 182, 97, 0.18);
	--radius: 10px;
	--maxw: 1160px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background:
		radial-gradient(1200px 600px at 50% -10%, rgba(var(--accent-rgb), 0.06), transparent 60%),
		var(--bg);
	color: var(--ink);
	font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

/* ---- top nav ---- */
.topnav {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent);
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: 0.05em; }
.brand:hover { text-decoration: none; }
.brand .mark {
	display: inline-grid;
	place-items: center;
	width: 34px; height: 34px;
	border-radius: 8px;
	background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), 0.25), rgba(0, 0, 0, 0.4));
	border: 1px solid var(--line);
	color: var(--accent);
	font-size: 20px;
}
.brand-text b { color: var(--accent); }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav a {
	padding: 7px 12px;
	border-radius: 8px;
	color: var(--muted);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.04em;
}
.nav a:hover { color: var(--ink); background: var(--panel-2); text-decoration: none; }
.nav a.active { color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.authbox { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* ---- content ---- */
.content {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 26px 20px 60px;
	flex: 1;
}
.content > * + * { margin-top: 20px; }

.card {
	background: linear-gradient(rgba(23, 28, 18, 0.6), rgba(18, 22, 15, 0.7));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
}

h1, h2, h3 { font-weight: 700; letter-spacing: 0.02em; margin: 0 0 12px; }
h1 { font-size: 24px; }

/* ---- heading icons ---- */
.h-ico { display: inline-flex; align-items: center; gap: 10px; }
.h-ico .ico { display: inline-flex; flex: 0 0 auto; color: var(--accent); }
.h-ico .ico svg { display: block; }
h1.h-ico .ico svg { width: 22px; height: 22px; }
h3.h-ico .ico svg { width: 18px; height: 18px; }
.hero { text-align: center; padding: 40px 20px; }
.hero h1 { font-size: 30px; }
.hero .accent { color: var(--accent); }

/* ---- buttons + forms ---- */
.btn {
	display: inline-block;
	padding: 9px 16px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--ink);
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}
.btn:hover { background: var(--panel); text-decoration: none; }
.btn.primary { background: var(--accent); color: #1a1a08; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: rgba(226, 96, 58, 0.4); }

input, select, textarea {
	width: 100%;
	padding: 9px 11px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--ink);
	font: inherit;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; font-weight: 600; }

.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); }
.notice.err { color: var(--danger); border-color: rgba(226, 96, 58, 0.4); background: rgba(226, 96, 58, 0.06); }
.notice.ok { color: var(--accent-2); border-color: rgba(123, 182, 97, 0.4); background: rgba(123, 182, 97, 0.06); }

/* ---- footer ---- */
.footer {
	border-top: 1px solid var(--line);
	padding: 16px 20px;
	text-align: center;
	color: var(--muted);
	font-size: 12px;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}
.footer .sep { opacity: 0.4; }

/* ---- moderation ---- */
.report-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 12px 0;
	border-top: 1px solid var(--line);
	flex-wrap: wrap;
}
.report-title { font-weight: 600; }
.report-reason { margin-top: 6px; white-space: pre-wrap; }
.report-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- filter bar + pager ---- */
.filterbar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.filterbar .searchform { flex: 1 1 220px; margin: 0; }
.filterbar select { width: auto; min-width: 140px; }
.filterbar input[type="search"] { width: 100%; }
.pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 20px;
}
.pager button[disabled] { opacity: 0.4; cursor: default; }

/* ---- listings grid + cards ---- */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.listing-card {
	position: relative;
	display: block;
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	color: var(--ink);
}
.listing-card:hover { border-color: rgba(var(--accent-rgb), 0.5); text-decoration: none; }
.listing-thumb {
	aspect-ratio: 4 / 3;
	background: #0c0f0b;
	display: grid;
	place-items: center;
	overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb .noimg { color: var(--muted); font-size: 12px; letter-spacing: 0.05em; }
.listing-body { padding: 11px 12px 13px; }
.listing-title { font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.listing-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.listing-sub { font-size: 12px; }
.price { color: var(--accent); font-weight: 700; }
.price.big { font-size: 22px; margin: 6px 0 14px; }

.badge {
	font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
	padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line);
	color: var(--muted);
}
.badge-sell { color: var(--accent-2); border-color: rgba(123, 182, 97, 0.4); }
.badge-buy { color: #6fb3ff; border-color: rgba(111, 179, 255, 0.4); }
.badge-trade { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); }

.sold-tag {
	position: absolute; top: 10px; right: 10px;
	background: var(--danger); color: #1a1a08; font-weight: 800; font-size: 11px;
	padding: 3px 8px; border-radius: 5px; letter-spacing: 0.08em;
}
.sold-tag.inline { position: static; }

/* ---- ad detail ---- */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.gallery img { width: 150px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-cell { position: relative; }
.photo-cell img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-del {
	position: absolute; top: -8px; right: -8px;
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--danger); color: #1a1a08; border: none;
	font-weight: 800; line-height: 1; cursor: pointer;
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 18px; margin: 8px 0 6px; }
.meta-row { display: flex; flex-direction: column; }
.meta-row .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.desc { white-space: pre-wrap; line-height: 1.55; }

@media (max-width: 640px) {
	.brand-text { display: none; }
	.nav a { padding: 6px 9px; }
}
