/*
 * © 2026 Ael-Host — feito por Fakkwel. Todos os direitos reservados.
 * Proibida a cópia, revenda ou distribuição deste código sem autorização do autor.
 */
/* =========================================================
   Componentes reutilizáveis
   ========================================================= */

/* ---------- botões ---------- */
.btn {
  --b-bg: var(--raise-2); --b-fg: var(--text); --b-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .2s, border-color .2s, box-shadow .2s, opacity .2s; text-decoration: none !important; user-select: none;
}
.btn:hover { border-color: var(--line-2); background: color-mix(in oklab, var(--b-bg) 85%, var(--text) 8%); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: transparent; box-shadow: 0 6px 18px -8px var(--accent); }
.btn.primary:hover { background: color-mix(in oklab, var(--accent) 88%, white 12%); }
.btn.danger { --b-bg: color-mix(in oklab, var(--bad) 14%, transparent); --b-fg: var(--bad); --b-bd: color-mix(in oklab, var(--bad) 30%, transparent); }
.btn.danger:hover { background: color-mix(in oklab, var(--bad) 22%, transparent); }
.btn.ok { --b-bg: color-mix(in oklab, var(--ok) 14%, transparent); --b-fg: var(--ok); --b-bd: color-mix(in oklab, var(--ok) 30%, transparent); }
.btn.ghost { --b-bg: transparent; --b-bd: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raise-2); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: color-mix(in oklab, var(--bg) 55%, transparent); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.textarea.code, .input.code { font-family: var(--font-mono); font-size: 13px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-group > .input { padding-left: 36px; }
.input-group > .btn { position: absolute; right: 4px; height: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* interruptor */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--ease-out); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .txt b { display: block; font-weight: 600; font-size: 13.5px; }
.switch-row .txt span { font-size: 12.5px; color: var(--muted); }

/* controle segmentado */
.seg-ctl { display: inline-flex; padding: 3px; border-radius: calc(var(--r) + 2px); background: var(--raise-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg-ctl button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer; font-weight: 550; font-size: 12.5px; display: flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.seg-ctl button svg { width: 14px; height: 14px; }
.seg-ctl button:hover { color: var(--text); }
.seg-ctl button.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }

/* ---------- painéis ---------- */
.panel {
  background: var(--panel); backdrop-filter: blur(var(--blur));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: calc(var(--pad) + 4px);
}
.panel.flat { background: var(--raise); backdrop-filter: none; }
.panel.tight { padding: var(--pad); }
.panel.nopad { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { display: flex; align-items: center; gap: 8px; }
.panel-head h3 svg { width: 17px; height: 17px; color: var(--accent); }
.panel-head .grow { flex: 1; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.panel-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .t { flex: 1; min-width: 240px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head p { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }

.cols { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }
.sep { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* métricas (estatísticas em linha) */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); backdrop-filter: blur(var(--blur)); }
.metric { padding: 16px 18px; border-right: 1px solid var(--line); position: relative; min-width: 0; }
.metric:last-child { border-right: 0; }
.metric .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.metric .k svg { width: 14px; height: 14px; }
.metric .v { font: 650 26px/1.15 var(--font-display); margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric .d { font-size: 12px; color: var(--faint); margin-top: 2px; font-family: var(--font-mono); }
.metric.gold .v { color: var(--accent); }
@media (max-width: 700px) { .metric { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- selos / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--raise-2); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; }
.badge svg { width: 12px; height: 12px; }
.badge.ok { background: color-mix(in oklab, var(--ok) 14%, transparent); color: var(--ok); }
.badge.bad { background: color-mix(in oklab, var(--bad) 14%, transparent); color: var(--bad); }
.badge.warn { background: color-mix(in oklab, var(--warn) 16%, transparent); color: var(--warn); }
.badge.info { background: color-mix(in oklab, var(--info) 14%, transparent); color: var(--info); }
.badge.gold { background: var(--accent-soft); color: var(--accent); }
.badge.outline { background: transparent; border-color: var(--line-2); }
.badge.mono { font-family: var(--font-mono); font-weight: 500; }
.plan-badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: var(--pc, #888); }
.plan-badge svg { width: 11px; height: 11px; }

.dot-status { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.dot-status.online { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 25%, transparent); animation: pulse 2.2s infinite; color: var(--ok); }
.dot-status.connecting, .dot-status.reconnecting, .dot-status.qr, .dot-status.pairing { background: var(--warn); animation: blink 1s infinite; }
.dot-status.offline { background: var(--faint); }
@keyframes blink { 50% { opacity: .35 } }

.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--raise-2); display: inline-grid; place-items: center; flex: none; overflow: hidden; font-weight: 700; font-size: 13px; color: var(--accent-ink); background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 85%, white), var(--accent)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.square { border-radius: var(--r); }

/* ---------- lista / tabela ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); transition: background .15s; min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--raise); }
.list-row.click { cursor: pointer; }
.list-row .t { min-width: 0; flex: 1; }
.list-row .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .t span { font-size: 12.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

.table-wrap { overflow: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(var(--blur)); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; cursor: default; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--raise); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* chave/valor */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- abas ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; position: relative; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 550; font-size: 13px; cursor: pointer; white-space: nowrap; transition: color .2s; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); }
.tab .count { font: 500 11px var(--font-mono); background: var(--raise-2); padding: 1px 6px; border-radius: 10px; color: var(--muted); }
.tabs .ink { position: absolute; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; transition: left calc(.3s / var(--speed)) var(--ease-out), width calc(.3s / var(--speed)) var(--ease-out); }

/* ---------- vazio / carregando ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .ic svg { width: 30px; height: 30px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 46ch; margin: 0 auto 16px; }
.skel { background: linear-gradient(90deg, var(--raise-2) 25%, var(--line-2) 37%, var(--raise-2) 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; border-radius: var(--r-sm); min-height: 14px; }
@keyframes skel { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* barra de progresso */
.bar { height: 6px; border-radius: 6px; background: var(--raise-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease-out); }

/* ---------- avisos em linha ---------- */
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--raise); border: 1px solid var(--line); font-size: 13px; align-items: flex-start; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.gold { background: var(--accent-soft); border-color: var(--accent-line); }
.callout.gold svg { color: var(--accent); }
.callout.warn { background: color-mix(in oklab, var(--warn) 10%, transparent); border-color: color-mix(in oklab, var(--warn) 30%, transparent); }
.callout.warn svg { color: var(--warn); }
.callout.bad { background: color-mix(in oklab, var(--bad) 10%, transparent); border-color: color-mix(in oklab, var(--bad) 30%, transparent); }
.callout.bad svg { color: var(--bad); }
.callout.info svg { color: var(--info); }
.callout p:last-child { margin: 0; }

/* bloco de código */
pre.code { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow: auto; font-size: 12.5px; line-height: 1.6; margin: 0; }

/* ---------- notificações flutuantes ---------- */
#toasts { position: fixed; right: 18px; bottom: calc(var(--status) + 14px); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; width: min(380px, calc(100vw - 32px));
  padding: 12px 14px; border-radius: var(--r-lg); background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: toastIn calc(.4s / var(--speed)) var(--ease-out) both; position: relative; overflow: hidden;
}
.toast.out { animation: toastOut .3s var(--ease) both; }
.toast > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.success > svg { color: var(--ok); } .toast.error > svg { color: var(--bad); } .toast.warn > svg { color: var(--warn); } .toast.info > svg { color: var(--info); }
.toast b { display: block; font-size: 13.5px; }
.toast span { font-size: 12.5px; color: var(--muted); }
.toast .x { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.toast .life { position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; opacity: .35; animation: life linear both; }
.toast.success .life { color: var(--ok); } .toast.error .life { color: var(--bad); } .toast.warn .life { color: var(--warn); } .toast.info .life { color: var(--info); }
@keyframes life { from { width: 100% } to { width: 0 } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) } }
@media (max-width: 820px) { #toasts { bottom: calc(var(--navh, 58px) + 10px); right: 12px; left: 12px; align-items: stretch; } .toast { width: auto; } .toast .x { padding: 4px; margin: -4px -4px 0 auto; } }

/* ---------- balões de dica ---------- */
#tooltip {
  position: fixed; z-index: 2000; pointer-events: none; max-width: 280px;
  padding: 6px 10px; border-radius: 8px; font-size: 12px; line-height: 1.45;
  background: color-mix(in oklab, var(--panel-solid) 94%, var(--text) 6%); color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .15s, transform .15s;
}
#tooltip.on { opacity: 1; transform: none; }
#tooltip kbd { margin-left: 6px; }
#tooltip::after { content: ''; position: absolute; width: 8px; height: 8px; background: inherit; border: inherit; border-width: 0 1px 1px 0; transform: rotate(45deg); left: var(--ax, 50%); bottom: -5px; margin-left: -4px; }
#tooltip.below::after { bottom: auto; top: -5px; border-width: 1px 0 0 1px; }
#tooltip.side::after { display: none; }

