/* ZECA ADMIN — tema escuro (preto, grafite e verde, detalhes em vermelho), mobile primeiro. */
:root {
  --bg: #0d0f12;
  --panel: #15181d;
  --panel-2: #1b1f26;
  --line: #262b33;
  --text: #e8eaed;
  --muted: #9aa1ab;
  --green: #1fa463;
  --green-2: #27c378;
  --red: #e5392f;
  --amber: #e0a106;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --side: 272px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
a { color: var(--green-2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 17.5px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Carregamento ---------- */
.boot { display: grid; place-items: center; min-height: 100vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin 0.8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; padding: 40px 0; }
.skeleton { background: linear-gradient(90deg, var(--panel-2), #222731, var(--panel-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.layout.collapsed { --side: 76px; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 6px; transition: width 0.2s; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 16px; letter-spacing: 0.06em; white-space: nowrap; }
.brand b span { color: var(--green-2); }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; min-height: 0; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--muted); white-space: nowrap; min-height: 46px; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: rgba(31, 164, 99, 0.14); color: var(--green-2); }
.nav svg, .icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.layout.collapsed .nav span, .layout.collapsed .brand b, .layout.collapsed .side-foot span { display: none; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: rgba(13, 15, 18, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { flex: 1; min-width: 0; }
.content { padding: 22px 26px; max-width: 1720px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: #39404b; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.backdrop { display: none; }

/* ---------- Cartões e grades ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-size: 27px; font-weight: 750; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--green-2); border-color: rgba(31, 164, 99, 0.4); background: rgba(31, 164, 99, 0.1); }
.pill.bad { color: #ff7b73; border-color: rgba(229, 57, 47, 0.4); background: rgba(229, 57, 47, 0.1); }
.pill.warn { color: #ffc94a; border-color: rgba(224, 161, 6, 0.4); background: rgba(224, 161, 6, 0.1); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chart-box { position: relative; height: 290px; }
.chart-box.tall { height: 340px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); outline: none; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 164, 99, 0.18); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 200px; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; background: var(--green); color: #fff; font-weight: 600; cursor: pointer; transition: filter 0.15s, transform 0.05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.danger { background: var(--red); }
.btn.block { width: 100%; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }

/* ---------- Switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 50px; height: 30px; border-radius: 999px; background: #313742; position: relative; transition: background 0.2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--green-2); outline-offset: 2px; }
.switch input:disabled + .track { opacity: 0.45; }
.switch .s-label { font-size: 14.5px; }

/* ---------- Listas (tabelas viram cartões no celular) ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.item .who { min-width: 0; }
.item .who b { display: block; }
.item .controls { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--green-2); border: 1px solid var(--line); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.tabs button.on { color: #fff; background: rgba(31, 164, 99, 0.2); border-color: var(--green); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 400px at 50% -10%, rgba(31, 164, 99, 0.18), transparent), var(--bg); }
.auth { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.auth .brand { justify-content: center; padding: 0 0 6px; }
.auth .brand img { width: 52px; height: 52px; }
.auth .brand b { font-size: 22px; }
.qr { background: #fff; border-radius: 12px; padding: 10px; width: 220px; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; font-family: ui-monospace, Menlo, monospace; }

/* ---------- Modal, toasts ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: grid; place-items: end center; animation: fade 0.15s; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: up 0.2s ease-out; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal:has(> .editor) { max-width: 980px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
#toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: up 0.2s; display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { border-color: rgba(31, 164, 99, 0.6); }
.toast.err { border-color: rgba(229, 57, 47, 0.7); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .layout, .layout.collapsed { grid-template-columns: 1fr; --side: 270px; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform 0.2s; }
  .layout.open .sidebar { transform: none; box-shadow: var(--shadow); }
  .layout.open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.5); }
  .layout.collapsed .nav span, .layout.collapsed .brand b, .layout.collapsed .side-foot span { display: inline; }
  .content { padding: 14px; }
  .item { grid-template-columns: auto 1fr; }
  .item .controls { grid-column: 1 / -1; justify-content: flex-start; gap: 6px 16px; }
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex: none; }
  .stat .value { font-size: 21px; }
  .chart-box { height: 220px; }
}
@media (min-width: 861px) {
  .modal-bg { place-items: center; }
  .modal { border-radius: 18px; }
  .menu-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Páginas de gestão ---------- */
a.item.link { color: inherit; grid-template-columns: auto 1fr; }
a.item.link:hover { border-color: #39404b; }
.item.flat { background: transparent; border: 0; padding: 0; grid-template-columns: auto 1fr; }
.item.focus { border-color: var(--green); }
.item.edit { grid-template-columns: 1fr auto; }
.item.edit textarea { min-height: 64px; resize: vertical; }
.card.sub { background: var(--panel-2); padding: 12px; }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: 13.5px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.checklist { max-height: 240px; overflow: auto; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px; }
.note { display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 8px 0; white-space: pre-wrap; word-break: break-word; }
.grow { flex: 1 1 auto; min-width: 0; }
details.fold summary { cursor: pointer; list-style: none; min-height: 32px; display: flex; align-items: center; gap: 6px; }
details.fold summary::before { content: "▸"; color: var(--green-2); transition: transform 0.15s; }
details.fold[open] summary::before { transform: rotate(90deg); }
.sticky-actions { position: sticky; bottom: 10px; z-index: 15; box-shadow: var(--shadow); border-color: #39404b; }
.preview-img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.ok-t { color: var(--green-2); }
.bad-t { color: #ff7b73; }
h3 { font-size: 14px; color: var(--green-2); margin-top: 4px; }
pre.log { margin: 0; background: #08090b; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; max-height: 65vh; overflow: auto; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; color: #c9ccd2; }
.fmt { gap: 6px; }
.fmt .btn { min-width: 42px; font-weight: 700; }
textarea.input { resize: vertical; line-height: 1.45; }

/* Figurinhas */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-media { aspect-ratio: 1; display: grid; place-items: center; font-size: 44px; background: var(--panel-2); border-radius: 10px; overflow: hidden; }
.st-media img, .st-media video { width: 100%; height: 100%; object-fit: contain; }
.st-info { display: flex; gap: 8px; align-items: center; min-width: 0; }
.st-info input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }

/* Editor + prévia do Telegram */
.editor { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .editor { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); align-items: start; } .preview-col { position: sticky; top: 80px; } }
.tg-chat { background: #0e1621 linear-gradient(160deg, #0f1c2b, #0b1219); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.tg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6ab3f3; }
.tg-head .avatar { width: 28px; height: 28px; font-size: 13px; }
.tg-msg { background: #182533; border-radius: 4px 14px 14px 14px; padding: 8px 10px 4px; max-width: 100%; color: #f5f5f5; word-break: break-word; }
.tg-photo { background: #22344a; border-radius: 10px; height: 140px; display: grid; place-items: center; color: #8aa4bf; margin-bottom: 6px; }
.tg-text a { color: #6ab3f3; text-decoration: underline; }
.tg-text code { background: rgba(255, 255, 255, 0.08); padding: 1px 4px; border-radius: 4px; font-size: 13px; }
.tg-text blockquote { margin: 4px 0; padding: 2px 8px; border-left: 3px solid #6ab3f3; background: rgba(106, 179, 243, 0.08); border-radius: 4px; }
.tg-meta { text-align: right; font-size: 11px; color: #6d7f8f; }
.tg-kb { display: flex; flex-direction: column; gap: 4px; }
.tg-kb-row { display: flex; gap: 4px; }
.tg-btn { flex: 1; text-align: center; background: rgba(24, 37, 51, 0.85); border-radius: 8px; padding: 8px 6px; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item.edit { grid-template-columns: 1fr; }
  .item.edit .controls { grid-column: auto; }
  .sticky-actions { bottom: 6px; }
  .nav { overflow-y: auto; }
}
@media (max-width: 520px) {
  .user-chip { display: none; }
  .fmt .btn { min-width: 38px; padding: 6px 8px; }
}
.card.grid > .btn, .grid > .btn { justify-self: start; }
.modal .grid > .btn { justify-self: stretch; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.layout.collapsed .nav .badge { position: absolute; margin: -18px 0 0 18px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.item.notif.unread { border-color: rgba(31, 164, 99, 0.55); }
.item.notif .avatar.bad { color: #ff7b73; } .item.notif .avatar.warn { color: #ffc94a; }
.progress { height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--green); transition: width 0.4s; }
.nav a span:not(.badge) { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Indicadores (KPI) e gráficos ---------- */
.kpis { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.stat.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(160deg, #181c22, var(--panel) 60%); }
.stat.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--green-2), transparent); opacity: 0.7; }
.kpi-head { display: flex; align-items: center; gap: 10px; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi-icon .icon { width: 18px; height: 18px; }
.stat.kpi .value { font-size: 30px; margin-top: 10px; }
.spark-box { height: 44px; margin: 8px -16px -16px; }
.spark { width: 100% !important; height: 44px !important; display: block; }
.charts-main { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.table td { font-variant-numeric: tabular-nums; }
.rank-bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; min-width: 60px; }
.rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-2)); }

/* Computador: aproveita a largura */
@media (min-width: 1100px) {
  .charts-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
}
@media (min-width: 1200px) {
  .list.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (min-width: 1400px) {
  .content { padding: 26px 32px; }
}
@media (min-width: 1900px) {
  .list.cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .content { padding: 14px; gap: 14px; }
  .card { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat.kpi .value { font-size: 24px; }
  .kpi-icon { width: 30px; height: 30px; }
  .chart-box, .chart-box.tall { height: 250px; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
}
.progress.bad span { background: var(--red); }
.progress.running span { background: linear-gradient(90deg, var(--green), var(--green-2)); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.65; } }
pre.log.tall { max-height: 70vh; }

/* Modalidades dos desafios */
.kind-card { display: flex; flex-direction: column; gap: 14px; }
.kind-card.off { opacity: 0.72; }
.kind-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 14px; align-items: start; }
.tg-media { position: relative; overflow: hidden; border-radius: 10px; cursor: default; }
.tg-media img { display: block; width: 100%; border-radius: 10px; }
.tg-media.spoiler { cursor: pointer; }
.tg-media.spoiler img { filter: blur(22px) saturate(1.2); transform: scale(1.06); }
.tg-spoiler-tip { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; text-shadow: 0 1px 6px #000; background: rgba(20, 24, 30, 0.25); }
.tg-media:not(.spoiler) .tg-spoiler-tip { display: none; }
@media (max-width: 520px) {
  .kind-head { grid-template-columns: auto 1fr; }
  .kind-head > .switch { grid-column: 1 / -1; }
  .kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; }
.grid > .table-wrap, .grid > div { min-width: 0; }
[hidden] { display: none !important; }

/* ---------- Menu em categorias ---------- */
.nav { gap: 2px; }
.nav-sec { display: flex; flex-direction: column; gap: 2px; }
.nav-pinned { padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav-group { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 12px 6px; cursor: pointer; min-height: 36px; border-radius: 10px; }
.nav-group:hover { color: var(--text); }
.nav-group .icon, .nav-group svg { width: 16px; height: 16px; transition: transform 0.2s; transform: rotate(-90deg); }
.nav-group.open svg { transform: none; }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-items.shut { display: none; }
.layout.collapsed .nav-group { display: none; }
.layout.collapsed .nav-items.shut { display: flex; }
@media (max-width: 860px) {
  .layout.collapsed .nav-group { display: flex; }
  .layout.collapsed .nav-items.shut { display: none; }
}
button.item { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.item.pick.on { border-color: var(--green); }
.chips { gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); cursor: pointer; min-height: 40px; }
.chip input { accent-color: var(--green); }
.ok-text { color: var(--green-2); } .bad-text { color: #ffb4ae; }

/* Bingo: progresso ao vivo e prévia do site das cartelas */
.bar { height: 10px; border-radius: 999px; background: var(--line, #263040); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent, #22c55e); transition: width .4s; }
.bingo-preview { width: 100%; max-width: 420px; height: 720px; border: 1px solid var(--line, #263040); border-radius: 16px; background: #0d1117; justify-self: center; }

/* grupos: cadastro (link, permissões e ações) */
.item.group-item { grid-template-columns: auto 1fr; align-items: start; }
.item.group-item .group-name { color: inherit; text-decoration: none; display: block; }
.item.group-item .group-name:hover b { text-decoration: underline; }
.btn.small { padding: 6px 12px; font-size: 13px; min-height: 36px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
