/* DRS Crafting
   Só fundos sólidos: no FiveM, sombras, filtros e animações com transform ficam com um retângulo preto.
   Solid backgrounds only: in FiveM, shadows, filters and transform animations render a black box. */
:root {
    --bg: rgb(11, 14, 16);
    --panel: rgb(15, 18, 21);
    --side: rgb(18, 22, 26);
    --card: rgb(23, 28, 33);
    --card-hover: rgb(29, 35, 41);
    --card-active: rgb(22, 44, 44);
    --tile: rgb(30, 36, 42);
    --line: rgb(37, 44, 51);
    --line-soft: rgb(29, 35, 41);
    --white: #f1f6f6;
    --text: #d2dbdc;
    --muted: #869497;
    --faint: #56656a;
    --accent: #2dd4bf;
    --accent-2: #5eead4;
    --accent-bg: rgb(16, 52, 50);
    --ok: #4ade80;
    --ok-bg: rgb(16, 46, 30);
    --bad: #f87171;
    --bad-bg: rgb(60, 22, 24);
    --warn: #fbbf24;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Manrope", "Segoe UI", sans-serif; }
html, body { width: 100vw; height: 100vh; overflow: hidden; background: transparent; color: var(--text); user-select: none; }
body { display: grid; place-items: center; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: var(--white); }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.mono { font-family: var(--mono); }

.app {
    width: min(1140px, 94vw); height: min(720px, 88vh);
    display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
    overflow: hidden;
}

/* ------------------------------------------------------------------ top */
.top { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.logo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: var(--accent-bg); flex-shrink: 0; }
.logo svg { width: 24px; height: 24px; }
h1 { font-size: 18px; font-weight: 800; color: var(--white); line-height: 1.2; }
.brand p { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.level { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 14px; background: var(--side); border: 1px solid var(--line-soft); }
.level-badge { width: 48px; height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--accent-bg); }
.level-badge span { font-size: 8.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.level-badge strong { font: 700 18px/1.1 var(--mono); color: var(--white); }
.level-bar { width: 220px; }
.level-top { display: flex; justify-content: space-between; margin-bottom: 6px; font: 600 11px var(--mono); color: var(--muted); }
.bar { height: 7px; border-radius: 7px; background: var(--card-hover); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: var(--accent); transition: width 0.3s ease; }

.icon-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: var(--side); border: 1px solid var(--line-soft); }
.icon-btn:hover { color: var(--white); background: var(--card-hover); }
.icon-btn svg { width: 17px; height: 17px; }

/* ------------------------------------------------------------------ side list */
.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px 1fr; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--side); border-right: 1px solid var(--line); }
.side-tools { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 0; bottom: 0; margin: auto 0; width: 15px; height: 15px; color: var(--faint); }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; font-size: 13px; background: var(--card); border: 1px solid var(--line-soft); outline: none; }
.search input:focus { border-color: var(--accent); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 11px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line-soft); }
.chip:hover { color: var(--white); }
.chip.on { color: var(--white); border-color: var(--accent); background: var(--accent-bg); }

.list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 13px; background: var(--card); border: 1px solid transparent; text-align: left; }
.item:hover { background: var(--card-hover); }
.item.on { background: var(--card-active); border-color: rgb(34, 100, 94); }
.item.locked { opacity: 0.55; }
.thumb { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: var(--tile); flex-shrink: 0; overflow: hidden; }
.thumb img { width: 80%; height: 80%; object-fit: contain; }
.thumb svg { width: 22px; height: 22px; color: var(--faint); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-name { font-size: 13.5px; font-weight: 800; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font: 600 11px var(--mono); color: var(--faint); }
.state { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.state.ok { background: var(--ok); }
.lock { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; color: var(--warn); background: rgb(52, 40, 14); white-space: nowrap; }
.lock svg { width: 11px; height: 11px; }

.empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 12px; padding: 30px; text-align: center; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.empty svg { width: 46px; height: 46px; color: var(--line); }

/* ------------------------------------------------------------------ detail */
.detail { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; overflow-y: auto; padding: 24px 26px; display: flex; flex-direction: column; gap: 22px; }
.hero { display: flex; gap: 18px; align-items: center; }
.hero .thumb { width: 104px; height: 104px; border-radius: 20px; border: 1px solid var(--line); }
.hero h2 { font-size: 24px; font-weight: 800; color: var(--white); line-height: 1.15; }
.hero p { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.5; }
.gets { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--accent-bg); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-soft); }
.stat span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.stat strong { display: block; margin-top: 4px; font: 700 18px var(--mono); color: var(--white); }
.stat.bad strong { color: var(--bad); }

.section h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.section h3 small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--faint); }
.ings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ing { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-soft); }
.ing .thumb { width: 40px; height: 40px; border-radius: 10px; }
.ing-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.have { font: 700 12.5px var(--mono); padding: 3px 8px; border-radius: 7px; color: var(--ok); background: var(--ok-bg); white-space: nowrap; }
.have.no { color: var(--bad); background: var(--bad-bg); }

.foot { padding: 16px 26px 18px; border-top: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; gap: 14px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 38px; height: 40px; border-radius: 10px; font: 700 15px var(--mono); color: var(--text); background: var(--card); border: 1px solid var(--line-soft); }
.qty button:hover { color: var(--white); background: var(--card-hover); }
.qty button.max { width: auto; padding: 0 12px; font-size: 12px; }
.qty input { width: 60px; height: 40px; border-radius: 10px; text-align: center; font: 700 16px var(--mono); background: var(--card); border: 1px solid var(--line); outline: none; }
.qty input:focus { border-color: var(--accent); }
.total { display: flex; flex-direction: column; gap: 2px; margin-left: 6px; }
.total span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.total strong { font: 700 15px var(--mono); color: var(--white); }
.btn { margin-left: auto; height: 44px; padding: 0 26px; border-radius: 12px; display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; color: #032824; background: var(--accent); }
.btn:hover { background: var(--accent-2); }
.btn:disabled { cursor: not-allowed; color: var(--faint); background: var(--card); }
.btn svg { width: 17px; height: 17px; }
.btn.ghost { color: var(--text); background: var(--card); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--white); background: var(--card-hover); }

.progress { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.progress-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--white); }
.progress-top .mono { color: var(--accent); font-size: 12.5px; }
.progress .bar { height: 10px; }
.progress .bar i { transition: none; }

/* ------------------------------------------------------------------ mini bar / prompt */
.mini { position: fixed; left: 0; right: 0; bottom: 11vh; margin: 0 auto; width: 320px; padding: 11px 14px 13px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.mini-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; color: var(--white); }
.mini-top .mono { color: var(--accent); font-size: 12px; }
.mini .bar i { transition: none; }

.prompt { position: fixed; top: 50vh; right: 1.4vw; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--white); }
.prompt kbd { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font: 700 13px var(--mono); color: #032824; background: var(--accent); }