/* ---------- janelas (modal) ---------- */
.modal-back { position: fixed; inset: 0; z-index: 900; background: rgba(5, 6, 15, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s both; }
.modal-back.out { animation: fadeOut .2s both; }
.modal { width: min(560px, 100%); min-width: 0; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: calc(var(--r-lg) + 4px); box-shadow: var(--shadow); animation: modalIn calc(.36s / var(--speed)) var(--ease-out) both; }
.modal.lg { width: min(860px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal-back.out .modal { animation: modalOut .2s both; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 18px; flex: 1; }
.modal-head .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.modal-head .ic svg { width: 19px; height: 19px; }
.modal-head .ic.bad { background: color-mix(in oklab, var(--bad) 14%, transparent); color: var(--bad); }
.modal-body { padding: 12px 20px; overflow: auto; }
.modal-body > p.muted { margin-top: -2px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 18px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0 } }
@keyframes fadeOut { to { opacity: 0 } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97) } to { opacity: 1; transform: none } }
@keyframes modalOut { to { opacity: 0; transform: translateY(10px) scale(.98) } }

/* ---------- paleta de comandos (Ctrl+K) ---------- */
.palette { width: min(640px, 100%); align-self: start; margin-top: 12vh; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: calc(var(--r-lg) + 2px); box-shadow: var(--shadow); overflow: hidden; animation: modalIn .25s var(--ease-out) both; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 18px; height: 18px; color: var(--muted); }
.palette-input input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; }
.palette-list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette-group { font-size: 11.5px; color: var(--faint); padding: 8px 10px 4px; font-weight: 600; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--text-2); }
.palette-item svg { width: 16px; height: 16px; color: var(--muted); }
.palette-item .h { margin-left: auto; font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.palette-item.on { background: var(--accent-soft); color: var(--text); }
.palette-item.on svg { color: var(--accent); }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }

