:root {
  --bg: #12150f; --panel: #1b2017; --line: #2c3426; --text: #e8ecdf; --muted: #9aa58c;
  --accent: #8fb85a; --danger: #d5694f;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f3f4ee; --panel: #fff; --line: #d8dccd; --text: #1e2418; --muted: #667058; --accent: #4f7a1f; --danger: #b0432c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, sans-serif; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--text); margin-right: auto; }
header.top form { margin: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.3rem; margin: 0 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
input, select, button { font: inherit; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
button, .btn { background: var(--accent); color: #10140b; border: 0; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; padding: 9px 14px; border-radius: 8px; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 400; }
button.danger { background: var(--danger); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 5px; font-size: .72rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 18px 0; color: var(--muted); }
.big img { width: 100%; height: auto; border-radius: 10px; display: block; }
.meta { color: var(--muted); font-size: .9rem; margin: 10px 0; }
.nav { display: flex; justify-content: space-between; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td form { display: inline-flex; gap: 6px; margin: 0; }
.error { color: var(--danger); margin: 0 0 10px; }
.msg { background: var(--panel); border-left: 4px solid var(--accent); padding: 10px 12px; margin-bottom: 14px; border-radius: 6px; }
.login { max-width: 360px; margin: 12vh auto 0; }
.login input { width: 100%; margin-bottom: 10px; }
.login button { width: 100%; }
.tile.empty img { opacity: .4; filter: grayscale(1); }
.badge { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(0,0,0,.7); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.badge.warn { background: var(--danger); border-color: transparent; }
