/* Arkon Labs 5.18 — "base nova" do painel (Etapa 1 do redesenho).
   Carrega depois do style.css: troca as cores e o acabamento (cartões, botões, abas, campos)
   e monta o esqueleto novo: topo com as 5 áreas e a barra "Peça qualquer coisa", coluna de grupos,
   gaveta lateral, aviso de "salvo" e a barra de baixo do celular.
   Sem estilo inline (a CSP bloqueia): tudo aqui ou aplicado pelo app.js. */

:root {
  --bg: #060608;
  --bg-elev: #0b0b0f;
  --surface: #111117;
  --surface-2: #18181f;
  --surface-3: #20202a;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f5f5f8;
  --text-2: #cfcfd8;
  --muted: #8e8e9b;
  --muted-2: #5f5f6b;
  --accent: #f05252;
  --accent-hi: #ff716b;
  --accent-soft: rgba(240, 82, 82, .12);
  --accent-line: rgba(240, 82, 82, .38);
  --purple: #b18cff;
  --purple-soft: rgba(177, 140, 255, .12);
  --radius-lg: 24px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -40px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .95);
  --rail-w: 256px;
  --topbar-h: 66px;
  --sidebar-w: var(--rail-w);
  --gutter: 30px;
}

/* ---------- Fundo: preto profundo, brilho vermelho e granulado ---------- */
body { background: var(--bg); font-size: 15.5px; }
body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.app-bg { background:
  radial-gradient(1000px 520px at 90% -12%, rgba(240, 82, 82, .14), transparent 62%),
  radial-gradient(760px 520px at 18% -8%, rgba(134, 92, 255, .07), transparent 60%),
  linear-gradient(var(--bg), var(--bg)); }
