/* ==========================================
   FiveZone Police PC - base (tokens, controls) - shared look with fz_forensics / fz_mugshot
   No backdrop-filter anywhere (FiveM renders it as a black rectangle).
   ========================================== */

:root {
    --bg: #0f1217;
    --bg-2: #0b0e12;
    --panel: #151a21;
    --panel-2: #1b2129;
    --panel-3: #222a34;
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #e8ecf1;
    --muted: #8b96a3;
    --dim: #5d6773;
    --accent: #f1c40f;
    --accent-2: #ffd43b;
    --accent-soft: rgba(241, 196, 15, 0.12);
    --accent-line: rgba(241, 196, 15, 0.35);
    --ok: #2ecc71;
    --warn: #f39c12;
    --bad: #e74c3c;
    --info: #3498db;
    --mono: 'JetBrains Mono', Consolas, monospace;
    --radius: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%; height: 100%;
    background: transparent;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 24px; height: 24px; }

button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
::-webkit-scrollbar-track { background: transparent; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.accent { color: var(--accent); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-text, .sel-text * { user-select: text; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 14px; border-radius: 9px;
    background: var(--panel-2); border: 1px solid var(--line-2);
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
    transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
    white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn.primary { background: var(--accent); color: #17140a; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: #ff8a80; border-color: rgba(231, 76, 60, 0.35); }
.btn.danger:hover { background: rgba(231, 76, 60, 0.12); }
.btn.ok { color: #7ee2a8; border-color: rgba(46, 204, 113, 0.35); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn.sm { padding: 5px 10px; font-size: 11.5px; border-radius: 7px; }
.btn.icon { padding: 7px; }

.icon-btn {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    background: transparent; border: 1px solid transparent; color: var(--muted);
    transition: 0.15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.icon-btn.danger:hover { background: rgba(231, 76, 60, 0.15); color: #ff8a80; }

kbd {
    font-family: var(--mono); font-size: 10px; font-weight: 600;
    padding: 1px 5px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- Inputs ---------- */
.input, .select, .textarea {
    width: 100%;
    padding: 8px 11px; border-radius: 8px;
    background: var(--bg-2); border: 1px solid var(--line-2);
    outline: none; font-size: 12.5px;
    transition: border-color 0.15s, background 0.15s;
    user-select: text;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-line); background: #0d1116; }
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.select { appearance: none; cursor: pointer; padding-right: 28px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.select option { background: var(--panel); }
.search { position: relative; }
.search .input { padding-left: 32px; }
.search svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--dim); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; }
.check input { appearance: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 8px; height: 4px; border: solid #17140a; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }

/* ---------- Chips / badges ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
    background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--line);
    white-space: nowrap;
}
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.chip.ok { background: rgba(46, 204, 113, 0.12); color: #7ee2a8; border-color: rgba(46, 204, 113, 0.3); }
.chip.warn { background: rgba(243, 156, 18, 0.12); color: #f7c26b; border-color: rgba(243, 156, 18, 0.3); }
.chip.bad { background: rgba(231, 76, 60, 0.12); color: #ff8a80; border-color: rgba(231, 76, 60, 0.3); }
.chip.info { background: rgba(52, 152, 219, 0.12); color: #8cc8f2; border-color: rgba(52, 152, 219, 0.3); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge {
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
    background: var(--bad); color: #fff; font-size: 10px; font-weight: 800;
    display: inline-grid; place-items: center;
}

.empty { padding: 40px 20px; text-align: center; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg.i { width: 34px; height: 34px; opacity: 0.5; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.12); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 40px; }

/* ---------- Tables / lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-bottom: 1px solid var(--line);
    cursor: pointer; transition: background 0.12s;
}
.list-item:hover { background: rgba(255, 255, 255, 0.03); }
.list-item.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.list-item .t { font-weight: 600; font-size: 12.5px; }
.list-item .s { font-size: 11px; color: var(--muted); margin-top: 2px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
table.tbl th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); z-index: 1; }
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr.click { cursor: pointer; }
table.tbl tr.click:hover td { background: rgba(255, 255, 255, 0.03); }

.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card-title { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 12px; }
.kv > span:nth-child(odd) { color: var(--muted); }

.avatar { width: 36px; height: 36px; border-radius: 9px; background: var(--panel-3) center/cover no-repeat; display: grid; place-items: center; font-weight: 800; color: var(--accent); flex-shrink: 0; border: 1px solid var(--line-2); font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; border-radius: 14px; font-size: 22px; }
.photo { background: #000 center/cover no-repeat; border-radius: 8px; }

/* ---------- Markdown ---------- */
.md { line-height: 1.6; font-size: 13px; user-select: text; word-wrap: break-word; }
.md h1 { font-size: 20px; margin: 4px 0 10px; }
.md h2 { font-size: 15px; margin: 14px 0 6px; color: var(--accent); }
.md h3 { font-size: 13.5px; margin: 10px 0 4px; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px 20px; }
.md ol li { margin-bottom: 3px; }
.help-md { max-width: 760px; font-size: 13.5px; }
.help-md h1 { color: var(--accent); }
.help-md p, .help-md li { color: #cfd6de; }
.md li.task { list-style: none; margin-left: -18px; }
.md li.task::before { content: '☐ '; color: var(--muted); }
.md li.task.done::before { content: '☑ '; color: var(--ok); }
.md li.task.done { color: var(--muted); text-decoration: line-through; }
.md blockquote { border-left: 3px solid var(--accent); padding: 4px 12px; color: var(--muted); margin: 6px 0 10px; background: rgba(255, 255, 255, 0.02); }
.md hr { border: none; border-top: 1px solid var(--line-2); margin: 12px 0; }
.md code { font-family: var(--mono); background: rgba(255, 255, 255, 0.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
