/* TarkovLab — simple dark Tarkov-style theme */

:root {
  --bg: #0a0a0a;
  --panel: #141312;
  --panel-2: #1b1a18;
  --hover: #232220;
  --line: #2a2825;
  --line-2: #3a3733;
  --text: #c8c3b6;
  --muted: #8a8578;
  --dim: #5a564d;
  --gold: #9a8c5f;
  --gold-2: #c0a050;
  --blue: #5b8fb0;
  --orange: #c0903a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1500px; margin: 0 auto; padding: 0 28px 60px; }

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 80px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.logo { height: 44px; width: auto; display: block; }

nav { display: flex; gap: 2px; }

nav a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 18px;
  border-bottom: 2px solid transparent;
}

nav a:hover { color: var(--text); }
nav a.on { color: var(--gold-2); border-bottom-color: var(--gold-2); }

.status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.on .dot { background: #6fae6f; }
.status.off { color: var(--orange); }
.status.off .dot { background: var(--orange); }

/* Titles */
h1 {
  font-family: 'Oswald', 'Bebas Neue', sans-serif;
  font-weight: 600;
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}
.sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }

.search { position: relative; flex: 1; min-width: 220px; }
.search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 14px 11px 38px;
  outline: none;
}
.search input:focus { border-color: var(--gold); }
.search input::placeholder { color: var(--dim); }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fbtn {
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 15px;
  cursor: pointer;
}
.fbtn:hover { color: var(--text); }
.fbtn.on { color: var(--text); border-color: var(--gold); background: rgba(154,140,95,0.12); }

.count { margin-left: auto; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.count b { color: var(--text); }
.count .h { color: var(--orange); }

/* Table */
.tbl-wrap { border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }

thead th {
  position: sticky; top: 0;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:hover { color: var(--text); }
thead th .ar { color: var(--gold); margin-left: 5px; opacity: 0; font-size: 0.7em; }
thead th.asc .ar, thead th.desc .ar { opacity: 1; }
thead th.asc .ar::after { content: '\25b2'; }
thead th.desc .ar::after { content: '\25bc'; }

tbody tr { border-bottom: 1px solid var(--line); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--hover); }
td { padding: 13px 20px; vertical-align: middle; }

.c-rarity { width: 140px; }
.c-status { width: 120px; }

/* Achievement cell */
.ach { display: flex; align-items: center; gap: 15px; }
.ach img {
  width: 50px; height: 50px; flex-shrink: 0;
  object-fit: contain;
}
.ach .nm {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.ach .ds { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* Pills */
.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: #060606;
}
.pill.common { color: var(--muted); }
.pill.rare { color: var(--blue); border-color: rgba(91,143,176,0.45); }
.pill.legendary { color: var(--orange); border-color: rgba(192,144,58,0.45); }
.pill.hide { color: var(--orange); border-color: rgba(192,144,58,0.35); }
.pill.vis { color: var(--dim); }

/* States */
.state { text-align: center; padding: 60px 20px; color: var(--muted); }
.state .t {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dim);
  margin-bottom: 8px;
}
.state.err .t { color: var(--orange); }
.spin {
  width: 28px; height: 28px; margin: 0 auto 14px;
  border: 2px solid var(--line-2); border-top-color: var(--gold);
  border-radius: 50%; animation: sp 0.8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* Quests two-column */
.cols { display: grid; grid-template-columns: 1fr 460px; gap: 22px; align-items: start; }

.qlist { border: 1px solid var(--line); background: var(--panel); max-height: calc(100vh - 250px); overflow-y: auto; }
.qrow { padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.qrow:last-child { border-bottom: none; }
.qrow:hover { background: var(--hover); }
.qrow.on { background: rgba(154,140,95,0.1); border-left: 2px solid var(--gold); }
.qrow .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.qrow .giver { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.qrow .qid { font-size: 0.7rem; color: var(--dim); }
.qrow .ttl { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 1.15rem; color: var(--text); }
.qrow .meta { display: flex; gap: 16px; font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.qrow .meta b { color: var(--text); }

.detail { position: sticky; top: 20px; border: 1px solid var(--line); background: var(--panel); padding: 24px; max-height: calc(100vh - 250px); overflow-y: auto; }
.detail .empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.detail .empty .t { display: block; font-family: 'Oswald', sans-serif; font-size: 1.3rem; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }

.dhead { display: flex; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.dhead img { width: 76px; height: 76px; flex-shrink: 0; border: 1px solid var(--line-2); background: #060606; object-fit: cover; object-position: center 12%; }
.dhead .lbl { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.dhead .ttl { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); line-height: 1.05; margin-bottom: 6px; }
.dhead .sub { display: flex; gap: 14px; font-size: 0.78rem; color: var(--muted); }
.dhead .sub b { color: var(--dim); }

.sec { margin-bottom: 20px; }
.sec .h { font-family: 'Oswald', sans-serif; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 11px; }
.sec .h.w { color: var(--orange); }
.sec .h.m { color: var(--muted); }

ul.lst { list-style: none; display: flex; flex-direction: column; gap: 8px; }
ul.lst li { display: flex; gap: 9px; font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
ul.lst li::before { content: '▪'; color: var(--gold); font-size: 0.7rem; margin-top: 4px; }
ul.lst.w li::before { color: var(--orange); }
.dim { color: var(--dim); font-size: 0.88rem; }

.wlink { display: inline-block; color: var(--gold); font-weight: 700; font-size: 0.9rem; border-bottom: 1px dashed var(--gold); }
.wlink:hover { color: var(--text); }

.req { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.req strong { color: var(--text); }
.req ul { list-style: none; padding-left: 12px; margin-top: 5px; }

/* Responsive */
@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; }
  .detail { position: static; max-height: none; }
  .qlist { max-height: 480px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px 40px; }
  header { flex-wrap: wrap; height: auto; padding: 14px 0; gap: 12px; }
  .status { width: 100%; margin-left: 0; }
  .c-status, th.c-status, td.c-status { display: none; }
}
