:root {
  --bg: #0e1014; --panel: #171a21; --line: #262b35; --text: #e8eaee; --muted: #8b93a3;
  --accent: #e10600; --accent-2: #ff3b30; --ok: #2fbf71;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: inherit; }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 5; }
.brand { text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand span { color: var(--accent); }
.brand small { color: var(--muted); font-weight: 500; margin-left: 6px; font-size: 12px; }
nav { display: flex; gap: 14px; align-items: center; }
nav a:not(.btn) { text-decoration: none; color: var(--muted); }
main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 60px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); text-decoration: none;
  font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: #5a1414; border-color: #7a1d1d; }
.btn.big { padding: 10px 28px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: wait; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { border-color: var(--ok); background: #12301f; }
.flash.error { border-color: var(--accent); background: #3a1212; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
input, select, textarea { background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font: inherit; }
.filters input[type=search] { flex: 1 1 240px; }
.reset { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.empty { padding: 60px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }

.team { margin-bottom: 36px; }
.team h2 { display: flex; align-items: center; gap: 10px; font-size: 20px;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.count { background: var(--line); border-radius: 999px; padding: 0 10px; font-size: 13px; }
.only { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .15s; }
.card:hover { border-color: #3a4150; }
.thumb { position: relative; aspect-ratio: 16/9; background: #0a0c10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.car { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.7); padding: 2px 8px;
  border-radius: 4px; font-size: 12px; }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.body h3 { margin: 0; font-size: 16px; }
.meta { margin: 0; color: var(--muted); font-size: 13px; }
.notes { margin: 4px 0 0; font-size: 13px; }
.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; align-items: center; }
.del { margin-left: auto; position: relative; }
.del summary { list-style: none; cursor: pointer; opacity: .5; padding: 4px; }
.del summary:hover { opacity: 1; }
.del form { position: absolute; right: 0; bottom: 34px; display: flex; gap: 6px; background: var(--panel);
  border: 1px solid var(--line); padding: 8px; border-radius: 8px; width: 240px; }
.del input { width: 100%; }

h1 { margin-top: 0; }
.upload { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.upload label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; flex: 1; }
.upload label input, .upload label textarea { color: var(--text); font-size: 15px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { min-width: 220px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drop { flex: 1; }
.submit { display: flex; align-items: flex-end; }
.field-error { color: var(--accent-2); font-size: 13px; }

@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .brand small { display: none; }
}