h1, h2, h3 { letter-spacing: -.025em; }
h1 { font-size: clamp(27px, 2.5vw, 36px); font-weight: 700; line-height: 1.1; }
h2 { font-weight: 650; }
.eyebrow { font-size: 12.5px; letter-spacing: .16em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 60; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 20px; background: rgba(8, 8, 11, .86); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid var(--line); }
.topbar-brand { display: flex !important; align-items: center; flex-shrink: 0; }
.topbar-brand img { width: 40px; height: 40px; border-radius: 0; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(240, 82, 82, .35)); }
.areas { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); flex-shrink: 0; }
.area-link { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.area-link .ico { width: 17px; height: 17px; }
.area-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.area-link.active { color: #fff; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(240, 82, 82, .28); }
.area-link.active .ico { color: var(--accent-hi); }
.ask-bar { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px 0 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--accent-line); box-shadow: 0 0 0 4px rgba(240, 82, 82, .05), 0 18px 40px -30px rgba(240, 82, 82, .8); transition: border-color .2s, box-shadow .2s; }
.ask-bar:hover { border-color: rgba(240, 82, 82, .6); box-shadow: 0 0 0 4px rgba(240, 82, 82, .09), 0 18px 40px -26px rgba(240, 82, 82, .9); }
.ask-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 8px; color: var(--muted); font-size: 15px; text-align: left; }
.ask-open .search-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-open em { color: #c9c9d4; }
.ask-spark .ico { width: 18px; height: 18px; color: var(--accent-hi); }
.ask-mic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(240, 82, 82, .15); transition: transform .15s, box-shadow .2s; }
.ask-mic:hover { transform: scale(1.06); box-shadow: 0 0 0 7px rgba(240, 82, 82, .18); }
.ask-mic .ico { width: 16px; height: 16px; }
.live-pulse { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; line-height: 1; }
.live-pulse svg { width: 110px; height: 26px; }
.live-pulse-line { fill: none; stroke: var(--accent-hi); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 0; animation: live-beat 2.6s linear infinite; }
.live-pulse-dot { fill: #ff8a80; animation: live-dot 1.3s ease-in-out infinite; }
.live-pulse small { font-size: 12.5px; color: var(--muted); margin-top: -2px; white-space: nowrap; }
.live-pulse.off .live-pulse-line { stroke: #4a4a55; animation: none; }
.live-pulse.off .live-pulse-dot { fill: #4a4a55; animation: none; }
@keyframes live-beat { 0% { stroke-dashoffset: 320; } 100% { stroke-dashoffset: 0; } }
@keyframes live-dot { 50% { opacity: .35; } }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.top-actions .bell { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; width: 40px; height: 40px; }
.bell-badge { top: -5px; right: -5px; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.top-avatar { display: flex; align-items: center; gap: 8px; padding: 3px 13px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.top-avatar:hover { border-color: var(--accent-line); }
.top-avatar .avatar { width: 32px; height: 32px; }
.top-you { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.mobile-menu, .search-icon { display: none !important; }

/* ---------- Coluna de grupos ---------- */
.sidebar { top: var(--topbar-h); width: var(--rail-w); padding: 16px 12px 14px; background: rgba(8, 8, 11, .9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.sidebar-top, #navList, .sidebar-account { display: none; }
.shell { margin-left: var(--rail-w); position: relative; z-index: 1; min-height: calc(100dvh - var(--topbar-h)); }
.rail-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6a6a77; padding: 2px 8px 10px; }
.rail-label span { font-size: 12.5px; letter-spacing: 0; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; }
.rail-list { display: flex; flex-direction: column; gap: 4px; }
.rail-group { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.rail-group:hover { background: rgba(255, 255, 255, .035); }
.rail-group.active { background: var(--surface); border-color: var(--accent-line); box-shadow: 0 18px 40px -30px rgba(240, 82, 82, .9); }
.rail-ga { --hue: 350; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; font: 700 14px/1 var(--display); color: #fff; background: linear-gradient(135deg, hsl(var(--hue) 55% 40%), hsl(calc(var(--hue) + 40) 60% 24%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.rail-ga img { width: 100%; height: 100%; object-fit: cover; }
.rail-gtext { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rail-gtext strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-gtext small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-group .dot { box-shadow: 0 0 0 4px rgba(255, 255, 255, .04); }
.rail-group .dot.green { box-shadow: 0 0 0 4px rgba(79, 209, 160, .16); }
.rail-group .dot.amber { box-shadow: 0 0 0 4px rgba(243, 192, 101, .16); }
.rail-group .dot.red { box-shadow: 0 0 0 4px rgba(240, 82, 82, .18); }
.rail-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; padding: 10px; border-radius: 14px; border: 1px dashed #33333d; color: var(--muted); font-size: 14.5px; font-weight: 600; transition: all .2s; }
.rail-add .ico { width: 16px; height: 16px; }
.rail-add:hover { color: #fff; border-color: var(--accent-line); background: var(--accent-soft); }
.rail-none { font-size: 14.5px; color: var(--muted); padding: 0 8px 4px; }
.rail-tip { display: flex; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(240, 82, 82, .16), rgba(134, 168, 255, .05)); font-size: 14px; line-height: 1.45; color: var(--text-2); transition: border-color .2s; }
.rail-tip:hover { border-color: var(--accent-line); }
.rail-tip b { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--accent-hi); font-size: 14px; }
.rail-tip b .ico { width: 14px; height: 14px; }
.rail-tip-icon .ico { width: 18px; height: 18px; color: var(--accent-hi); }
.rail-tip.amber { background: linear-gradient(135deg, rgba(243, 192, 101, .15), rgba(243, 192, 101, .03)); }
.rail-tip.amber b, .rail-tip.amber .rail-tip-icon .ico { color: var(--amber); }
.rail-empty { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-elev)); }
.rail-empty-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.rail-empty-icon .ico { width: 20px; height: 20px; }
.rail-empty strong { font-size: 15px; }
.rail-empty small { font-size: 14px; color: var(--muted); line-height: 1.45; margin-bottom: 4px; }
.rail-skel { height: 56px; margin-bottom: 6px; }
.rail-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.rail-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14.5px; transition: color .2s, background .2s; }
.rail-foot a .ico { width: 17px; height: 17px; }
.rail-foot a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

/* ---------- Faixa com as páginas da área ---------- */
main { max-width: 1280px; padding-top: 24px; position: relative; }
.area-tabs { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.area-tabs::-webkit-scrollbar { display: none; }
.area-tabs-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-right: 6px; white-space: nowrap; }
.area-tab { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 7px 13px; border-radius: 999px; border: 1px solid transparent; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: all .2s; }
.area-tab .ico { width: 16px; height: 16px; }
.area-tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.area-tab.active { color: #fff; background: var(--accent-soft); border-color: var(--accent-line); }
.area-tab.active .ico { color: var(--accent-hi); }
/* A coluna da esquerda já mostra os grupos no computador. */
@media (min-width: 1025px) { .group-switcher { display: none; } }

/* ---------- Acabamento: cartões, botões, abas, campos ---------- */
.card { background: linear-gradient(180deg, var(--surface), var(--bg-elev)); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { border-radius: 12px; background: var(--surface-2); font-size: 15px; }
.btn.primary { background: linear-gradient(135deg, #ff6060, #d93a3a); border-color: transparent; box-shadow: 0 10px 30px -12px rgba(240, 82, 82, .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.primary:hover { filter: brightness(1.06) saturate(1.1); }
.btn.sm { border-radius: 10px; }
.btn.lg { border-radius: 15px; }
.pill.purple { color: #d2bcff; background: var(--purple-soft); border-color: rgba(177, 140, 255, .25); }
.tabs { background: var(--surface); border-radius: 14px; }
.tab.active { color: #fff; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(240, 82, 82, .3); }
.chip { background: var(--surface); }
.chip.active { background: var(--accent-soft); color: #fff; border-color: var(--accent-line); }
.seg.active { background: linear-gradient(135deg, #ff6060, #d93a3a); }
.stat { background: linear-gradient(180deg, var(--surface), var(--bg-elev)); border-radius: 18px; }
.stat strong { font-size: 24px; font-weight: 700; }
.stat-icon { background: var(--accent-soft); }
.tile-icon { border-radius: 13px; }
.notice { border-radius: 14px; }
.empty-state { border-radius: var(--radius); background: rgba(255, 255, 255, .012); }
input, textarea, select { background: var(--bg-elev); border-color: var(--line-2); }
input:focus, textarea:focus, select:focus { background: #0f0f14; }
/* Ligado = verde (como no WhatsApp e no desenho novo). */
.switch:checked { background: var(--green) !important; border-color: var(--green) !important; }
.table-wrap { border-radius: 18px; }
.page-heading { margin-bottom: 20px; }

/* ---------- Gaveta lateral (janelas com { drawer: true }) ---------- */
@media (min-width: 768px) {
  dialog#modal.drawer { margin: 0 0 0 auto; width: min(440px, 100vw); height: 100dvh; max-height: 100dvh; border-radius: 24px 0 0 24px; border-top: 0; border-right: 0; border-bottom: 0; background: linear-gradient(180deg, #111117, #09090c); box-shadow: -40px 0 80px -40px #000; }
  dialog#modal.drawer[open] { animation: drawer-in .32s var(--ease); }
  dialog#modal.drawer .modal-inner { padding: 26px 24px 28px; }
}
@keyframes drawer-in { from { transform: translateX(48px); opacity: 0; } }
.notification-list { display: flex; flex-direction: column; gap: 6px; }

/* Menu "Você" */
.you-head { display: flex; align-items: center; gap: 14px; padding: 12px; margin: 4px 0 12px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(240, 82, 82, .12), rgba(134, 168, 255, .04)); }
.you-head:hover { border-color: var(--accent-line); }
.you-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.you-text strong { font-size: 15px; font-weight: 600; }
.you-text small { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you-go { width: 16px !important; height: 16px !important; color: var(--muted-2); }
.you-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.you-stats a { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.you-stats a:hover { border-color: var(--line-2); }
.you-stats b { font: 700 18px/1.2 var(--display); white-space: nowrap; }
.you-stats small { font-size: 13px; color: var(--muted); }
.you-list { display: flex; flex-direction: column; padding: 2px 4px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.you-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); border-radius: 0; }
.you-item:last-child { border-bottom: 0; }
.you-item:hover .you-text strong { color: #fff; }
.you-item:hover .you-icon { background: var(--accent-soft); color: var(--accent-hi); }
.you-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--text-2); transition: all .2s; }
.you-icon .ico { width: 18px; height: 18px; }
.you-item .you-text strong { font-size: 15px; }
.you-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 4px 6px 8px; }
.you-logout { color: var(--muted); }

/* ---------- Busca "Peça qualquer coisa" ---------- */
.palette { border-color: var(--accent-line); background: rgba(17, 17, 23, .97); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .95), 0 0 0 6px rgba(240, 82, 82, .06); }
.palette-spark .ico { width: 20px; height: 20px; color: var(--accent-hi); }
.palette-icon { background: var(--accent-soft); }
.palette-item.active { background: rgba(240, 82, 82, .1); }

/* ---------- Aviso de "salvo" ---------- */
/* Fica no alto, à direita: não cobre a barra "Salvar alterações" que mora embaixo. */
.toast { top: calc(var(--topbar-h) + 14px); bottom: auto; left: auto; right: 20px; transform: translateY(-10px); max-width: min(440px, calc(100vw - 32px)); gap: 12px; padding: 10px 18px 12px 10px; border-radius: 16px; background: rgba(20, 20, 26, .97); border-color: var(--line-2); overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(79, 209, 160, .08); }
.toast.show { transform: none; }
.toast-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--green-soft); color: var(--green); }
.toast-icon .ico { width: 18px; height: 18px; color: inherit !important; }
.toast.error .toast-icon { background: var(--accent-soft); color: var(--accent-hi); }
.toast.info .toast-icon { background: var(--blue-soft); color: var(--blue); }
.toast-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.toast-text strong { font-size: 15px; font-weight: 600; }
.toast-text small { font-size: 14px; color: var(--muted); }
.toast-time { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--green); transform-origin: left; opacity: .8; }
.toast.error .toast-time { background: var(--accent); }
.toast.info .toast-time { background: var(--blue); }
.toast.show .toast-time { animation: toast-time 4.2s linear forwards; }
@keyframes toast-time { to { transform: scaleX(0); } }

/* ---------- Barra de baixo (celular) ---------- */
.bottom-mic { display: none; }

/* ---------- Telas médias ---------- */
@media (max-width: 1359px) { .live-pulse { display: none; } }
@media (max-width: 1279px) {
  .area-link { padding: 7px 11px; }
  .area-link .ico { display: none; }
  .top-you { display: none; }
  .top-avatar { padding: 3px; }
  .ask-open kbd { display: none; }
}
@media (max-width: 1140px) { .ask-open em { display: none; } }

/* ---------- Tablet: a coluna vira gaveta e as áreas saem do topo ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 22px; }
  .mobile-menu { display: inline-flex !important; }
  .areas { display: none; }
  .sidebar { top: 0; width: min(320px, 88vw); padding: 18px 14px 14px; background: rgba(10, 10, 14, .97); z-index: 70; }
  .sidebar-top, #navList, .sidebar-account { display: flex; }
  #navList { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
  .rail-foot { display: none; }
  .shell { margin-left: 0; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  :root { --gutter: 16px; --topbar-h: 58px; --bottom-h: 68px; }
  .topbar { gap: 6px; padding: 0 8px 0 4px; }
  .topbar-brand img { width: 34px; height: 34px; }
  .ask-bar { display: none; }
  .search-icon { display: inline-flex !important; }
  .top-actions { margin-left: auto; gap: 4px; }
  .top-actions .bell { width: 38px; height: 38px; border: 0; background: none; }
  .top-avatar { border: 0; background: none; padding: 0 4px 0 0; }
  main { padding-top: 16px; }
  .area-tabs { margin: 0 calc(var(--gutter) * -1) 16px; padding: 0 var(--gutter) 10px; }
  .area-tabs-label { display: none; }
  .bottom-nav { height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom); background: rgba(10, 10, 13, .95); align-items: stretch; }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: color .2s; }
  .bottom-nav a .ico, .bottom-nav button .ico { width: 23px; height: 23px; }
  .bottom-nav .active { color: #fff; }
  .bottom-nav .active .ico { color: var(--accent-hi); filter: drop-shadow(0 4px 10px rgba(240, 82, 82, .6)); }
  .bottom-nav .bottom-mic { display: grid; place-items: center; justify-self: center; align-self: start; width: 58px; height: 58px; margin-top: -24px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #ff6060, #d93a3a); box-shadow: 0 0 0 6px var(--bg), 0 14px 30px -8px rgba(240, 82, 82, .85); }
  .bottom-nav .bottom-mic .ico { width: 25px; height: 25px; }
  .toast { top: calc(var(--topbar-h) + 8px); left: 12px; right: 12px; width: auto; max-width: none; }
  .card { border-radius: 18px; }
}

/* ==========================================================================
   5.19 — Página inicial (Etapa 2): primeira visita e dia a dia
   ========================================================================== */
.home { display: grid; gap: 18px; }
.home h2 { font-size: 17px; margin: 0; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-col { display: grid; gap: 18px; min-width: 0; }

/* Boas-vindas (primeira visita) */
.home-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; padding: 30px 30px; border-radius: var(--radius-lg); border: 1px solid var(--accent-line); background: radial-gradient(700px 260px at 0% 0%, rgba(240, 82, 82, .22), transparent 65%), linear-gradient(135deg, #2a1012, #120a0d 55%, #0d0c10); box-shadow: 0 30px 80px -50px rgba(240, 82, 82, .7); }
.home-hero-icon { flex-shrink: 0; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: var(--accent-hi); background: rgba(240, 82, 82, .14); box-shadow: inset 0 0 0 1px rgba(240, 82, 82, .3); }
.home-hero-icon .ico { width: 28px; height: 28px; }
.home-hero-text { flex: 1; min-width: 0; }
.home-hero-text h1 { margin: 0 0 8px; font-size: clamp(23px, 2.3vw, 33px); line-height: 1.15; }
.home-hero-text p { margin: 0; color: var(--text-2); max-width: 760px; }
.hero-accent { background: linear-gradient(90deg, #ff6b6b, #ff9a7a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-timer { flex-shrink: 0; display: grid; justify-items: center; gap: 4px; min-width: 190px; padding: 18px 18px 16px; border-radius: 18px; background: rgba(5, 5, 8, .72); border: 1px solid var(--line-2); text-align: center; }
.hero-timer small { color: var(--muted); font-size: 13.5px; }
.hero-timer strong { font: 700 40px/1.05 var(--display); letter-spacing: -.03em; }
.hero-timer .btn { margin-top: 8px; width: 100%; justify-content: center; }
.hero-timer.free strong { color: var(--green); font-size: 34px; }
.hero-timer.free span { color: var(--text-2); font-size: 14px; }

/* Primeiros passos */
.home-steps { padding: 22px; border: 1px solid var(--accent-line); box-shadow: 0 0 0 4px rgba(240, 82, 82, .05), var(--shadow); }
.home-steps.compact { border-color: var(--line-2); box-shadow: var(--shadow); }
.home-steps.all-done { border-color: rgba(79, 209, 160, .45); box-shadow: 0 0 0 4px rgba(79, 209, 160, .06), 0 30px 70px -45px rgba(79, 209, 160, .6); }
.hs-head { display: flex; align-items: center; gap: 10px; }
.hs-head h2 { font-size: 20px; }
.hs-count { margin-left: auto; color: var(--muted); font-size: 14.5px; }
.hs-hide { font-size: 14px; color: var(--muted-2); }
.hs-hide:hover { color: var(--text-2); }
.hs-bar { height: 6px; margin: 14px 0 16px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hs-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff6060, #ff8f6b); transition: width .6s ease; }
.all-done .hs-bar span { background: linear-gradient(90deg, #3dbb8c, #6fe0b5); }
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hs-row { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 14px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.hs-row.current { border-color: var(--accent-line); background: linear-gradient(90deg, rgba(240, 82, 82, .14), rgba(240, 82, 82, .04)); box-shadow: 0 16px 34px -28px rgba(240, 82, 82, .9); }
.hs-row.done { opacity: .62; }
.hs-n { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--text-2); border: 1px solid var(--line-2); }
.hs-row.done .hs-n { color: #06281c; background: var(--green); border-color: transparent; }
.hs-n .ico { width: 16px; height: 16px; }
.hs-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hs-text strong { font-size: 15.5px; }
.hs-text small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.hs-row .btn { flex-shrink: 0; }
.hs-ok { flex-shrink: 0; color: var(--green); font-size: 14px; font-weight: 600; }
.hs-wait { flex-shrink: 0; color: var(--muted-2); font-size: 13.5px; }
.hs-foot { margin: 14px 0 0; color: var(--text-2); font-size: 15px; }
.hs-foot strong { color: var(--amber); }
.hs-foot small { color: var(--muted); }
.hs-foot .ico { color: var(--amber); }
.hs-claim { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(90deg, rgba(79, 209, 160, .14), rgba(243, 192, 101, .08)); border: 1px solid rgba(79, 209, 160, .35); }
.hs-claim strong { display: block; }
.hs-claim small { color: var(--text-2); }
.hs-gift { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; color: var(--amber); background: rgba(243, 192, 101, .14); animation: hs-pop 1.6s ease-in-out infinite; }
@keyframes hs-pop { 50% { transform: scale(1.08) rotate(-4deg); } }

/* O bot já está trabalhando / Como funciona */
.home-work, .home-how { padding: 22px; }
.hw-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hw-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(240, 82, 82, .18); animation: hw-blink 1.8s ease-in-out infinite; }
@keyframes hw-blink { 50% { box-shadow: 0 0 0 8px rgba(240, 82, 82, 0); } }
.hw-when { margin-left: auto; color: var(--muted); font-size: 14px; }
.hw-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hw-tile { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); }
.hw-tile small { display: block; color: var(--muted); font-size: 13.5px; }
.hw-tile strong { font: 700 28px/1.2 var(--display); }
.hw-tile.red strong { color: var(--accent-hi); }
.hw-tile.green strong { color: var(--green); }
.hw-empty { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px; border-radius: 14px; color: var(--text-2); font-size: 15px; background: rgba(255, 255, 255, .025); border: 1px dashed var(--line-2); }
.hw-empty .ico { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.hw-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 15px; background: rgba(240, 82, 82, .08); border: 1px solid rgba(240, 82, 82, .18); }
.hw-line span { flex: 1; }
.hw-line b { color: var(--accent-hi); font-weight: 600; }
.hw-line .ico { color: var(--accent-hi); }
.hw-how { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.hw-how li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.hw-how li > span:last-child { display: grid; }
.hw-how small { color: var(--muted); font-size: 14px; }
.hw-how-n { color: var(--muted-2); font-weight: 700; width: 14px; text-align: center; }

/* Ajuda */
.home-help { padding: 18px; display: grid; gap: 14px; }
.hh-tour { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border-radius: 16px; text-align: left; color: var(--text); background: radial-gradient(400px 140px at 20% 0%, rgba(240, 82, 82, .14), transparent 70%), rgba(255, 255, 255, .02); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s; }
.hh-tour:hover { border-color: var(--accent-line); }
.hh-play { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #ff6060, #d93a3a); box-shadow: 0 0 0 7px rgba(240, 82, 82, .14); }
.hh-tour-text { display: grid; }
.hh-tour-text small { color: var(--muted); }
.hh-row { display: flex; align-items: center; gap: 12px; }
.hh-row small { display: block; color: var(--muted); font-size: 14px; }
.hh-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; color: var(--amber); background: rgba(243, 192, 101, .12); }

/* Dia a dia: cabeçalho */
.home-day-head { display: flex; align-items: flex-end; gap: 16px; }
.home-day-head > div { flex: 1; min-width: 0; }
.home-day-head h1 { margin: 0; }
.hd-date { margin: 0 0 2px; color: var(--muted); font-size: 14.5px; }
.hd-summary { margin: 6px 0 0; color: var(--text-2); }
.hd-red { color: var(--accent-hi); }
.hd-green { color: var(--green); }
.hd-wallet { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 8px 14px; border-radius: 99px; font-size: 14.5px; color: var(--text-2); background: rgba(243, 192, 101, .08); border: 1px solid rgba(243, 192, 101, .35); }
.hd-wallet .ico { color: var(--amber); width: 17px; height: 17px; }
.hd-wallet strong { color: var(--text); }

/* Dia a dia: cartões dos grupos */
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.home-gcard { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-elev)); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.home-gcard.urgent { border-color: var(--accent-line); background: radial-gradient(420px 160px at 0% 0%, rgba(240, 82, 82, .12), transparent 70%), linear-gradient(180deg, var(--surface), var(--bg-elev)); }
.home-gcard.more { place-content: center; justify-items: center; color: var(--muted); font-weight: 600; }
.hg-top { display: flex; align-items: flex-start; gap: 14px; }
.hg-ring { --p: 0; --c: var(--green); position: relative; flex-shrink: 0; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.hg-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.hg-ring span { position: relative; font: 700 21px/1 var(--display); }
.hg-ring.amber { --c: var(--amber); }
.hg-ring.red { --c: var(--accent); }
.hg-ring.none span { color: var(--muted-2); }
.hg-name { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hg-name strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-name small { color: var(--muted); font-size: 14px; }
.hg-label { justify-self: start; padding: 2px 9px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); }
.hg-pill { flex-shrink: 0; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.hg-pill.green { color: var(--green); background: var(--green-soft); }
.hg-pill.amber { color: var(--amber); background: var(--amber-soft); }
.hg-pill.red { color: #ff8b85; background: rgba(240, 82, 82, .16); }
.hg-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hg-line { flex: 1 1 100%; min-width: 0; color: var(--text-2); font-size: 14px; }
.hg-line.muted { color: var(--muted); }
.hg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.home-gcard { align-content: space-between; }
.hg-open { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--accent-hi); font-size: 14px; font-weight: 600; }
.hg-open .ico { width: 14px; height: 14px; }

/* Dia a dia: listas (Precisa de você, dicas, novidades, atalhos) */
.home-needs, .home-tips, .home-news, .home-short { padding: 20px; }
.hn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hn-head .link-button { margin-left: auto; }
.hn-sub { color: var(--muted); font-size: 14px; }
.hn-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(240, 82, 82, .7); }
.hn-dot.ok { background: var(--green); box-shadow: 0 0 12px rgba(79, 209, 160, .6); }
.hn-spark { color: var(--amber); display: inline-flex; }
.hn-list { list-style: none; margin: 0; padding: 0; display: grid; }
.hn-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.hn-row:first-child { border-top: 0; padding-top: 4px; }
.hn-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; color: var(--text-2); background: var(--surface-3); }
.hn-icon .ico { width: 17px; height: 17px; }
.hn-icon.red { color: var(--accent-hi); background: rgba(240, 82, 82, .14); }
.hn-icon.amber { color: var(--amber); background: var(--amber-soft); }
.hn-icon.green { color: var(--green); background: var(--green-soft); }
.hn-text { flex: 1; min-width: 0; font-size: 15px; color: var(--text-2); }
.hn-text strong { color: var(--text); }
.hn-gain { color: var(--green); font-weight: 600; white-space: nowrap; }
.hn-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.hn-empty { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-2); font-size: 15px; }
.hn-empty .ico { color: var(--green); }
.home-news .mini-feed { display: grid; gap: 8px; }
.hs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.hs-tile { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, .025); border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.hs-tile:hover { color: var(--text); border-color: var(--accent-line); }
.hs-tile-icon { display: inline-flex; color: var(--accent-hi); }
.hs-tile-icon .ico { width: 17px; height: 17px; }
.home-empty { display: flex; align-items: center; gap: 14px; }
.home-empty small { display: block; color: var(--muted); }

/* Campo aberto pela página inicial (ex.: regras do grupo) pisca uma vez */
.field.flash { border-radius: 14px; animation: field-flash 2.4s ease; }
@keyframes field-flash { 0%, 60% { box-shadow: 0 0 0 3px rgba(240, 82, 82, .55); } 100% { box-shadow: 0 0 0 3px rgba(240, 82, 82, 0); } }

/* Tour de 4 dicas */
.tour-pop { position: fixed; z-index: 120; width: min(310px, calc(100vw - 16px)); padding: 16px 16px 14px; border-radius: 16px; color: #16161b; background: #fff; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .06); animation: tour-in .25s ease; }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } }
.tour-step { display: block; margin-bottom: 4px; color: #d93a3a; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; }
.tour-pop strong { display: block; font-size: 15.5px; }
.tour-pop p { margin: 4px 0 12px; font-size: 15px; line-height: 1.45; color: #3a3a44; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip { border: 0; background: none; padding: 6px 4px; color: #6b6b76; font: inherit; font-size: 14.5px; cursor: pointer; }
.tour-pop .btn.primary { color: #fff; background: #16161b; box-shadow: none; }
.tour-target { position: relative; z-index: 2; outline: 2px solid rgba(255, 113, 107, .9); outline-offset: 4px; border-radius: 14px; }

@media (max-width: 1100px) {
  .home-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .home { gap: 14px; }
  .home-hero { flex-wrap: wrap; gap: 12px; padding: 20px 18px; border-radius: 20px; }
  .home-hero-icon { width: 46px; height: 46px; }
  .home-hero-icon .ico { width: 22px; height: 22px; }
  .home-hero-text { flex-basis: 100%; }
  .home-hero-text h1 { font-size: 22px; }
  .home-hero-text p { font-size: 15px; }
  .hero-timer { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 10px 10px 14px; text-align: left; }
  .hero-timer small { display: none; }
  .hero-timer strong { font-size: 19px; }
  .hero-timer strong::before { content: '⏳ teste: '; font: 600 14.5px var(--font); color: var(--muted); }
  .hero-timer.free strong::before { content: '🎁 '; }
  .hero-timer .btn { width: auto; margin: 0; }
  .hero-timer.free span { text-align: right; }
  .home-steps, .home-work, .home-how, .home-needs, .home-tips, .home-news, .home-short { padding: 16px; }
  .hs-head h2 { font-size: 17px; }
  .hs-row { gap: 10px; padding: 11px 11px; }
  .hs-text small { display: none; }
  .hs-row.current .hs-text small { display: block; }
  .hs-row .btn { padding-inline: 12px; }
  .hs-claim { flex-wrap: wrap; }
  .hs-claim .btn { width: 100%; justify-content: center; }
  .hw-tile strong { font-size: 22px; }
  .home-day-head { flex-wrap: wrap; align-items: flex-start; }
  .hd-summary { font-size: 15px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
  .home-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .home-cards::-webkit-scrollbar { display: none; }
  .home-gcard { flex: 0 0 min(78vw, 300px); scroll-snap-align: start; padding: 16px; }
  .home-needs .hn-row { flex-wrap: wrap; }
  .home-needs .hn-actions { width: 100%; justify-content: flex-start; padding-left: 46px; }
  .home-tips .hn-sub { display: none; }
  .hd-wallet { display: none; }
  .hs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .hero-rest { display: block; margin-top: 6px; font-size: 17px; line-height: 1.3; }
  .hs-row.current { flex-wrap: wrap; }
  .hs-row.current .btn { flex-basis: 100%; justify-content: center; }
  .hs-wait { display: none; }
}

/* ==========================================================================
   5.20 — Início do grupo (Etapa 3): nota, nível, números de hoje, resumo da IA e linha do tempo
   ========================================================================== */
.gh { display: grid; gap: 18px; }
.gh h2 { font-size: 17px; margin: 0; }
.gh .group-switcher { margin: 0; }
.gh-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hg-ring.gh-ring { width: 78px; height: 78px; }
.hg-ring.gh-ring::before { inset: 7px; }
.hg-ring.gh-ring span { font-size: 26px; }
.gh-title { flex: 1 1 320px; min-width: 0; }
.gh-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gh-name h1 { margin: 0; font-size: clamp(24px, 2.4vw, 32px); overflow-wrap: anywhere; }
.gh-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.gh-level { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: 13.5px; font-weight: 700; border: 1px solid; }
.gh-level .ico { width: 14px; height: 14px; }
.gh-level.legend { color: #ffd2f0; border-color: rgba(255, 120, 200, .5); background: linear-gradient(90deg, rgba(240, 82, 82, .22), rgba(177, 140, 255, .22)); }
.gh-level.diamond { color: #9fe8ff; border-color: rgba(120, 220, 255, .45); background: rgba(120, 220, 255, .1); }
.gh-level.gold { color: #ffd479; border-color: rgba(243, 192, 101, .5); background: var(--amber-soft); }
.gh-level.silver { color: #e2e6ef; border-color: rgba(220, 225, 235, .35); background: rgba(220, 225, 235, .08); }
.gh-level.bronze { color: #f0b48a; border-color: rgba(220, 140, 90, .45); background: rgba(220, 140, 90, .1); }
.gh-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13.5px; font-weight: 600; }
.gh-status .ico { width: 14px; height: 14px; }
.gh-status.green { color: var(--green); background: var(--green-soft); }
.gh-status.amber { color: var(--amber); background: var(--amber-soft); }
.gh-status.red { color: #ff8b85; background: rgba(240, 82, 82, .14); }
.gh-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gh-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 14.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .2s, color .2s; }
.gh-link .ico { width: 16px; height: 16px; }
.gh-link:hover { color: var(--text); border-color: var(--accent-line); }
.gh-link.active { color: #fff; background: var(--accent-soft); border-color: var(--accent-line); }
.gh-link.m-only { display: none; }
.gh-more { position: relative; }
.gh-more summary { list-style: none; }
.gh-more summary::-webkit-details-marker { display: none; }
.gh-more[open] summary { color: var(--text); border-color: var(--accent-line); }
.gh-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.gh-more-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 15px; color: var(--text-2); }
.gh-more-menu a .ico { width: 16px; height: 16px; color: var(--muted); }
.gh-more-menu a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }

/* Resumo de hoje (IA) */
.gh-ai { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-color: rgba(177, 140, 255, .35); background: radial-gradient(520px 180px at 0% 0%, rgba(177, 140, 255, .16), transparent 70%), linear-gradient(180deg, var(--surface), var(--bg-elev)); }
.gh-ai-icon { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--purple); background: var(--purple-soft); }
.gh-ai-icon .ico { width: 21px; height: 21px; }
.gh-ai-body { flex: 1; min-width: 0; }
.gh-ai-body h2 { font-size: 15.5px; }
.gh-ai-body h2 small { color: var(--purple); font-weight: 600; font-size: 14px; }
.gh-ai-text { margin: 4px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.gh-ai-sk { display: block; height: 13px; margin-top: 7px; width: 92%; border-radius: 6px; }
.gh-ai-sk.short { width: 58%; }
.gh-ai-action { flex-shrink: 0; }
.gh-ai-action .btn { white-space: nowrap; }

/* Números de hoje */
.gh-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gh-tile { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 16px 18px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-elev)); border: 1px solid var(--line); color: var(--text); transition: border-color .2s; }
a.gh-tile:hover { border-color: var(--accent-line); }
.gh-tile.wide { grid-column: 1 / -1; }
.gh-tile.wide p { margin: 0; }
.gh-tile small { color: var(--muted); font-size: 14px; }
.gh-tile strong { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; }
.gh-tile .up { color: var(--green); }
.gh-tile .down { color: #ff8b85; }
.gh-heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 6px; }
.gh-heat i { height: 12px; border-radius: 2px; background: var(--surface-3); }
.gh-heat i.l1 { background: rgba(240, 82, 82, .28); }
.gh-heat i.l2 { background: rgba(240, 82, 82, .5); }
.gh-heat i.l3 { background: rgba(240, 82, 82, .75); }
.gh-heat i.l4 { background: var(--accent); }
.gh-heat i.peak { box-shadow: 0 0 0 1px #fff inset; }

/* Linha do tempo */
.gh-cols { display: grid; gap: 18px; }
.gh-tl { padding: 20px; min-width: 0; }
.gh-tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.gh-live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.gh-filters { margin-left: auto; }
.gh-filters .chip { font-size: 14px; padding: 6px 12px; cursor: pointer; }
.gh-filters .chip.need:not(.active) { border-color: var(--accent-line); color: #ffb0ab; }
.gh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(240, 82, 82, .7); }
.gh-dot.ok { background: var(--green); box-shadow: none; }
#ghList.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.gh-member-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 14.5px; }
.gh-tl .notice { margin-bottom: 12px; }
.gh-tl-list { position: relative; display: grid; gap: 8px; padding-left: 22px; }
.gh-tl-list::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(var(--accent-line), rgba(255, 255, 255, .04)); }
.gh-ev { position: relative; padding: 11px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; color: var(--text-2); min-width: 0; }
.gh-ev::before { content: ''; position: absolute; left: -20px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); }
.gh-ev.red::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(240, 82, 82, .18); }
.gh-ev.amber::before { background: var(--amber); }
.gh-ev.green::before { background: var(--green); box-shadow: 0 0 0 4px rgba(79, 209, 160, .14); }
.gh-ev.blue::before { background: var(--blue); }
.gh-ev.purple::before { background: var(--purple); }
.gh-ev.need { border-color: var(--accent-line); background: linear-gradient(90deg, rgba(240, 82, 82, .1), var(--surface-2)); }
.gh-ev b { color: var(--text); font-weight: 650; }
.gh-ev code { font-size: 14px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text); }
.gh-ev-line { display: flex; align-items: flex-start; gap: 12px; }
.gh-ev-text { flex: 1; min-width: 0; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.gh-ev-line time { flex-shrink: 0; color: var(--muted-2); font-size: 13px; padding-top: 2px; white-space: nowrap; }
.gh-need-tag { color: #ffb0ab !important; }
.gh-ev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn.danger-soft { color: #ffb0ab; border-color: var(--accent-line); }
.gh-ev-status { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.gh-ev-status .ico { width: 14px; height: 14px; color: var(--green); }
.gh-ev-status.wait, .gh-ev-status.wait .ico { color: var(--amber); }
.gh-ev-more { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font-size: 14.5px; }
.gh-ev-more blockquote { margin: 0 0 6px; padding-left: 10px; border-left: 3px solid var(--accent-line); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.gh-ev-more ul { margin: 4px 0; padding-left: 18px; }
.gh-ev-more p { margin: 4px 0 0; }
.gh-wait { display: inline-flex; align-items: center; gap: 4px; color: var(--amber); font-size: 13.5px; }
.gh-wait .ico { width: 13px; height: 13px; }
.gh-fail { color: #ff8b85; font-size: 13.5px; }
.gh-ok { color: var(--green); font-size: 13.5px; }
.gh-older { display: flex; justify-content: center; margin-top: 12px; }
.gh-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; text-align: center; color: var(--text-2); }
.gh-empty .ico { width: 26px; height: 26px; color: var(--green); }
.gh-empty small { color: var(--muted); max-width: 420px; }

/* Missão 100% (na página só quando a coluna de grupos está escondida) */
.gh-mission { padding: 20px; display: grid; gap: 10px; }
.gm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 15px; }
.gm-head span { color: var(--accent-hi); font-weight: 700; font-size: 14px; }
.gh-mission p, .rail-mission p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.gh-mission .hn-list { margin-top: 4px; }
@media (min-width: 1025px) { .gh-mission { display: none; } }

/* Coluna de grupos: nota de cada grupo e Missão 100% */
.rail-score { flex-shrink: 0; min-width: 30px; text-align: center; font: 700 14.5px/1 var(--display); padding: 5px 6px; border-radius: 9px; }
.rail-score.green { color: var(--green); background: var(--green-soft); }
.rail-score.amber { color: var(--amber); background: var(--amber-soft); }
.rail-score.red { color: #ff8b85; background: rgba(240, 82, 82, .14); }
.rail-mission { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(240, 82, 82, .14), rgba(134, 168, 255, .04)); }
.rail-mission .gm-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-mission .progress { height: 6px; }
.gm-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gm-actions a { color: var(--muted); font-size: 13.5px; }
.gm-actions a:hover { color: var(--text); }
.hg-title { font-size: 15.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-title:hover { color: var(--accent-hi); }

@media (max-width: 1100px) {
  .gh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .gh { gap: 14px; }
  .gh-head { gap: 12px; }
  .hg-ring.gh-ring { width: 60px; height: 60px; order: 2; }
  .hg-ring.gh-ring::before { inset: 6px; }
  .hg-ring.gh-ring span { font-size: 20px; }
  .gh-title { flex: 1 1 0; order: 1; }
  .gh-name h1 { font-size: 22px; flex-basis: 100%; }
  .gh-sub { font-size: 14px; }
  .gh-links { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; }
  .gh-links::-webkit-scrollbar { display: none; }
  .gh-link { flex-shrink: 0; border-radius: 999px; padding: 7px 13px; }
  .gh-link.m-only { display: inline-flex; }
  .gh-more { display: none; }
  .gh-ai { flex-wrap: wrap; padding: 14px 16px; gap: 10px 12px; }
  .gh-ai-icon { width: 34px; height: 34px; }
  .gh-ai-body { flex-basis: calc(100% - 50px); }
  .gh-ai-text { font-size: 15px; }
  .gh-ai-action { flex-basis: 100%; }
  .gh-ai-action .btn { width: 100%; justify-content: center; }
  .gh-tiles { gap: 10px; }
  .gh-tile { padding: 12px 14px; }
  .gh-tile strong { font-size: 24px; }
  .gh-tl, .gh-mission { padding: 16px; }
  .gh-filters { margin: 0 -16px; padding: 0 16px; flex-basis: calc(100% + 32px); }
  .gh-tl-list { padding-left: 18px; }
  .gh-tl-list::before { left: 5px; }
  .gh-ev { padding: 10px 12px; font-size: 14.5px; }
  .gh-ev::before { left: -17px; }
  .gh-ev-actions .btn { flex: 1 1 auto; justify-content: center; }
}