/* ---------- menu suspenso ---------- */
.menu { position: fixed; z-index: 1500; min-width: 190px; padding: 5px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); animation: menuIn .16s var(--ease-out) both; transform-origin: top left; }
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px) } }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; font-size: 13px; color: var(--text-2); }
.menu button:hover { background: var(--raise-2); color: var(--text); }
.menu button svg { width: 15px; height: 15px; }
.menu button.danger { color: var(--bad); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 4px 2px; }
.menu .kbd { margin-left: auto; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }

/* ---------- gaveta lateral (notificações) ---------- */
.drawer-back { position: fixed; inset: 0; z-index: 800; background: rgba(5, 6, 15, .35); animation: fadeIn .2s both; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(400px, 100vw); z-index: 801; background: var(--panel-solid); border-left: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: drawerIn calc(.35s / var(--speed)) var(--ease-out) both; }
.drawer.out { animation: drawerOut .25s var(--ease) both; }
@keyframes drawerIn { from { transform: translateX(100%) } }
@keyframes drawerOut { to { transform: translateX(100%) } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { flex: 1; }
.drawer-body { flex: 1; overflow: auto; }
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: relative; }
.notif.unread::before { content: ''; position: absolute; left: 7px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.notif .ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--raise-2); }
.notif .ic svg { width: 16px; height: 16px; }
.notif.success .ic { color: var(--ok); } .notif.error .ic { color: var(--bad); } .notif.warn .ic { color: var(--warn); } .notif.info .ic { color: var(--info); }
.notif b { font-size: 13.5px; display: block; }
.notif p { font-size: 12.5px; color: var(--muted); margin: 2px 0 4px; }
.notif time { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }

