/* Kx Crosshair Studio — mesma linguagem do painel: cromo, carmesim e chanfro.
   O preview é a peça central; propriedades à esquerda, biblioteca à direita,
   estado do FiveM e ações no rodapé. */

/* =========================================================
   Abas do app (barra de título)
   ========================================================= */
.app-tabs { display: flex; gap: 3px; margin-left: 6px; padding: 3px; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .025); -webkit-app-region: no-drag; }
.app-tab { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; border: 0; background: transparent; color: #6c6c78; font-family: var(--display); font-size: 9.5px; font-weight: 700; letter-spacing: 1.5px; white-space: nowrap; transition: color .22s ease, background .22s ease, box-shadow .22s ease; }
.app-tab svg { width: 13px; height: 13px; }
.app-tab:hover { color: #d0d0da; background: rgba(255, 255, 255, .04); }
.app-tab.active { color: #fff; background: linear-gradient(180deg, rgba(255, 37, 64, .26), rgba(255, 37, 64, .08)); box-shadow: inset 0 -2px var(--red), 0 0 16px rgba(255, 37, 64, .1); }
.app-tab.active svg { color: var(--red-soft); }
.app-tab:focus-visible { outline: 1px solid var(--red-soft); outline-offset: -2px; }

/* =========================================================
   Estrutura
   ========================================================= */
.studio { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.cs-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 270px; grid-template-rows: minmax(0, 1fr); gap: 12px; }
.cs-panel { min-width: 0; min-height: 0; padding: 1px; background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03) 45%, rgba(255, 255, 255, .05)); animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.cs-right { animation-delay: .08s; }
.cs-panel-body { height: 100%; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(175deg, rgba(255, 37, 64, .05), rgba(10, 10, 14, .97) 30%), var(--carbon); }
.cs-spacer { flex-grow: 1; }
.cs-props, .cs-list { scrollbar-width: thin; scrollbar-color: #3f111a transparent; }

/* ---- marca ---- */
.cs-brand { flex-shrink: 0; display: flex; align-items: center; gap: 11px; padding: 14px 16px 12px; }
.cs-brand-mark { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 37, 64, .36); background: radial-gradient(circle, rgba(255, 37, 64, .22), rgba(255, 37, 64, .06)); color: var(--red-soft); }
.cs-brand-mark svg { width: 17px; height: 17px; }
.cs-brand small { display: block; font-family: var(--display); font-size: 9px; font-weight: 800; letter-spacing: 2.4px; color: var(--red-mid); }
.cs-brand strong { display: block; margin-top: 3px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .2px; color: #e9e9f0; white-space: nowrap; }
.cs-brand em { font-style: normal; color: var(--red-soft); }

/* ---- abas de propriedades ---- */
.cs-tabs { flex-shrink: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0 14px; padding: 3px; border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .025); }
.cs-tab { height: 28px; border: 0; background: transparent; color: #676773; font-family: var(--display); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.cs-tab:hover { color: #c8c8d2; background: rgba(255, 255, 255, .035); }
.cs-tab.active { color: #fff; background: linear-gradient(180deg, rgba(255, 37, 64, .24), rgba(255, 37, 64, .08)); box-shadow: inset 0 -2px var(--red); }
.cs-tab:focus-visible { outline: 1px solid var(--red-soft); outline-offset: -2px; }
.cs-props { flex: 1 1 auto; min-height: 0; overflow: hidden auto; padding: 6px 14px 16px; }
.cs-pane { animation: fade-in .22s ease both; }

/* ---- linhas de propriedade ---- */
.cs-row { padding: 9px 2px 9px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.cs-row-head { display: flex; align-items: center; gap: 7px; min-height: 24px; }
.cs-label { flex: 1 1 auto; min-width: 0; overflow: hidden; line-height: 1.5; font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .5px; color: #b6b6c2; text-overflow: ellipsis; white-space: nowrap; }
.cs-tag { flex-shrink: 0; padding: 2px 5px; border: 1px solid rgba(255, 176, 32, .38); background: rgba(255, 176, 32, .07); font-family: var(--display); font-size: 7.5px; font-weight: 800; letter-spacing: 1px; color: var(--amber-soft); cursor: help; }
.cs-row-tools { flex-shrink: 0; display: flex; align-items: center; gap: 3px; }
.cs-num-wrap { display: flex; align-items: center; width: 64px; height: 24px; padding: 1px; background: var(--hair-2); transition: background .2s ease; }
.cs-num-wrap:focus-within { background: rgba(255, 37, 64, .65); }
.cs-num-wrap input { width: 100%; min-width: 0; height: 100%; padding: 0 7px; border: 0; outline: 0; background: #0f0f14; color: #ececf1; font-family: var(--mono); font-size: 11px; font-weight: 700; text-align: right; user-select: text; -webkit-user-select: text; cursor: text; }
.cs-num-wrap i { flex-shrink: 0; align-self: stretch; display: grid; place-items: center; padding: 0 5px 0 0; background: #0f0f14; font-family: var(--mono); font-size: 9.5px; font-style: normal; color: var(--dim); }
.cs-hex-wrap { width: 82px; }
.cs-hex-wrap i { order: -1; padding: 0 0 0 7px; }
.cs-hex-wrap input { text-align: left; padding-left: 2px; text-transform: uppercase; }
.cs-row.mixed .cs-num-wrap input, .cs-row.mixed .cs-hex { color: var(--amber-soft); }
.cs-reset, .cs-link { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: #8a8a96; transition: color .2s ease, opacity .2s ease, transform .2s ease; }
.cs-reset svg, .cs-link svg { width: 13px; height: 13px; }
.cs-reset:hover { color: #fff; transform: rotate(-35deg); }
.cs-reset.idle { opacity: .18; pointer-events: none; }
.cs-link { color: var(--amber-soft); }
.cs-link.linked { color: #5d5d69; }
.cs-link:hover { color: #fff; }
.cs-range { display: block; width: 100%; margin-top: 6px; }
.cs-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.cs-toggle .switch { transform: scale(.86); transform-origin: right center; }
.cs-segment .cs-seg { margin-top: 7px; }
.cs-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .025); }
.cs-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 28px; padding: 0 6px; border: 0; background: transparent; color: #757581; font-family: var(--display); font-size: 9px; font-weight: 700; letter-spacing: .9px; white-space: nowrap; text-transform: uppercase; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.cs-seg button svg { flex-shrink: 0; width: 12px; height: 12px; }
/* overflow: hidden recorta o acento das maiúsculas (Á, Ó, Ã) com a altura de linha da Oxanium. */
.cs-seg button span { overflow: hidden; line-height: 1.7; text-overflow: ellipsis; }
.cs-seg button:hover { color: #d2d2dc; background: rgba(255, 255, 255, .04); }
.cs-seg button.active { color: #fff; background: linear-gradient(180deg, rgba(255, 37, 64, .26), rgba(255, 37, 64, .09)); box-shadow: inset 0 -2px var(--red); }
.cs-seg button:focus-visible { outline: 1px solid var(--red-soft); outline-offset: -2px; }
.cs-seg-wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.cs-heading { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; }
.cs-heading span { font-family: var(--display); font-size: 9px; font-weight: 800; letter-spacing: 2.2px; color: var(--red-mid); text-transform: uppercase; white-space: nowrap; }
.cs-heading i { flex-grow: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 37, 64, .38), transparent); }
.cs-heading:first-child { margin-top: 6px; }
.cs-note { margin: 10px 0 2px; padding: 9px 11px; border-left: 2px solid rgba(255, 176, 32, .5); background: rgba(255, 176, 32, .05); font-size: 11px; line-height: 1.5; color: #a6927a; }

/* ---- cor ---- */
.cs-swatch { width: 28px; height: 24px; padding: 2px; border: 0; background: var(--hair-2); transition: background .2s ease; }
.cs-swatch i { display: block; width: 100%; height: 100%; background: var(--swatch, #fff); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.cs-swatch:hover, .cs-swatch.open { background: var(--red); }

/* ---- seletor de linhas ---- */
.cs-linepick { display: flex; align-items: center; gap: 14px; padding: 10px 2px 12px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.cs-linepick-svg { flex-shrink: 0; width: 92px; height: 92px; fill: none; stroke: none; }
.cs-linepick-svg .arm { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .16); stroke-width: 1; cursor: pointer; transition: fill .2s ease, stroke .2s ease; }
.cs-linepick-svg .arm:hover { fill: rgba(255, 255, 255, .14); }
.cs-linepick-svg .arm.custom { stroke: var(--amber); }
.cs-linepick-svg .arm.off { fill: transparent; stroke-dasharray: 3 3; opacity: .5; }
.cs-linepick-svg .arm.selected { fill: rgba(255, 37, 64, .45); stroke: var(--red); }
.cs-linepick-svg .arm:focus-visible { outline: none; stroke: #fff; stroke-width: 2; }
.cs-linepick-svg .core { fill: rgba(255, 255, 255, .35); }
.cs-linepick-side { flex: 1 1 auto; min-width: 0; }
.cs-linepick-side .cs-label { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--dim); }
.cs-linepick-side strong { display: block; margin: 3px 0 9px; font-family: var(--display); font-size: 13px; font-weight: 600; color: #e6e6ee; }
.cs-linepick-side .cs-seg button { height: 26px; font-size: 8.5px; }

/* =========================================================
   Centro: preview
   ========================================================= */
.cs-center { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; animation: rise .5s cubic-bezier(.2, .8, .2, 1) .04s both; }
.cs-toolbar { flex-shrink: 0; display: flex; align-items: center; gap: 10px; height: 34px; }
.cs-group { display: flex; align-items: center; gap: 4px; }
.cs-toolbar-label { margin-left: auto; font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--dim); }
.cs-icon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; min-width: 30px; padding: 0 8px; border: 1px solid var(--hair-2); background: linear-gradient(180deg, #17171d, #101015); color: #b7b7c2; font-family: var(--display); font-size: 9px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.cs-icon svg { width: 14px; height: 14px; }
.cs-icon:hover:enabled { border-color: rgba(255, 37, 64, .55); color: #fff; transform: translateY(-1px); }
.cs-icon:disabled { opacity: .3; }
.cs-icon.on { border-color: rgba(255, 37, 64, .6); color: var(--red-soft); background: linear-gradient(180deg, rgba(255, 37, 64, .2), rgba(255, 37, 64, .07)); }
.cs-bgs { display: flex; gap: 5px; min-width: 0; }
.cs-bg { position: relative; flex-shrink: 0; width: 42px; height: 27px; padding: 2px; border: 0; background: var(--hair-2); transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.cs-bg canvas { display: block; width: 100%; height: 100%; }
.cs-bg svg { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; transform: translate(-50%, -50%); color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.cs-bg.empty { background: repeating-linear-gradient(135deg, #1a1a21 0 4px, #121217 4px 8px); }
.cs-bg.empty canvas { opacity: 0; }
.cs-bg:not(.empty) svg { opacity: 0; transition: opacity .2s ease; }
.cs-bg:not(.empty):hover svg { opacity: 1; }
.cs-bg:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .3); }
.cs-bg.active { background: var(--red); box-shadow: 0 0 14px rgba(255, 37, 64, .4); }

.cs-stage { position: relative; flex: 1 1 auto; min-height: 0; padding: 1px; overflow: hidden; background: linear-gradient(150deg, rgba(255, 37, 64, .6), rgba(255, 255, 255, .08) 38%, rgba(255, 255, 255, .04)); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.cs-stage canvas { display: block; width: 100%; height: 100%; background: #000; clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px); cursor: crosshair; }
.cs-corner { position: absolute; z-index: 1; width: 16px; height: 16px; border: 0 solid rgba(255, 37, 64, .75); pointer-events: none; }
.cs-corner.tl { left: 26px; top: 10px; border-top-width: 2px; border-left-width: 2px; }
.cs-corner.tr { right: 10px; top: 10px; border-top-width: 2px; border-right-width: 2px; }
.cs-corner.bl { left: 10px; bottom: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.cs-corner.br { right: 26px; bottom: 10px; border-bottom-width: 2px; border-right-width: 2px; }
.cs-hud { position: absolute; z-index: 2; display: flex; align-items: center; gap: 6px; }
.cs-hud-tl { left: 50px; top: 12px; }
.cs-hud-tr { right: 34px; top: 12px; }
.cs-hud-bl { left: 34px; bottom: 12px; }
.cs-hud-br { right: 50px; bottom: 12px; }
.cs-hud .cs-icon, .cs-view, .cs-select, .cs-zoom, .cs-compat-badge, .cs-compare-side { background: rgba(8, 8, 11, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cs-view { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--hair-2); }
.cs-view button { height: 24px; padding: 0 10px; border: 0; background: transparent; color: #757581; font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: 1.3px; transition: color .2s ease, background .2s ease; }
.cs-view button:hover { color: #e0e0ea; }
.cs-view button.active { color: #fff; background: linear-gradient(180deg, rgba(255, 37, 64, .3), rgba(255, 37, 64, .1)); box-shadow: inset 0 -2px var(--red); }
.cs-select { position: relative; display: block; border: 1px solid var(--hair-2); }
.cs-select::after { content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid #9a9aa6; border-bottom: 1.5px solid #9a9aa6; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.cs-select select, .cs-compare-side select { height: 26px; padding: 0 24px 0 10px; border: 0; outline: 0; background: transparent; color: #d8d8e2; font-family: var(--mono); font-size: 10px; font-weight: 700; cursor: pointer; -webkit-appearance: none; appearance: none; }
.cs-select select option, .cs-compare-side select option { background: #121217; color: #e4e4ec; }
.cs-select:focus-within { border-color: rgba(255, 37, 64, .6); }
.cs-zoom { display: flex; align-items: center; height: 28px; border: 1px solid var(--hair-2); }
.cs-zoom button { display: grid; place-items: center; width: 26px; height: 100%; padding: 0; border: 0; background: transparent; color: #b0b0bc; }
.cs-zoom button svg { width: 12px; height: 12px; }
.cs-zoom button:hover:enabled { color: #fff; background: rgba(255, 37, 64, .16); }
.cs-zoom button:disabled { opacity: .3; cursor: not-allowed; }
#cs-zoom-label { min-width: 32px; text-align: center; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #e4e4ec; }
.cs-compat-badge { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border: 1px solid rgba(255, 176, 32, .5); color: var(--amber-soft); font-family: var(--display); font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; white-space: nowrap; transition: border-color .2s ease, transform .2s ease; }
.cs-compat-badge svg { width: 14px; height: 14px; }
.cs-compat-badge.exact { border-color: rgba(255, 37, 64, .5); color: var(--red-soft); }
.cs-compat-badge:hover { transform: translateY(-1px); border-color: #fff; }
.cs-caption { position: absolute; z-index: 1; left: 50%; bottom: 16px; padding: 4px 9px; transform: translateX(-50%); background: rgba(0, 0, 0, .5); font-family: var(--mono); font-size: 9.5px; color: rgba(255, 255, 255, .6); white-space: nowrap; pointer-events: none; }
.cs-compare-bar { position: absolute; z-index: 2; left: 14px; right: 14px; top: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; animation: fade-in .25s ease both; }
.cs-compare-side { justify-self: center; display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 3px 3px 3px 10px; border: 1px solid var(--hair-2); }
.cs-compare-side b { font-family: var(--display); font-size: 12px; font-weight: 800; color: var(--red-soft); }
.cs-compare-side select { min-width: 0; max-width: 150px; text-overflow: ellipsis; }
.cs-compare-side .gbtn { height: 24px; padding: 0 8px; font-size: 8.5px; letter-spacing: .8px; }
.cs-compare-bar > .cs-icon { background: rgba(8, 8, 11, .78); }
.cs-stage:has(.cs-compare-bar:not([hidden])) .cs-caption { display: none; }

.cs-bottom { flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 36px; }
.cs-bottom .gbtn, .cs-footer .gbtn, .cs-list-foot .gbtn { white-space: nowrap; }
.cs-bottom .gbtn { height: 34px; padding: 0 12px; font-size: 9.5px; letter-spacing: .9px; }
.short { display: none; }
.cs-code { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 2px 0 12px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .03); }
.cs-code-label { flex-shrink: 0; font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: 1.8px; color: var(--dim); }
.cs-code-value { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 0; border: 0; background: transparent; color: #e9e9ef; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-align: left; text-overflow: ellipsis; white-space: nowrap; transition: color .2s ease; }
.cs-code-value:hover { color: var(--red-soft); }
.cs-code .cs-icon { height: 28px; min-width: 28px; }

/* =========================================================
   Direita: presets
   ========================================================= */
.cs-presets-head { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 14px 14px 10px; }
.cs-presets-head > div { flex-grow: 1; min-width: 0; }
.cs-presets-head small { display: block; font-family: var(--display); font-size: 8.5px; font-weight: 800; letter-spacing: 2.2px; color: var(--red-mid); }
.cs-presets-head strong { display: block; margin-top: 2px; font-family: var(--display); font-size: 17px; font-weight: 600; }
.cs-save { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 0; background: linear-gradient(180deg, var(--red), var(--red-deep)); box-shadow: 0 8px 20px rgba(160, 8, 30, .35), inset 0 1px rgba(255, 255, 255, .25); color: #fff; font-family: var(--display); font-size: 9.5px; font-weight: 700; letter-spacing: 1px; transition: filter .2s ease, transform .2s ease; }
.cs-save svg { position: relative; z-index: 5; width: 13px; height: 13px; }
.cs-save span { position: relative; z-index: 5; }
.cs-save:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cs-save.attention { animation: cs-attention 2.2s ease-in-out infinite; }
.cs-current { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin: 0 14px 8px; padding: 7px 10px; border: 1px solid rgba(255, 37, 64, .22); background: rgba(255, 37, 64, .07); }
.cs-current span { flex-shrink: 0; font-family: var(--display); font-size: 7.5px; font-weight: 800; letter-spacing: 1.6px; color: var(--dim); }
.cs-current strong { flex: 1 1 auto; min-width: 0; overflow: hidden; line-height: 1.5; font-family: var(--display); font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cs-current em { flex-shrink: 0; font-family: var(--display); font-size: 7.5px; font-style: normal; font-weight: 800; letter-spacing: 1.2px; color: var(--red-soft); }
.cs-current.modified { border-color: rgba(255, 176, 32, .3); background: rgba(255, 176, 32, .06); }
.cs-current.modified em { color: var(--amber-soft); }
.cs-search { flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 32px; margin: 0 14px; padding: 0 10px; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .03); cursor: text; transition: border-color .2s ease; }
.cs-search:focus-within { border-color: rgba(255, 37, 64, .55); }
.cs-search svg { flex-shrink: 0; width: 14px; height: 14px; color: #6a6a76; }
.cs-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: #eeeef3; font-family: var(--body); font-size: 12px; user-select: text; -webkit-user-select: text; }
.cs-search input::placeholder { color: #50505c; }
.cs-search input::-webkit-search-cancel-button { filter: invert(.6); cursor: pointer; }
.cs-cats { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 14px 8px; }
.cs-cat { height: 22px; padding: 0 8px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .025); color: #777784; font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.cs-cat:hover { color: #d8d8e2; border-color: var(--hair-2); }
.cs-cat.active { border-color: rgba(255, 37, 64, .5); background: rgba(255, 37, 64, .14); color: #ffb1bc; }
.cs-list { flex: 1 1 auto; min-height: 0; overflow: hidden auto; display: flex; flex-direction: column; gap: 6px; padding: 2px 10px 10px 14px; }
.cs-preset { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 4px 6px 6px; border: 1px solid rgba(255, 255, 255, .06); background: linear-gradient(180deg, #15151b, #0f0f14); cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; animation: fade-in .25s ease both; }
.cs-preset:hover { border-color: rgba(255, 255, 255, .15); background: #18181f; transform: translateX(2px); }
.cs-preset:focus-visible { outline: 1px solid var(--red-soft); outline-offset: -1px; }
.cs-preset.active { border-color: rgba(255, 37, 64, .55); background: linear-gradient(110deg, rgba(255, 37, 64, .17), #111116 62%); box-shadow: inset 2px 0 var(--red); }
.cs-thumb-wrap { position: relative; flex-shrink: 0; display: block; }
.cs-thumb { flex-shrink: 0; display: block; width: 42px; height: 42px; }
.cs-thumb.big { width: 64px; height: 64px; }
.cs-preset-text { flex: 1 1 auto; min-width: 0; }
.cs-preset-text strong { display: block; overflow: hidden; line-height: 1.45; font-family: var(--display); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cs-preset-text small { display: block; margin-top: 3px; overflow: hidden; font-family: var(--mono); font-size: 9px; color: #6f6f7c; text-overflow: ellipsis; white-space: nowrap; }
.cs-badge { position: absolute; left: 0; bottom: 0; display: none; padding: 1px 3px; background: linear-gradient(180deg, var(--red), var(--red-deep)); font-family: var(--display); font-size: 6.5px; font-weight: 800; letter-spacing: .8px; line-height: 1.3; color: #fff; }
.cs-preset.official .cs-badge { display: block; }
.cs-mod { display: none; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px rgba(255, 176, 32, .7); }
.cs-preset.modified .cs-mod { display: block; }
.cs-star, .cs-more { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 26px; padding: 0; border: 0; background: transparent; color: #55555f; transition: color .2s ease, transform .2s ease; }
.cs-star svg, .cs-more svg { width: 14px; height: 14px; }
.cs-more svg { stroke-width: 3; }
.cs-star:hover, .cs-more:hover { color: #fff; transform: scale(1.1); }
.cs-star.on { color: var(--amber); }
.cs-star.on svg { fill: currentColor; }
.cs-empty { margin: 18px 8px; font-size: 11.5px; line-height: 1.55; color: #6f6f7c; text-align: center; }
.cs-list-foot { flex-shrink: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 10px 14px 14px; border-top: 1px solid var(--hair); }
.cs-list-foot .gbtn { min-width: 0; height: 30px; padding: 0 4px; font-size: 8.5px; letter-spacing: .6px; }
.cs-list-foot .gbtn svg { flex-shrink: 0; width: 12px; height: 12px; }

/* =========================================================
   Rodapé: FiveM, sincronização e ações
   ========================================================= */
.cs-footer { flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 8px 0 10px; border: 1px solid rgba(255, 255, 255, .07); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); animation: rise .5s cubic-bezier(.2, .8, .2, 1) .12s both; }
.cs-pill { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 11px; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .03); color: #b9b9c4; font-family: var(--body); font-size: 11.5px; white-space: nowrap; transition: border-color .3s ease, background .3s ease, color .3s ease; }
button.cs-pill:hover { border-color: rgba(255, 255, 255, .25); }
.cs-pill i { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.cs-pill-label { flex-shrink: 0; font-family: var(--display); font-size: 8.5px; font-weight: 800; letter-spacing: 1.6px; color: var(--dim); }
.cs-pill span:last-child { min-width: 0; overflow: hidden; line-height: 1.5; text-overflow: ellipsis; }
.cs-pill[data-state="ok"], .cs-pill[data-state="live"] { border-color: rgba(255, 37, 64, .36); background: linear-gradient(180deg, rgba(255, 37, 64, .12), rgba(255, 37, 64, .04)); color: var(--red-soft); }
.cs-pill[data-state="ok"] i { background: var(--red); animation: led 2.4s ease-in-out infinite; }
.cs-pill[data-state="live"] i { background: var(--red); animation: led 1.1s ease-in-out infinite; }
.cs-pill[data-state="warn"] { border-color: rgba(255, 176, 32, .45); background: rgba(255, 176, 32, .08); color: var(--amber-soft); }
.cs-pill[data-state="warn"] i { background: var(--amber); }
.cs-pill[data-state="bad"] { border-color: rgba(255, 37, 64, .5); background: rgba(255, 37, 64, .1); color: #ff8b9b; }
.cs-pill[data-state="bad"] i { background: var(--red); }
.cs-pill[data-state="busy"] i { background: transparent; border: 1.5px solid var(--red); border-right-color: transparent; animation: spin .85s linear infinite; }
.cs-live { flex-shrink: 0; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 3px 0 11px; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .03); cursor: pointer; transition: border-color .3s ease, background .3s ease; }
.cs-live > span:first-child { font-family: var(--display); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; color: #8c8c98; white-space: nowrap; }
.cs-live.on { border-color: rgba(255, 37, 64, .45); background: rgba(255, 37, 64, .08); }
.cs-live.on > span:first-child { color: var(--red-soft); }
.cs-live .switch { transform: scale(.8); }
.cs-live:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.cs-footer .gbtn { flex-shrink: 0; height: 34px; padding: 0 12px; font-size: 9.5px; letter-spacing: .8px; }
.cs-apply { position: relative; overflow: hidden; flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 18px 0 20px; border: 0; background: linear-gradient(180deg, var(--red), var(--red-deep)); box-shadow: 0 10px 26px rgba(160, 8, 30, .42), inset 0 1px rgba(255, 255, 255, .28); color: #fff; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; white-space: nowrap; transition: transform .22s cubic-bezier(.2, .8, .2, 1), filter .22s ease; }
.cs-apply span, .cs-apply svg { position: relative; z-index: 5; }
.cs-apply svg { width: 16px; height: 16px; }
.cs-apply::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent); animation: sheen 4.4s cubic-bezier(.35, .7, .4, 1) infinite; }
.cs-apply:hover:enabled { transform: translateY(-2px); filter: brightness(1.1); }
.cs-apply:active:enabled { transform: translateY(1px); }
.cs-apply:disabled { background: #17171d; box-shadow: inset 0 0 0 1px var(--hair); color: var(--dim); }
.cs-apply:disabled::after { animation: none; }
.cs-apply.busy svg { animation: cs-nudge .7s ease-in-out infinite; }

/* =========================================================
   Camadas: popovers, diálogos, dicas, tela cheia
   ========================================================= */
.cs-popover { position: fixed; z-index: 45; padding: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(14, 14, 19, .98); box-shadow: 0 22px 60px rgba(0, 0, 0, .65), 0 0 40px rgba(255, 37, 64, .06); animation: cs-pop .16s ease both; -webkit-app-region: no-drag; }
.cs-colorpop { width: 240px; }
.cs-sv { position: relative; height: 128px; cursor: crosshair; touch-action: none; }
.cs-sv canvas { display: block; width: 100%; height: 100%; }
.cs-sv-thumb { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.cs-hue { display: block; width: 100%; height: 12px; margin: 11px 0 10px; border-radius: 2px; background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); -webkit-appearance: none; appearance: none; cursor: pointer; }
.cs-hue::-webkit-slider-thumb { width: 8px; height: 18px; border: 2px solid #fff; border-radius: 2px; background: transparent; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); -webkit-appearance: none; appearance: none; }
.cs-hue:focus { outline: 0; }
.cs-hue:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; }
.cs-color-fields { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 5px; }
.cs-cf span { display: block; margin-bottom: 3px; font-family: var(--display); font-size: 7.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--dim); }
.cs-cf input { width: 100%; height: 26px; padding: 0 6px; border: 1px solid var(--hair-2); outline: 0; background: #0d0d12; color: #eeeef3; font-family: var(--mono); font-size: 10.5px; user-select: text; -webkit-user-select: text; }
.cs-cf input:focus { border-color: rgba(255, 37, 64, .6); }
.cs-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
.cs-sw { height: 20px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); background: var(--swatch); transition: transform .15s ease, border-color .15s ease; }
.cs-sw:hover { transform: scale(1.12); border-color: #fff; }
.cs-recent-head { margin-top: 11px; font-family: var(--display); font-size: 7.5px; font-weight: 800; letter-spacing: 1.6px; color: var(--dim); }
.cs-recent { margin-top: 6px; }
.cs-menu { width: 226px; padding: 5px; }
.cs-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: 0; background: transparent; color: #c8c8d2; font-family: var(--body); font-size: 12px; text-align: left; transition: background .15s ease, color .15s ease; }
.cs-menu button svg { flex-shrink: 0; width: 14px; height: 14px; color: #7c7c88; }
.cs-menu button:hover:enabled, .cs-menu button:focus-visible { outline: 0; background: rgba(255, 37, 64, .13); color: #fff; }
.cs-menu button:hover:enabled svg, .cs-menu button:focus-visible svg { color: var(--red-soft); }
.cs-menu button.danger, .cs-menu button.danger svg { color: #ff8b9b; }
.cs-menu button:disabled { opacity: .32; }
.cs-menu-sep { display: block; height: 1px; margin: 4px 6px; background: var(--hair); }
.cs-compatpop { width: 340px; max-height: min(460px, 70vh); overflow: auto; scrollbar-width: thin; }
.cs-compat-head { display: flex; align-items: center; gap: 10px; }
.cs-compat-head > span { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255, 37, 64, .34); background: rgba(255, 37, 64, .12); color: var(--red-soft); }
.cs-compat-head svg { width: 16px; height: 16px; }
.cs-compat-head small { display: block; font-family: var(--display); font-size: 7.5px; font-weight: 800; letter-spacing: 1.8px; color: var(--red-mid); }
.cs-compat-head strong { display: block; margin-top: 2px; font-family: var(--display); font-size: 14px; font-weight: 600; }
.cs-compat-list { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.cs-compat-list li { display: flex; gap: 10px; padding: 9px 10px; border-left: 2px solid var(--hair-2); background: rgba(255, 255, 255, .025); }
.cs-compat-list li > svg { flex-shrink: 0; width: 15px; height: 15px; margin-top: 1px; }
.cs-compat-list strong { font-family: var(--display); font-size: 11.5px; font-weight: 600; }
.cs-compat-list p { margin: 3px 0 0; font-size: 11px; line-height: 1.5; color: #8d8d99; }
.cs-compat-list .lvl-approx { border-left-color: var(--amber); }
.cs-compat-list .lvl-approx > svg { color: var(--amber); }
.cs-compat-list .lvl-unsupported { border-left-color: var(--red); }
.cs-compat-list .lvl-unsupported > svg { color: var(--red-soft); }
.cs-compat-list .lvl-info > svg { color: #8d8d99; }
.cs-compat-list .lvl-ok { border-left-color: var(--red); }
.cs-compat-list .lvl-ok > svg { color: var(--red-soft); }
.cs-compat-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.cs-compat-foot .gbtn { height: 30px; padding: 0 12px; font-size: 9px; letter-spacing: .9px; }

.cs-modal { position: fixed; z-index: 55; inset: 0; display: grid; place-items: center; background: rgba(5, 5, 7, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in .2s ease both; -webkit-app-region: no-drag; }
.cs-modal-card { width: min(450px, calc(100% - 40px)); padding: 1px; background: linear-gradient(150deg, rgba(255, 37, 64, .85), rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .04)); box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 60px rgba(255, 37, 64, .08); animation: cs-modal-in .32s cubic-bezier(.2, .85, .2, 1) both; }
.cs-modal-body { max-height: calc(100vh - 80px); overflow: auto; padding: 20px 22px 18px; background: linear-gradient(170deg, rgba(255, 37, 64, .08), rgba(11, 11, 15, .99) 40%), #0b0b0f; scrollbar-width: thin; }
.cs-modal-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.cs-modal-head > div { flex-grow: 1; min-width: 0; }
.cs-modal-head small { display: block; font-family: var(--display); font-size: 8.5px; font-weight: 800; letter-spacing: 2.2px; color: var(--red-mid); }
.cs-modal-head strong { display: block; margin-top: 3px; font-family: var(--display); font-size: 19px; font-weight: 600; }
.cs-modal-text { margin: 0; font-size: 12.5px; line-height: 1.6; color: #a4a4b0; }
.cs-form { display: flex; flex-direction: column; gap: 13px; }
.cs-form > .gbtn { align-self: flex-start; height: 30px; padding: 0 12px; font-size: 9px; letter-spacing: .9px; }
.cs-field { display: block; }
.cs-field > span { display: block; margin-bottom: 7px; font-family: var(--display); font-size: 8.5px; font-weight: 800; letter-spacing: 1.8px; color: #7d7d89; }
.cs-input { display: block; width: 100%; height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); outline: 0; background: rgba(255, 255, 255, .035); color: #f4f4f7; font-family: var(--mono); font-size: 12px; user-select: text; -webkit-user-select: text; transition: border-color .2s ease, background .2s ease; }
.cs-input:focus { border-color: rgba(255, 37, 64, .6); background: rgba(255, 37, 64, .05); }
textarea.cs-input { height: auto; padding: 10px 12px; line-height: 1.5; resize: none; word-break: break-all; }
.cs-modal-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .03); }
.cs-modal-preview strong { display: block; font-family: var(--display); font-size: 12.5px; font-weight: 600; }
.cs-modal-preview small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; color: #8a8a96; }
.cs-code-status { font-size: 11.5px; color: #8d8d99; }
.cs-code-status.ok { color: var(--red-soft); }
.cs-code-status.bad { color: #ff8b9b; }
.cs-modal-error { margin-top: 12px; padding: 9px 11px; border-left: 2px solid var(--red); background: rgba(255, 37, 64, .1); font-size: 12px; color: #ffb0bb; }
.cs-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.cs-modal-actions .gbtn { height: 36px; padding: 0 16px; font-size: 10px; letter-spacing: 1px; }
.cs-primary { position: relative; overflow: hidden; height: 36px; padding: 0 18px; border: 0; background: linear-gradient(180deg, var(--red), var(--red-deep)); box-shadow: 0 10px 24px rgba(160, 8, 30, .35), inset 0 1px rgba(255, 255, 255, .25); color: #fff; font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; }
.cs-primary:hover:enabled { filter: brightness(1.1); }
.cs-primary:disabled { opacity: .5; cursor: wait; }
.cs-primary.danger { background: linear-gradient(180deg, #d81e37, #7e0718); }
body.cs-modal-open .cs-tip { display: none; }

.cs-tip { position: fixed; z-index: 65; max-width: 300px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(18, 18, 24, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); color: #d6d6df; font-size: 11px; line-height: 1.45; white-space: pre-line; pointer-events: none; animation: fade-in .12s ease both; -webkit-app-region: no-drag; }

.cs-fullscreen { position: fixed; z-index: 80; inset: 0; background: #000; -webkit-app-region: no-drag; }
.cs-fullscreen canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.cs-fs-hud { position: absolute; left: 50%; top: 18px; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(8, 8, 11, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transform: translateX(-50%); transition: opacity .4s ease, transform .4s ease; }
.cs-fs-hud strong { font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: 2.4px; color: #fff; white-space: nowrap; }
#cs-fs-info { font-family: var(--mono); font-size: 10.5px; color: #a9a9b5; white-space: nowrap; }
.cs-fs-bgs { display: flex; gap: 3px; }
.cs-fs-bg { height: 26px; padding: 0 9px; border: 1px solid var(--hair-2); background: transparent; color: #8d8d99; font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: .9px; white-space: nowrap; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.cs-fs-bg:hover { color: #fff; }
.cs-fs-bg.active { border-color: rgba(255, 37, 64, .6); background: rgba(255, 37, 64, .16); color: #ffb1bc; }
#cs-fs-exit { height: 30px; padding: 0 12px; font-size: 9.5px; letter-spacing: 1px; }
#cs-fs-exit kbd { margin-left: 4px; }
.cs-fs-help { position: absolute; left: 50%; bottom: 18px; margin: 0; padding: 7px 12px; background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .6); font-size: 11px; transform: translateX(-50%); transition: opacity .4s ease; white-space: nowrap; }
.cs-fullscreen.idle { cursor: none; }
.cs-fullscreen.idle .cs-fs-hud { opacity: 0; transform: translate(-50%, -14px); pointer-events: none; }
.cs-fullscreen.idle .cs-fs-help { opacity: 0; }
body.cs-fs { border-color: transparent; border-radius: 0; }
body.cs-fs main { border-radius: 0; }

@keyframes cs-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes cs-modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cs-attention { 0%, 100% { box-shadow: 0 8px 20px rgba(160, 8, 30, .35), inset 0 1px rgba(255, 255, 255, .25); } 50% { box-shadow: 0 8px 26px rgba(255, 37, 64, .6), 0 0 0 3px rgba(255, 37, 64, .18), inset 0 1px rgba(255, 255, 255, .25); } }
@keyframes cs-nudge { 50% { transform: translateX(4px); } }

/* =========================================================
   Janelas menores (a janela vai de 900×680 a 1300×820)
   ========================================================= */
@media (max-width: 1250px) {
  .cs-grid { grid-template-columns: 280px minmax(0, 1fr) 250px; gap: 10px; }
  .cs-pill-label { display: none; }
  .cs-footer .long, .cs-bottom .long { display: none; }
  .cs-footer .short, .cs-bottom .short { display: inline; }
  .cs-toolbar-label { display: none; }
  .cs-bgs { margin-left: auto; }
}
@media (max-width: 1100px) {
  .titlebar .wordmark { display: none; }
  .cs-grid { grid-template-columns: 262px minmax(0, 1fr) 232px; }
  .cs-hud-br .cs-icon span { display: none; }
  .cs-bg { width: 36px; height: 24px; }
  .cs-pill { max-width: 210px; }
  .cs-brand strong { font-size: 12px; }
  .cs-caption { display: none; }
  /* Cartões estreitos: "⋯" flutua no canto e aparece ao passar o mouse ou focar. */
  .cs-preset { gap: 8px; }
  .cs-thumb { width: 36px; height: 36px; }
  .cs-more { position: absolute; right: 2px; top: 2px; height: 22px; border-radius: 3px; background: rgba(12, 12, 16, .92); opacity: 0; transition: opacity .15s ease; }
  .cs-preset:hover .cs-more, .cs-preset:focus-within .cs-more, .cs-preset.active .cs-more { opacity: 1; }
  .cs-seg button { padding: 0 3px; letter-spacing: .4px; }
}
@media (max-width: 980px) {
  .studio { padding: 10px; }
  .cs-grid { grid-template-columns: 250px minmax(0, 1fr) 220px; gap: 8px; }
  .app-tab { padding: 0 9px; letter-spacing: 1.1px; }
  .cs-footer .gbtn span, .cs-bottom .gbtn span { display: none !important; }
  .cs-footer .gbtn, .cs-bottom .gbtn { padding: 0 10px; }
  .cs-pill { max-width: 180px; }
  .cs-bg { width: 30px; height: 22px; }
  .cs-hud-tl { left: 40px; }
  .cs-hud-tr { right: 24px; }
  .cs-select select { font-size: 9px; padding-right: 20px; }
  .cs-seg button { font-size: 8.5px; }
}
@media (max-height: 740px) {
  .cs-brand { padding: 11px 14px 9px; }
  .cs-row { padding: 7px 2px; }
  .cs-presets-head { padding: 11px 14px 8px; }
  .cs-cats { padding: 8px 14px 6px; }
  .cs-footer { height: 48px; }
}
