/* Hub Grupos · identidade visual (mesma paleta e tipografia da apresentação para influenciadores) */
:root {
  --bg: #0a100e; --bg2: #0e1714; --surface: #121d19; --raise: #172621; --line: #22352d; --line2: #2c443a;
  --ink: #eef5f1; --muted: #9db1a7; --soft: #c9d8d0;
  --green: #2fd27f; --green-ink: #06261b; --green-glow: rgba(47, 210, 127, .16); --green-line: rgba(47, 210, 127, .35);
  --gold: #f2b84b; --gold-soft: rgba(242, 184, 75, .14); --gold-line: rgba(242, 184, 75, .35);
  --red: #ff6b6b; --red-soft: rgba(255, 107, 107, .12); --red-line: rgba(255, 107, 107, .4);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 14px; --r-lg: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.05; }
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--green); }
em { font-style: normal; color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
::selection { background: var(--green); color: var(--green-ink); }
[hidden] { display: none !important; }

.eyebrow { font: 600 .72rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hint { font-size: .85rem; color: var(--muted); }

/* marca */
.logo { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.logo b { font: 800 1.45rem/1 var(--display); letter-spacing: -.04em; }
.logo b i { font-style: normal; color: var(--green); }
.logo span { font: 600 .68rem var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* superfícies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(16px, 2.2vw, 24px); min-width: 0; }
.card > .card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.card > .card-head h2 { flex: 1; min-width: 0; }
.stack { display: grid; gap: 16px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* formulários */
label, .label { display: block; font-size: .82rem; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; font: inherit; font-size: 1rem; color: var(--ink);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6f857a; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239db1a7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; }
select option { background: var(--surface); color: var(--ink); }
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
textarea.short { min-height: 80px; }
input[type="time"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; min-width: 0; }
.row > .fixed { flex: 0 0 auto; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* checkbox e rádio */
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0; min-height: 36px; }
.check input { appearance: none; width: 20px; height: 20px; flex: 0 0 20px; margin: 0; border: 1.5px solid var(--line2); border-radius: 6px; background: rgba(0, 0, 0, .28); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--green); border-color: var(--green); }
.check input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border: solid var(--green-ink); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green-ink); }

/* interruptor */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; margin: 0; padding: 10px 0; font-size: .95rem; font-weight: 500; color: var(--ink); }
.switch small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.switch input { appearance: none; flex: 0 0 44px; width: 44px; height: 26px; border-radius: 999px; background: var(--line2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); background: var(--green-ink); }

/* controle segmentado */
.seg { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px; }
.seg button, .seg label { flex: 1; margin: 0; border: 0; background: transparent; color: var(--muted); padding: 9px 10px; border-radius: 9px; cursor: pointer; font: 700 .9rem var(--body); text-align: center; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg [aria-pressed="true"], .seg button.active, .seg label:has(input:checked) { background: var(--green); color: var(--green-ink); }
.seg button:not(.active):not([aria-pressed="true"]):hover, .seg label:not(:has(input:checked)):hover { color: var(--ink); }

/* dias da semana */
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { margin: 0; cursor: pointer; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: grid; place-items: center; min-width: 46px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font: 600 .85rem var(--mono); transition: .15s; }
.days input:checked + span { background: var(--green-glow); border-color: var(--green-line); color: var(--green); }
.days input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 12px; font: 700 .95rem var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; background: var(--green); color: var(--green-ink); }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--green-line); filter: none; }
.btn.gold { background: var(--gold); color: #2a1b00; }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red-line); }
.btn.danger:hover { background: var(--red-soft); filter: none; }
.btn.text { background: transparent; color: var(--muted); padding: 8px 10px; min-height: 36px; border: 0; }
.btn.text:hover { color: var(--ink); filter: none; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; }
.btn.block { width: 100%; }
.btn.wa { background: #1fa855; color: #fff; }

/* pílulas e etiquetas */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 600 .74rem var(--mono); letter-spacing: .02em; white-space: nowrap; background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { color: var(--green); background: var(--green-glow); border-color: var(--green-line); }
.pill.warn { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.pill.bad { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 9px; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 4px var(--green-glow); }
.dot.warn { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.dot.bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

/* mensagens */
.msg { font-size: .9rem; min-height: 0; }
.msg:not(:empty) { margin-top: 12px; }
.msg.ok { color: var(--green); } .msg.err { color: var(--red); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--ink); font-size: .92rem; }
.notice.green { border-color: var(--green-line); background: var(--green-glow); }
.notice.red { border-color: var(--red-line); background: var(--red-soft); }
.empty { color: var(--muted); font-size: .92rem; padding: 26px 12px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }

/* diálogos */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow); }
dialog.wide { width: min(920px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(3, 8, 6, .72); backdrop-filter: blur(3px); }
dialog .d-head { position: sticky; top: 0; z-index: 1; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
dialog .d-head h3 { flex: 1; font-size: 1.15rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
dialog .d-body { padding: 18px; }
dialog .d-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 14px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; }
  dialog .d-foot .btn { flex: 1; }
}

/* toast */
.toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--green-line); box-shadow: var(--shadow); font-size: .92rem; animation: toast-in .25s ease; }
.toast.err { border-color: var(--red-line); }
.toast::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--green); }
.toast.err::before { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* tabelas */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td small { display: block; color: var(--muted); font-size: .8rem; }

/* avatar */
.avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; display: grid; place-items: center; background: var(--raise) center/cover no-repeat; border: 1px solid var(--line); font: 800 1rem var(--display); color: var(--green); overflow: hidden; }
.avatar.lg { width: 84px; height: 84px; flex-basis: 84px; font-size: 1.6rem; }