/* ---------- terminal / logs ---------- */
.term {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  font: 12.5px/1.65 var(--font-mono); color: var(--text-2); overflow: auto; position: relative;
}
.term-line { display: grid; grid-template-columns: 70px 22px minmax(0, 1fr); gap: 8px; padding: 2px 14px; align-items: start; animation: lineIn .25s var(--ease-out) both; }
.term-line:hover { background: var(--raise); }
.term-line time { color: var(--faint); font-size: 11.5px; }
.term-line .lv { width: 6px; height: 6px; border-radius: 50%; margin-top: 8px; background: var(--faint); justify-self: center; }
.term-line.info .lv { background: var(--info); } .term-line.success .lv { background: var(--ok); } .term-line.warn .lv { background: var(--warn); } .term-line.error .lv { background: var(--bad); } .term-line.debug .lv { background: var(--faint); }
.term-line.error .msg { color: var(--bad); } .term-line.warn .msg { color: var(--warn); } .term-line.success .msg { color: var(--ok); }
.term-line .msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-line .tag { font-size: 10.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
.term-line details { grid-column: 3; }
.term-line details pre { margin: 4px 0; color: var(--muted); font-size: 11.5px; white-space: pre-wrap; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px) } }

/* ---------- QR ---------- */
.qr-frame { position: relative; width: 280px; aspect-ratio: 1; border-radius: 22px; padding: 14px; background: #fff; box-shadow: 0 20px 60px -20px var(--accent); }
.qr-frame img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-frame::before { content: ''; position: absolute; inset: -3px; border-radius: 24px; padding: 3px; background: conic-gradient(from var(--ang, 0deg), var(--accent), transparent 40%, var(--accent)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: rot 3s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rot { to { --ang: 360deg } }
.pair-code { display: flex; gap: 8px; justify-content: center; font: 700 34px/1 var(--font-mono); letter-spacing: .06em; }
.pair-code span { background: var(--raise-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 12px; min-width: 46px; text-align: center; animation: itemIn .4s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.pair-code span.dash { background: transparent; border: 0; padding: 14px 0; min-width: 0; color: var(--faint); }

/* chip de tecla/atalho dentro de texto */
.kbd-hint { display: inline-flex; gap: 3px; align-items: center; }

/* moeda de ouro (ícone) */
.coin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -.12em; background: radial-gradient(circle at 35% 30%, #ffe9a6, #f5b301 55%, #9b6600); box-shadow: inset 0 0 0 1.5px rgba(120, 70, 0, .35); }
input[type=file].input { padding: 6px; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; border: 0; border-radius: 8px; padding: 6px 12px; margin-right: 10px; background: var(--raise-2); color: var(--text); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--accent-soft); }

/* abas que não cabem na tela: setas + sombra nas pontas */
.tabs-wrap { position: relative; }
.tabs-wrap > .tabs { scroll-behavior: smooth; }
.tabs-arrow { position: absolute; top: 0; bottom: 1px; width: 44px; display: none; align-items: center; border: 0; padding: 0; cursor: pointer; color: var(--text); z-index: 2; }
.tabs-arrow svg { width: 18px; height: 18px; }
.tabs-arrow.left { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--bg) 40%, transparent); }
.tabs-arrow.right { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--bg) 40%, transparent); }
.tabs-wrap.more-left .tabs-arrow.left, .tabs-wrap.more-right .tabs-arrow.right { display: flex; }
.tabs-arrow:hover { color: var(--accent); }
.sync-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; margin-left: 4px; }
.sync-badge.hide { display: none; }
