:root {
  --bg: #fbfbfc; --panel: #ffffff; --side: #f4f5f8; --line: #e6e7eb; --text: #1b1c21; --muted: #62646f;
  --accent: #5e6ad2; --accent-h: #4f5bc4; --focus: #5e6ad2;
  --draft: #6b6f7b; --sched: #3b63d1; --overdue: #b4371f; --cancel: #7a6f5a; --pub: #1f8a4c; --off: #6b6f7b;
  --radius: 8px; color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1012; --panel: #16171a; --side: #131417; --line: #26282e; --text: #e8e9ed; --muted: #9a9ca6;
    --draft: #a3a6b1; --sched: #8aa6ff; --overdue: #ff8a70; --cancel: #c9b996; --pub: #5fd391; --off: #a3a6b1; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--panel); padding: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; }
.brandmark { display: flex; gap: 8px; align-items: center; font-weight: 600; padding: 4px 8px 16px; }
.logo { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); display: inline-block; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.sidebar a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.sidebar a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.sidebar-note { font-size: 12px; color: var(--muted); padding: 16px 10px; }
main { padding: 20px 28px 48px; max-width: 1200px; width: 100%; }
main:focus { outline: none; }
.notice { border: 1px solid color-mix(in srgb, var(--overdue) 35%, var(--line)); background: color-mix(in srgb, var(--overdue) 7%, var(--panel)); padding: 8px 12px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.view-head h1 { font-size: 20px; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.actions { display: flex; gap: 8px; align-items: center; }
.month { min-width: 150px; text-align: center; font-weight: 600; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 8px 0; margin: 0; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; min-height: 32px; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-h); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.panel.warn { border-color: color-mix(in srgb, var(--overdue) 45%, var(--line)); }
.panel h2 { font-size: 14px; margin: 0 0 8px; }
.panel-head { display: flex; align-items: center; gap: 8px; }
.panel-head h2 { margin: 0; flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; border-left: 3px solid currentColor; }
.stat-n { font-size: 22px; font-weight: 600; color: var(--text); }
.stat-l { font-size: 12px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px; align-items: center; width: 100%; padding: 8px 4px; cursor: pointer; border-radius: 6px; }
.row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.row:focus-visible { outline: 2px solid var(--focus); }
.row-main { display: grid; min-width: 0; }
.row-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub, .row-when { color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; font-weight: 500; }
.b-draft { color: var(--draft); } .b-sched { color: var(--sched); } .b-overdue { color: var(--overdue); }
.b-cancel { color: var(--cancel); } .b-pub { color: var(--pub); } .b-off, .b-block { color: var(--off); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
select, input, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-height: 32px; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-top: 12px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-head div { padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-cell.pad { background: color-mix(in srgb, var(--text) 2%, transparent); }
.cal-day { font-size: 12px; color: var(--muted); }
.cal-wd { display: none; }
.cal-item { all: unset; box-sizing: border-box; display: flex; gap: 4px; align-items: center; font-size: 12px; padding: 2px 4px; border-radius: 4px; cursor: pointer; border-left: 2px solid currentColor; background: color-mix(in srgb, currentColor 8%, transparent); }
.cal-item:focus-visible { outline: 2px solid var(--focus); }
.cal-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.cal-text { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-cancel.cal-item .cal-text { text-decoration: line-through; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(680px, 96vw); background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 10, 15, .45); }
.dlg { padding: 16px 20px 20px; max-height: 90vh; overflow: auto; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: 0; font-size: 16px; }
.form { display: grid; gap: 10px; margin-top: 8px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field select, .field input:not([type=color]), .field textarea { width: 100%; min-width: 0; }
.grid2 > * { min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counter { justify-self: end; margin-top: -6px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-actions.left { justify-content: flex-start; }
.form-error { color: var(--overdue); margin: 0; }
.warn-text { color: var(--overdue); font-weight: 500; }
.sched { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: grid; gap: 8px; }
.sched h3 { margin: 0; font-size: 14px; }
.sched p { margin: 0; }
.hist { margin-top: 12px; font-size: 12px; color: var(--muted); }
.toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; max-width: 360px; font-size: 13px; }
.toast.t-error { background: var(--overdue); color: #fff; }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  main { min-width: 0; }
  .view-head h1 { width: 100%; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .sidebar ul { grid-auto-flow: column; overflow-x: auto; }
  .sidebar a { white-space: nowrap; }
  .brandmark, .sidebar-note { display: none; }
  main { padding: 12px; }
  .row { grid-template-columns: 12px 1fr; }
  .row-when, .row .badge { grid-column: 2; justify-self: start; }
  .grid2 { grid-template-columns: 1fr; }
  .cal-head { display: none; }
  .cal-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 0; border-right: 0; }
  .cal-cell.pad, .cal-cell.empty-day { display: none; }
  .cal-wd { display: inline; }
  /* ≥16px evita o zoom automático do navegador móvel ao focar campos. */
  select, input, textarea, .btn { font-size: 16px; }
  .btn { min-height: 40px; }
}
.kvs { display: grid; gap: 4px; margin: 8px 0; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px; min-width: 0; }
.kv dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.media-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; }
.up-row .row-sub.warn-text { white-space: normal; }
fieldset.field { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
fieldset.field legend { font-size: 12px; font-weight: 600; color: var(--muted); }
fieldset.field label { margin-right: 14px; font-weight: 400; color: var(--text); }
.sched label { display: block; }
@media (max-width: 760px) { .kv { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- tela de entrada (modo multi) ---------- */
.gated .sidebar nav,
.gated .notice,
.gated .sidebar-note:not(#whoami) { display: none; }
#whoami[hidden] { display: none; }
#whoami:not([hidden]) { flex-wrap: wrap; }
#whoami .account-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  #whoami:not([hidden]) > .account-admin-link {
    flex: 1 1 100%;
    order: 1;
  }
}
.card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 16px 18px;
}
.card h2 { font-size: 15px; margin: 0 0 6px; font-weight: 600; }
.card .form { margin-top: 8px; }

.pix-codigo{background:#0b0d12;border:1px solid #2b3342;border-radius:8px;padding:10px;font-size:12px;word-break:break-all;white-space:pre-wrap;max-height:160px;overflow:auto;color:#cfd6e6}

/* Popsdev design 20261204 */
:root{--bg:#080f0c;--panel:#101d17;--side:#0b1510;--line:#2c4235;--text:#f1f7f3;--muted:#afc2b5;--accent:#8de65b;--accent-h:#a5ef7c;--focus:#b4ff88;--surface:var(--panel);--border:var(--line);--draft:#bcc5c0;--sched:#9abfff;--overdue:#ffa58e;--cancel:#dec59b;--pub:#61dba1;--off:#bcc5c0;--radius:12px;color-scheme:dark}*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}body{font-size:15px;line-height:1.6}.shell{grid-template-columns:232px minmax(0,1fr)}.sidebar{padding:24px 14px;overflow-y:auto}.brandmark{font-size:20px;letter-spacing:-.04em;padding:0 10px 28px}.logo{width:24px;height:24px;background:#8de65b;border:5px solid #269366}.sidebar ul{gap:6px}.sidebar a{min-height:44px;padding:10px 12px}.sidebar a[aria-current=page]{background:#1b3525;color:var(--accent);box-shadow:inset 3px 0 #8de65b}.sidebar-note{line-height:1.6}main{min-width:0;padding:32px clamp(16px,3vw,44px) 64px;max-width:1400px}.view-head{gap:16px;margin-bottom:20px}.view-head h1{font-size:28px;letter-spacing:-.035em;font-weight:700}.actions,.filters{flex-wrap:wrap;gap:10px}.notice{padding:14px 16px;font-size:14px;border-left:3px solid var(--overdue)}.panel,.card{padding:20px;margin:16px 0;background:var(--panel);border-color:var(--line)}.panel h2,.card h2{font-size:17px}.panel-head{flex-wrap:wrap;gap:12px}.stats{gap:12px;margin:20px 0}.stat{padding:16px}.stat-n{font-size:30px;letter-spacing:-.04em}.stat-l,.row-sub,.row-when,.field label,.cal-day{font-size:13px}.btn,select,input,textarea{min-height:44px;border-radius:8px;padding:10px 12px}.btn{font-weight:600}.btn.primary{color:#10200c;background:var(--accent);border-color:var(--accent)}.btn.primary:hover{color:#10200c;border-color:var(--accent-h)}.btn.ghost{color:var(--muted);border-color:var(--line)}:focus-visible,.row:focus-visible,.cal-item:focus-visible,main:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.row{min-height:60px;padding:12px 8px}.row-title{font-weight:600}.badge{font-size:12px;padding:2px 9px}.form{gap:16px;margin-top:20px}.field{gap:7px}.grid2{gap:16px}textarea{min-height:144px;line-height:1.6}.dlg{padding:24px;max-height:90dvh}.dlg-head{gap:16px}.dlg-head h2{font-size:22px;letter-spacing:-.025em}dialog::backdrop{background:#020805cc}.dlg-actions{border-top:1px solid var(--line);padding-top:16px}.cal-cell{min-height:128px;padding:8px;gap:6px}.cal-head div{padding:12px 8px}.cal-item{min-height:44px;padding:8px 6px;gap:6px}.cal-text{white-space:normal;overflow-wrap:anywhere}.media-row{flex-wrap:wrap;min-height:44px}.toast{max-width:min(360px,calc(100vw - 32px))}.toast.t-error{color:#271009}@media(max-width:760px){.shell{grid-template-columns:minmax(0,1fr)}.sidebar{padding:10px;height:auto;overflow:visible}.sidebar ul{display:flex;overflow-x:auto;padding:4px;gap:6px}.sidebar li{flex:none}.sidebar a{min-height:44px}main{padding:20px 14px 48px}.view-head h1{font-size:26px}.panel,.card{padding:16px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.row-title{white-space:normal;overflow-wrap:anywhere}.row{gap:6px 10px}.grid2{grid-template-columns:1fr}.cal-cell{min-height:0;padding:12px}.cal-day{font-weight:700}.cal-item{font-size:14px}.btn,input,select,textarea{font-size:16px;min-height:44px}.dlg{padding:18px}.kv{grid-template-columns:1fr}.actions{max-width:100%}.month{min-width:110px}.field label{line-height:1.6}fieldset.field label{display:inline-flex;align-items:center;min-height:44px;gap:8px}}
.bp-brand{display:flex;flex-direction:column;align-items:center;gap:.5rem;box-sizing:border-box;width:100%;min-width:0;padding:.75rem;background:#fff;color:#173b2b;border-radius:.75rem}.bp-brand .bp-brand-image{display:block;position:static;flex:0 0 auto;width:70px;max-width:70px;height:auto;max-height:none;object-fit:contain;object-position:center;transform:none;clip-path:none;opacity:1;visibility:visible}.bp-brand-label{display:block;min-width:0;color:#173b2b;font-size:.875rem;line-height:1.5;text-align:center;overflow-wrap:anywhere}@media(max-width:640px){.bp-brand{flex-direction:row;align-items:center;padding:.5rem .75rem;gap:.5rem}.bp-brand .bp-brand-image{width:48px;max-width:48px;height:auto}.bp-brand-label{text-align:left}}

/* Popsdev nav 20261204 */
.sidebar .nav-group{list-style:none;margin:1rem 0 .35rem;padding:0 .75rem;font-size:.75rem;font-weight:700;letter-spacing:.04em}@media(max-width:768px){.sidebar .nav-group{display:none}.sidebar nav ul{display:flex;flex-flow:row nowrap;overflow-x:auto;padding-block:.5rem}.sidebar nav li{flex-shrink:0}.sidebar nav a{white-space:nowrap}}

/* Logout móvel 20261204 */
@media(max-width:760px){#whoami:not([hidden]){display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;box-sizing:border-box}#whoami:not([hidden])>span:not([hidden]){flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4}#whoami:not([hidden])>button:not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:44px;min-height:44px;box-sizing:border-box;white-space:nowrap}}
