:root {
  /* Paleta v14 — identidade teal profissional.
     Os neutros carregam temperatura teal de propósito: a marca está no
     ambiente inteiro, não só nos botões. */
  --ink: #0a1413;          /* fundo: quase-preto com DNA teal */
  --panel: #101d1b;        /* superfície primária */
  --panel-2: #162926;      /* superfície elevada */
  --line: #1f3a36;         /* bordas e divisores */
  --paper: #ecfdf9;
  --muted: #7fa8a1;        /* texto secundário, teal acinzentado */
  --text: #e6f4f1;         /* texto principal */
  --accent: #14b8a6;       /* teal-500: realces, links, foco */
  --accent-deep: #0d9488;  /* teal-600: ações, botões */
  --accent-2: #5eead4;     /* teal-300: eyebrows e microtexto de destaque */
  --danger: #f87171;
  --warn: #fbbf24;
  --okay: #34d399;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--ink);
  background-image: radial-gradient(1100px 480px at 50% -140px, rgba(20,184,166,.14), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  min-height: 100vh;
}
/* assinatura: o filete teal no topo da página */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent) 45%, var(--accent-2));
}

h1, h2, h3, .display { font-family: 'Poppins', sans-serif; font-weight: 600; letter-spacing: -0.02em; }
.mono { font-family: 'JetBrains Mono', monospace; }

button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select {
  font-family: inherit; width: 100%;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.22); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
textarea { resize: vertical; min-height: 70px; }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }

.btn {
  background: var(--accent-deep); color: #ffffff; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; font-size: 14px;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { background: var(--accent); color: #06302b; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn.danger:hover { border-color: var(--danger); }

/* (bloco Auth antigo removido na v22 — layout novo vive no bloco v18) */
.error { background: rgba(248,113,113,.12); border: 1px solid var(--danger); color: #fecaca; padding: 10px 12px; border-radius: 8px; font-size: 13px; }

/* ---------- Layout ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(10,20,19,.86); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.topbar .logo { display: flex; align-items: center; gap: 9px; font-family: 'Space Grotesk'; font-weight: 700; font-size: 18px; color: var(--accent); }
.topbar .logo .dot { width: 11px; height: 11px; background: linear-gradient(135deg, var(--accent-deep), var(--accent-2)); border-radius: 3px; transform: rotate(45deg); }
.tabs { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.tab { background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.tab.active { background: var(--panel-2); color: var(--text); }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #04211d; font-family: 'Space Grotesk'; }

.main { padding: 22px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; }
.page-head .eyebrow { color: var(--accent-2); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; font-family: 'JetBrains Mono'; }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.col { flex: 0 0 270px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.col-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.col-head .idx { font-family: 'JetBrains Mono'; font-size: 11px; color: var(--ink); background: var(--accent-2); padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.col-head h3 { font-size: 14px; flex: 1; }
.col-head .count { color: var(--muted); font-size: 12px; }
.col-body { padding: 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.col-body.dragover { background: rgba(20,184,166,.08); }

.card {
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 11px 12px; cursor: grab;
}
.card:active { cursor: grabbing; }
.card.priv { border-left-color: var(--muted); }
.card h4 { font-size: 14px; font-weight: 600; font-family: 'Inter'; margin-bottom: 6px; }
.card .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); border: 1px solid var(--line); padding: 2px 7px; border-radius: 20px; font-size: 11px; }
.chip.due { color: var(--accent); border-color: rgba(20,184,166,.45); }
.chip.cal { color: var(--accent-2); border-color: rgba(94,234,212,.40); }
.card .ownerdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.add-card { text-align: left; color: var(--muted); background: transparent; border: 1px dashed var(--line); border-radius: 8px; padding: 9px; font-size: 13px; }
.add-card:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 4px; font-family: 'JetBrains Mono'; }
.cal-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.out { opacity: .35; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-daynum { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono'; }
.cal-cell.today .cal-daynum { color: var(--accent); font-weight: 700; }
.ev { font-size: 11px; padding: 3px 6px; border-radius: 5px; cursor: pointer; background: var(--panel-2); border-left: 3px solid var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.entrega { border-left-color: var(--accent-2); }
.ev.prazo { border-left-color: var(--danger); }
.ev.priv { opacity: .7; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h3 { min-width: 180px; text-align: center; text-transform: capitalize; }

/* ---------- Profiles ---------- */
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pcard .avatar { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; margin-bottom: 12px; }
.pcard h3 { font-size: 17px; }
.pcard .uname { color: var(--muted); font-size: 13px; font-family: 'JetBrains Mono'; margin-bottom: 10px; }
.pcard .bio { font-size: 13px; color: var(--text); line-height: 1.5; }
.pcard.me { border-color: var(--accent); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4,12,11,.76); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-height: 90vh; overflow-y: auto; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 20px; }
.modal-body .field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13px; }
.toggle input { width: auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.x { background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }

.comments { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.comment { display: flex; gap: 9px; margin-bottom: 12px; }
.comment .avatar { width: 28px; height: 28px; font-size: 12px; flex-shrink: 0; }
.comment .cbody { flex: 1; }
.comment .cbody .chead { font-size: 12.5px; margin-bottom: 2px; }
.comment .cbody .chead b { font-weight: 600; }
.comment .cbody .chead span { color: var(--muted); font-size: 11px; margin-left: 6px; }
.comment .cbody p { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.comment .del { background: none; color: var(--muted); font-size: 11px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }

.empty { text-align: center; color: var(--muted); padding: 40px; font-size: 14px; }
.badge-priv { font-size: 10px; background: var(--line); color: var(--muted); padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 640px) {
  .tabs .tab { padding: 8px 10px; font-size: 13px; }
  .who .name { display: none; }
  .cal-cell { min-height: 70px; }
  .main { padding: 14px; }
}

/* ---------- Filtro segmentado (Equipe / Meu) ---------- */
.segmented { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; }
.segmented button { background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.segmented button.on { background: var(--accent-deep); color: #ffffff; }

/* ---------- Chip de nível na barra superior ---------- */
.levelchip { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; }
.levelchip:hover { border-color: var(--accent); }
.lvnum { font-family: 'JetBrains Mono'; font-size: 11.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.lvpts { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.lvbar { display: block; width: 54px; height: 5px; background: var(--ink); border-radius: 3px; overflow: hidden; }
.lvbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); border-radius: 3px; transition: width .4s ease; }
.lvbar.big { width: 100%; height: 9px; margin: 10px 0 6px; }

/* ---------- Modal de progresso ---------- */
.lvbox { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.lvtop { display: flex; align-items: baseline; justify-content: space-between; }
.lvbig { font-family: 'Space Grotesk'; font-size: 21px; font-weight: 700; margin-right: 8px; }
.lvname { color: var(--accent-2); font-size: 13px; }
.lvpts.big { font-size: 16px; color: var(--accent); font-weight: 600; }
.lvnext { font-size: 12px; color: var(--muted); }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.statgrid div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 6px; text-align: center; }
.statgrid b { display: block; font-family: 'Space Grotesk'; font-size: 19px; }
.statgrid span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px,1fr)); gap: 8px; margin-top: 8px; }
.badge { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 6px; text-align: center; }
.badge span { display: block; font-size: 22px; margin-bottom: 4px; }
.badge em { font-style: normal; font-size: 10.5px; color: var(--text); line-height: 1.25; display: block; }
.badge.locked { opacity: .38; }
.badge.locked em { color: var(--muted); }

/* ---------- Metas ---------- */
.sec-title { font-size: 15px; color: var(--muted); margin: 22px 0 12px; text-transform: uppercase; letter-spacing: .07em; font-family: 'JetBrains Mono'; font-weight: 500; }
.goal-section:first-of-type .sec-title { margin-top: 0; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: var(--radius); padding: 16px; cursor: pointer; }
.gcard:hover { border-color: var(--accent); }
.gcard.complete { border-left-color: var(--accent); }
.ghead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ghead h4 { font-size: 15px; font-weight: 600; }
.gdesc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.45; }
.gbar { height: 8px; background: var(--ink); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.gbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); transition: width .4s ease; }
.gmeta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.gitem { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.gitem input { width: auto; flex-shrink: 0; }
.gitem span { flex: 1; }
.gitem.done span { text-decoration: line-through; color: var(--muted); }
.gitem em { font-style: normal; font-size: 10.5px; color: var(--accent-2); }
.gitem .del { background: none; color: var(--muted); font-size: 13px; }

/* ---------- Progresso no card da equipe ---------- */
.pcard { cursor: pointer; }
.pcard:hover { border-color: var(--accent); }
.pprog { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.plv { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pbadges { display: flex; gap: 5px; margin-top: 8px; font-size: 16px; flex-wrap: wrap; align-items: center; }
.muted-mini { font-size: 11px; color: var(--muted); }

/* ---------- Toasts de gamificação ---------- */
.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 200;
  background: var(--panel-2); border: 1px solid var(--accent);
  color: var(--text); padding: 12px 18px; border-radius: 10px;
  font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 34px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(14px); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast b { color: var(--accent); }
.badge-toast { display: flex; align-items: center; gap: 12px; bottom: 90px; border-color: var(--accent-2); }
.badge-toast .bicon { font-size: 26px; }
.badge-toast b { display: block; font-size: 12px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.badge-toast em { font-style: normal; font-size: 14px; }

@media (max-width: 640px) {
  .levelchip .lvbar { display: none; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .badge-toast { bottom: 84px; }
}

/* ---------- Versão ---------- */
.vtag { text-align: center; margin-top: 14px; font-family: 'JetBrains Mono'; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
button.logo { background: transparent; padding: 0; }
button.logo { color: var(--accent); }
button.logo:hover { filter: brightness(1.15); }
.vlist { display: flex; flex-direction: column; gap: 2px; }
.vrow { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: none; }
.vnum { font-family: 'JetBrains Mono'; font-size: 13px; color: var(--muted); min-width: 74px; flex-shrink: 0; }
.vrow.atual .vnum { color: var(--accent); font-weight: 600; }
.vbody { flex: 1; }
.vdate { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono'; }
.vbody p { font-size: 13.5px; line-height: 1.5; margin-top: 3px; }

/* ---------- Afazeres ---------- */
.list-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.list-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 9px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.list-tab:hover { border-color: var(--accent); color: var(--text); }
.list-tab.on { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.ldot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lcount { font-family: 'JetBrains Mono'; font-size: 11px; color: var(--muted); }
.lscope { font-size: 10px; background: var(--line); color: var(--accent-2); padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }

.list-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.lp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lp-head h3 { font-size: 19px; }
.lp-owner { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono'; }
.lp-actions { display: flex; gap: 8px; flex-shrink: 0; }
.lp-add { display: flex; gap: 8px; margin-bottom: 16px; }
.lp-add input { flex: 1; }
.lp-items { display: flex; flex-direction: column; }
.todo-row { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.todo-row:last-child { border-bottom: none; }
.todo-row input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.todo-row .tbody { flex: 1; }
.todo-row.done .tbody { text-decoration: line-through; color: var(--muted); }
.todo-row .tby { font-style: normal; font-size: 11px; color: var(--accent-2); }
.todo-row .del { background: none; color: var(--muted); font-size: 14px; opacity: 0; transition: opacity .15s; }
.todo-row:hover .del { opacity: 1; }
.todo-row .del:hover { color: var(--danger); }

@media (max-width: 640px) {
  .lp-head { flex-direction: column; }
  .list-tab { font-size: 12.5px; padding: 8px 11px; }
}

/* ---------- Equipes ---------- */
.team-sel { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; margin-left: 4px; }
.team-sel:hover { border-color: var(--accent); }
.ts-arrow { color: var(--muted); font-size: 10px; }
.ts-pending { background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }
.team-list { display: flex; flex-direction: column; gap: 6px; }
.team-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; text-align: left; }
.team-item:hover { border-color: var(--accent); }
.team-item.on { border-color: var(--accent); background: var(--ink); }
.team-item > span:first-child { font-weight: 600; font-size: 14.5px; }
.ti-meta { font-size: 11.5px; color: var(--muted); }
.ti-meta b { color: var(--danger); }
.mng-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.mng-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.mng-row:last-child { border-bottom: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; flex-shrink: 0; }
.mng-name { flex: 1; font-size: 13.5px; }
.invite-box { display: flex; gap: 8px; margin-top: 8px; }
.invite-box input { flex: 1; font-family: 'JetBrains Mono'; font-size: 12px; }
.inv-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

@media (max-width: 640px) {
  .team-sel .ts-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ================= PLANEJAMENTO ================= */
.plan-status { font-size: 12px; font-family: 'JetBrains Mono'; color: var(--muted); min-width: 82px; }
.plan-status.salvo { color: var(--accent-2); }
.plan-status.salvando { color: var(--accent); }
.plan-status.erro { color: var(--danger); }
#plan-proj-sel { width: auto; min-width: 160px; }

.plan-subs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.plan-sub { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.plan-sub:hover { color: var(--text); border-color: var(--accent); }
.plan-sub.on { background: var(--panel-2); color: var(--accent); border-color: var(--accent); }
.plan-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.block-head h3 { font-size: 18px; } .block-head h4 { font-size: 15px; }
.block-meta { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono'; }
.block-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

/* COBO */
.cobo-table, .rdc-table, .matriz-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.cobo-table th, .rdc-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 6px 8px; font-weight: 600; }
.cobo-table th .net { margin-top: 5px; font-size: 13px; }
.cobo-table td, .rdc-table td { padding: 3px 6px; }
.cobo-table input, .rdc-table input { font-size: 13px; }
.thin { width: 34px; text-align: center; }
.cobo-table .del, .rdc-table .del, .rot-row .del, .num-row .del { background: none; color: var(--muted); font-size: 13px; }
.cobo-table .del:hover, .rdc-table .del:hover { color: var(--danger); }
.rot-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rot-row input { flex: 1; }

/* RDC */
.rdc-table th.num, .rdc-table td.num { text-align: center; width: 58px; }
.rdc-table input.mini { width: 46px; text-align: center; padding: 6px 4px; }
.rdc-table td.nota { font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono'; }
.rdc-table td.ordem { font-family: 'JetBrains Mono'; color: var(--accent-2); }

/* Matriz */
.matriz-scroll { overflow-x: auto; margin-bottom: 18px; }
.matriz-table { min-width: 720px; }
.matriz-table th, .matriz-table td { border: 1px solid var(--line); padding: 4px; }
.matriz-table .attr-col { background: var(--panel-2); font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 110px; position: sticky; left: 0; }
.matriz-table .day-h { cursor: pointer; font-size: 12px; text-align: center; user-select: none; min-width: 90px; }
.matriz-table .day-h:hover { background: var(--panel-2); }
.matriz-table .day-state { font-size: 9px; color: var(--accent-2); text-transform: uppercase; }
.matriz-table input { font-size: 12px; padding: 5px; border-color: transparent; background: transparent; }
.matriz-table input:focus { border-color: var(--accent); background: var(--ink); }
.matriz-table .respiro, .day-h.respiro { background: rgba(251,191,36,.12); }
.matriz-table .livre, .day-h.livre { background: rgba(94,234,212,.12); }
.matriz-side { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.matriz-side .field { flex: 1; min-width: 140px; margin: 0; }
.matriz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.matriz-grid2 h4 { margin-bottom: 8px; }
.num-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.num-row .pos { font-family: 'JetBrains Mono'; font-size: 11px; color: var(--muted); width: 24px; }
.num-row input { flex: 1; font-size: 13px; }
.matriz-balance { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bal-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.bal-box h4 { margin-bottom: 10px; font-size: 13.5px; }
.bal-row { display: flex; gap: 12px; }
.bal-row label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bal-row input { text-align: center; }

/* Calendário estratégico */
.pcal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pcal-label { font-family: 'JetBrains Mono'; font-size: 13px; min-width: 130px; text-align: center; }
.pcal-grid { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pcal-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.pcal-corner { border-right: 1px solid var(--line); }
.pcal-dayhead { text-align: center; font-size: 11.5px; padding: 7px 2px; border-right: 1px solid var(--line); }
.pcal-dayhead span { color: var(--muted); font-family: 'JetBrains Mono'; font-size: 10px; }
.pcal-body { display: grid; grid-template-columns: 56px repeat(7, 1fr); position: relative; }
.pcal-hours { border-right: 1px solid var(--line); }
.pcal-hour { position: relative; }
.pcal-hour span { position: absolute; top: -8px; right: 6px; font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono'; }
.pcal-col { position: relative; border-right: 1px solid var(--line); }
.pcal-slot { border-bottom: 1px solid var(--line); cursor: pointer; }
.pcal-slot:hover { background: rgba(20,184,166,.06); }
.pcal-post { position: absolute; left: 3px; right: 3px; border-radius: 5px; padding: 4px 6px; font-size: 11px; line-height: 1.25; cursor: pointer; overflow: hidden; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.3); min-height: 22px; }
.pcal-post b { font-family: 'JetBrains Mono'; }
.pp-pal { display: flex; gap: 5px; margin-bottom: 6px; }
.pp-pal button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); }
.pp-preview { padding: 10px 12px; border-radius: 6px; margin: 10px 0; font-size: 13px; }
.pp-preview b { font-family: 'JetBrains Mono'; }
.allposts { display: flex; flex-direction: column; gap: 6px; }
.ap-row { display: flex; gap: 12px; padding: 8px 10px; background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 6px; }
.ap-date { font-family: 'JetBrains Mono'; font-size: 12px; color: var(--muted); min-width: 130px; }
.ap-text { font-size: 13px; }

@media (max-width: 720px) {
  .matriz-grid2, .matriz-balance { grid-template-columns: 1fr; }
}


/* ---------- Agentes de IA (v6) ---------- */
.ag-usage { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono'; border: 1px solid var(--line); padding: 5px 9px; border-radius: 7px; }
.ag-warn { background: rgba(251,191,36,.09); border: 1px solid var(--warn); color: var(--text); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.ag-warn b { color: var(--accent); font-family: 'JetBrains Mono'; }
.ag-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.ag-form-6 { grid-template-columns: repeat(3, 1fr); }
.ag-out { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.ag-loading { color: var(--muted); font-size: 13px; padding: 18px 0; }
.ag-error { color: var(--danger); font-size: 13px; border: 1px solid var(--danger); border-radius: var(--radius); padding: 12px 14px; }
.ag-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ag-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ag-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); font-family: 'JetBrains Mono'; }
.ag-dur { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono'; }
.ag-nota { margin-left: auto; font-family: 'Space Grotesk'; font-size: 26px; font-weight: 700; color: var(--accent); }
.ag-nota small { font-size: 13px; color: var(--muted); font-weight: 400; }
.ag-text { font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.ag-mono { font-family: 'JetBrains Mono'; font-size: 12.5px; }
.ag-hash { margin-top: 10px; font-size: 12.5px; color: var(--accent-2); }
.ag-dim { color: var(--muted); }
.ag-cta { margin-top: 10px; font-size: 13.5px; }
.ag-sec { margin-top: 14px; font-size: 13.5px; }
.ag-sec b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ag-sec ul { margin: 6px 0 0 18px; line-height: 1.7; }
.ag-fix b { color: var(--accent); }
.ag-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ag-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.ag-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ag-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 8px; text-transform: uppercase; letter-spacing: .06em; }
.ag-table td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.mt-media { font-size: 13.5px; margin: 16px 0 10px; }
.mt-media b { color: var(--accent); font-size: 16px; font-family: 'Space Grotesk'; }
.mt-table td { white-space: nowrap; }
.mt-up { color: var(--accent-2); }
.mt-down { color: var(--danger); }
.pr-group { margin-bottom: 20px; }
.pr-group-head { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); font-family: 'JetBrains Mono'; margin-bottom: 8px; }
.pr-row { display: flex; gap: 12px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.pr-main { flex: 1; min-width: 0; }
.pr-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pr-def { font-size: 10px; background: var(--accent); color: #04211d; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; }
.pr-body { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.pr-by { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono'; margin-top: 5px; }
.pr-acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
@media (max-width: 780px) {
  .ag-form, .ag-form-6 { grid-template-columns: 1fr; }
  .pr-row { flex-direction: column; }
}
.ag-dica { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.ag-dica b { color: var(--accent-2); font-weight: 600; }
.ag-guia { background: rgba(94,234,212,.07); border-left: 2px solid var(--accent-2); border-radius: 0; padding: 11px 14px; font-size: 12.5px; line-height: 1.65; color: var(--muted); margin-bottom: 16px; }
.ag-guia b { color: var(--accent-2); }
.ag-estrutura { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; font-family: 'JetBrains Mono'; }
.tr-linha { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.tr-rot { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-family: 'JetBrains Mono'; }
.tr-chars { font-size: 10px; font-family: 'JetBrains Mono'; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.tr-chars.over { color: var(--danger); border-color: var(--danger); }
.tr-valor { font-size: 14px; line-height: 1.6; }
.tr-fonte { font-size: 9px; background: var(--accent-2); color: #04211d; padding: 1px 5px; border-radius: 4px; margin-left: 6px; letter-spacing: .05em; }
.tr-total td { border-top: 2px solid var(--accent); font-weight: 600; }
.tr-total td:first-child { color: var(--accent); }
.tr-periodo { font-size: 12px; padding: 5px 7px; }

/* ===== v11: explicador de aba ===== */
.ag-explica{border:1px solid var(--line);border-radius:10px;margin-bottom:16px;overflow:hidden;background:rgba(255,255,255,.02)}
.ag-explica-head{display:flex;width:100%;gap:12px;justify-content:space-between;align-items:flex-start;
  background:none;border:0;color:inherit;font:inherit;text-align:left;padding:12px 14px;cursor:pointer;line-height:1.45}
.ag-explica-head:hover{background:rgba(255,255,255,.03)}
.ag-explica-seta{opacity:.6;flex:0 0 auto}
.ag-explica-corpo{display:none;padding:0 14px 14px;gap:24px;border-top:1px solid var(--line)}
.ag-explica.aberto .ag-explica-corpo{display:flex;flex-wrap:wrap;padding-top:12px}
.ag-explica-col{flex:1 1 260px;min-width:0}
.ag-explica-col h5{margin:6px 0 4px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.65}
.ag-explica-col ul{margin:0;padding-left:18px}
.ag-explica-col li,.ag-explica-col p{margin:4px 0;line-height:1.5;font-size:13px}

/* ===== v11: análise visual de peça ===== */
.pc-grid{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.pc-thumb{position:relative;width:104px}
.pc-thumb img{width:104px;height:104px;object-fit:cover;border-radius:8px;display:block;border:1px solid var(--line)}
.pc-num{display:block;font-size:11px;opacity:.7;margin-top:4px;text-align:center}
.pc-x{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;border:0;cursor:pointer;
  background:var(--danger);color:#fff;font-size:15px;line-height:22px;padding:0}
.pc-veredito{border-radius:10px;padding:12px 14px;margin:12px 0;border-left:4px solid}
.pc-veredito b{text-transform:uppercase;font-size:11px;letter-spacing:.08em}
.pc-veredito p{margin:6px 0 0;line-height:1.5}
.pc-ok{border-color:var(--okay);background:rgba(52,211,153,.10)}
.pc-meio{border-color:var(--warn);background:rgba(251,191,36,.10)}
.pc-ruim{border-color:var(--danger);background:rgba(248,113,113,.10)}
.pc-bloco{margin:14px 0}
.pc-bloco h4{margin:0 0 8px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;opacity:.75}
.pc-bloco ol,.pc-bloco ul{margin:0;padding-left:20px}
.pc-bloco li{margin:4px 0;line-height:1.5}
.pc-crit{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin-bottom:8px}
.pc-crit-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:4px}
.pc-crit p{margin:4px 0;line-height:1.5;font-size:13px}
.pc-crit i{opacity:.65;font-style:normal;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.pc-limite{opacity:.75}

/* ===== v12 ===== */
.ag-sep{display:flex;align-items:center;gap:12px;margin:18px 0 12px;opacity:.6;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.ag-sep::before,.ag-sep::after{content:"";flex:1;height:1px;background:var(--line)}
.ag-check{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:13px}
.ag-usage-alerta{color:var(--warn);font-weight:600}
.lg-ts{width:100%;margin-top:6px;font-size:13px;line-height:1.5}

/* ============================================================
   v15 — CAMADA DE MOVIMENTO E ACABAMENTO
   Regras aqui embaixo vencem as de cima por ordem no cascade.
   O app re-renderiza o DOM a cada mudança de estado, então TODA
   animação de entrada é curta (<=350ms) e sutil (<=10px) — replay
   frequente precisa parecer respiro, nunca espetáculo.
   O prefers-reduced-motion definido acima usa !important e
   continua desligando tudo isto. 
   ============================================================ */

@keyframes k-up   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes k-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-pop  { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes k-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes k-bar  { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes k-spin { to { transform: rotate(360deg); } }
@keyframes k-glow { 0%,100% { box-shadow: inset 0 0 0 1px var(--accent); }
                    50%     { box-shadow: inset 0 0 0 1px var(--accent), 0 0 14px rgba(20,184,166,.35); } }

/* ---------- entradas ---------- */
.main { animation: k-in .3s ease both; }
.col { animation: k-up .32s ease both; }
.col:nth-child(2) { animation-delay: .03s; }
.col:nth-child(3) { animation-delay: .06s; }
.col:nth-child(4) { animation-delay: .09s; }
.col:nth-child(5) { animation-delay: .12s; }
.col:nth-child(6) { animation-delay: .15s; }
.card, .gcard, .pcard, .ag-card { animation: k-up .28s ease both; }
.card:nth-child(2), .gcard:nth-child(2), .pcard:nth-child(2) { animation-delay: .03s; }
.card:nth-child(3), .gcard:nth-child(3), .pcard:nth-child(3) { animation-delay: .06s; }
.card:nth-child(4), .gcard:nth-child(4), .pcard:nth-child(4) { animation-delay: .09s; }
.card:nth-child(5), .gcard:nth-child(5), .pcard:nth-child(5) { animation-delay: .12s; }
.card:nth-child(n+6), .gcard:nth-child(n+6), .pcard:nth-child(n+6) { animation-delay: .15s; }
.cal-cell { animation: k-in .3s ease both; }
.list-panel, .plan-panel, .ag-out, .invite-box { animation: k-up .3s ease both; }
.ag-explica, .ag-warn, .ag-guia, .ag-error { animation: k-drop .26s ease both; }
.auth-card { animation: k-pop .38s cubic-bezier(.2,.9,.3,1.1) both; }

/* ---------- modal ---------- */
.overlay { animation: k-in .18s ease both; }
.modal { animation: k-pop .26s cubic-bezier(.2,.9,.3,1.05) both; }

/* ---------- cartões: profundidade viva ---------- */
.card, .gcard, .pcard, .list-tab, .ag-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover, .gcard:hover, .ag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35), 0 0 0 1px rgba(20,184,166,.18);
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.card:active { transform: scale(.99); cursor: grabbing; }
.col-body.dragover { outline: 2px dashed var(--accent); outline-offset: -6px; border-radius: 8px; }

/* ---------- abas com sublinhado que desliza ---------- */
.tab { position: relative; transition: color .16s ease; }
.tab::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2));
  border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.65,0,.35,1);
}
.tab:hover { color: var(--text); }
.tab:hover::after { transform: scaleX(.55); }
.tab.active::after { transform: scaleX(1); }

/* ---------- botões: gradiente, elevação, pressão ---------- */
.btn {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(13,148,136,.35);
  transition: transform .12s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #fff; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13,148,136,.45); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: 0 2px 8px rgba(13,148,136,.3); }
.btn.ghost, .btn.danger { background: transparent; box-shadow: none; }
.btn.ghost { color: var(--text); }
.btn.ghost:hover { transform: none; filter: none; border-color: var(--accent); color: var(--accent-2); background: rgba(20,184,166,.06); }
.btn.danger:hover { transform: none; filter: none; background: rgba(248,113,113,.08); }
.btn:disabled { opacity: .55; transform: none; filter: grayscale(.4); cursor: wait; }

/* ---------- barras de progresso vivas ---------- */
.lvbar i, .gbar i {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2), var(--accent-deep));
  background-size: 200% 100%;
  animation: k-bar 2.6s linear infinite;
}

/* ---------- carregando: spinner discreto ---------- */
.ag-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.ag-loading::before {
  content: ""; width: 15px; height: 15px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: k-spin .7s linear infinite;
}

/* ---------- hoje no calendário: pulso suave ---------- */
.cal-cell.today { animation: k-glow 2.8s ease-in-out infinite; }

/* ---------- microinterações ---------- */
.ev { transition: transform .14s ease, filter .14s ease; }
.ev:hover { transform: translateX(2px); filter: brightness(1.15); }
.chip { transition: border-color .16s ease; }
.todo-row, .gitem { transition: background .16s ease; }
.todo-row:hover, .gitem:hover { background: rgba(20,184,166,.04); }
.todo-row input[type=checkbox], .gitem input { transition: transform .12s ease; }
.todo-row input[type=checkbox]:active, .gitem input:active { transform: scale(1.25); }
.badge:not(.locked) { transition: transform .16s ease; }
.badge:not(.locked):hover { transform: translateY(-2px) scale(1.03); }
.levelchip { transition: border-color .16s ease, box-shadow .16s ease; }
.levelchip:hover { box-shadow: 0 0 0 3px rgba(20,184,166,.12); }
.x { transition: color .14s ease, transform .14s ease; }
.x:hover { color: var(--text); transform: rotate(90deg); }
.add-card { transition: color .16s ease, border-color .16s ease, background .16s ease; }
.add-card:hover { background: rgba(20,184,166,.05); }
input, textarea, select { transition: border-color .16s ease, box-shadow .16s ease; }
.segmented button { transition: background .16s ease, color .16s ease; }
.list-tab:hover { transform: translateY(-1px); }

/* ---------- toasts com quique ---------- */
.toast { transition: opacity .22s ease; animation: none; }
.toast.show { animation: k-pop .32s cubic-bezier(.2,.9,.3,1.15) both; opacity: 1; transform: none; }

/* ---------- vazio vira convite ---------- */
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(20,184,166,.03); animation: k-in .3s ease both;
}

/* ---------- barra de rolagem na identidade ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- topbar: divisa com brilho ---------- */
.topbar { border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--line), rgba(20,184,166,.5), var(--line)) 1; }


/* ============================================================
   v17 — SIDEBAR ESQUERDA + TEMAS (claro / escuro / preto)
   ============================================================ */

/* ---- os três temas: só trocam as variáveis ---- */
:root[data-tema="claro"] {
  --ink: #f2f6f5;
  --panel: #ffffff;
  --panel-2: #eef4f3;
  --line: #d5e2df;
  --muted: #5b7a75;
  --text: #0c1c1a;
  --accent: #0d9488;
  --accent-deep: #0f766e;
  --accent-2: #0d9488;
}
:root[data-tema="claro"] body {
  background-image: radial-gradient(1100px 480px at 50% -160px, rgba(13,148,136,.10), transparent 70%);
}

/* ---- layout com sidebar ---- */
#app { display: flex; min-height: 100vh; }
.sidebar {
  width: 244px; flex: 0 0 244px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line);
  transition: width .24s cubic-bezier(.4,0,.2,1), flex-basis .24s cubic-bezier(.4,0,.2,1);
  z-index: 50; overflow: hidden;
}
.main { flex: 1; min-width: 0; max-width: none; margin: 0; padding: 26px 30px; }

/* recolhida */
body.nav-off .sidebar { width: 0; flex-basis: 0; border-right-color: transparent; }
.nav-fab {
  position: fixed; left: 16px; bottom: 20px; z-index: 60;
  width: 46px; height: 46px; border-radius: 13px; font-size: 19px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #fff;
  box-shadow: 0 8px 22px rgba(13,148,136,.4);
  opacity: 0; transform: scale(.6) translateY(10px); pointer-events: none;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.9,.3,1.3);
}
body.nav-off .nav-fab { opacity: 1; transform: none; pointer-events: auto; }
.nav-fab:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* topo */
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px; gap: 8px; }
.sb-brand { display: flex; align-items: center; gap: 9px; background: transparent; padding: 0; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; }
.sb-brand .dot { width: 12px; height: 12px; flex: 0 0 auto; background: linear-gradient(135deg, var(--accent-deep), var(--accent-2)); border-radius: 3px; transform: rotate(45deg); }
.sb-brand:hover { filter: brightness(1.12); }
.sb-toggle { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: 18px; line-height: 1; transition: background .16s ease, color .16s ease; }
.sb-toggle:hover { background: var(--accent-deep); color: #fff; }

/* seletor de equipe */
.sb-team {
  display: flex; align-items: center; gap: 10px; margin: 4px 12px 12px;
  padding: 10px 12px; border-radius: 11px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.sb-team:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.1); }
.sb-team-ava { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--accent-deep), var(--accent)); }
.sb-team-name { flex: 1; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-team-arrow { color: var(--muted); font-size: 11px; }
.sb-pending { background: var(--accent); color: #04211d; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }

/* grupos e itens */
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 12px; }
.sb-group { margin-bottom: 18px; }
.sb-group-title { display: block; font-family: 'JetBrains Mono'; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 10px 8px; opacity: .8; white-space: nowrap; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; margin-bottom: 2px; border-radius: 10px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px;
  text-align: left; position: relative;
  transition: background .16s ease, color .16s ease, transform .12s ease;
}
.sb-item:hover { background: var(--panel-2); color: var(--text); }
.sb-item.on { background: linear-gradient(90deg, rgba(20,184,166,.16), rgba(20,184,166,.04)); color: var(--text); }
.sb-item.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--accent-deep), var(--accent-2)); }
.sb-ic { width: 20px; flex: 0 0 auto; text-align: center; font-size: 15px; }
.sb-label { white-space: nowrap; overflow: hidden; }

/* rodapé */
.sb-bottom { padding: 10px 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.sb-level { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; background: transparent; color: var(--text); transition: background .16s ease; }
.sb-level:hover { background: var(--panel-2); }
.sb-level-info { flex: 1; min-width: 0; }
.sb-level-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.sb-level-top b { font-family: 'Space Grotesk'; }
.sb-level-top span { color: var(--muted); }
.sb-theme, .sb-user, .sb-out {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: left;
  transition: background .16s ease, color .16s ease;
}
.sb-theme:hover, .sb-user:hover { background: var(--panel-2); color: var(--text); }
.sb-out:hover { background: rgba(248,113,113,.1); color: var(--danger); }
.sb-user-ava { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 11px; color: #fff; }
.sb-user-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-theme-ic { font-size: 14px; }

/* entrada da sidebar */
.sidebar { animation: k-in .3s ease both; }
.sb-item { animation: k-rise .3s ease both; }
.sb-group:nth-child(1) .sb-item:nth-child(2) { animation-delay: .02s; }
.sb-group:nth-child(1) .sb-item:nth-child(3) { animation-delay: .04s; }
.sb-group:nth-child(1) .sb-item:nth-child(4) { animation-delay: .06s; }
.sb-group:nth-child(2) .sb-item { animation-delay: .05s; }

/* light theme: sombras e brilhos mais suaves */
:root[data-tema="claro"] .btn { box-shadow: 0 2px 8px rgba(13,148,136,.28); }
:root[data-tema="claro"] .card:hover, :root[data-tema="claro"] .gcard:hover { box-shadow: 0 10px 24px rgba(15,42,38,.12), 0 0 0 1px rgba(13,148,136,.18); }
:root[data-tema="claro"] .modal { box-shadow: 0 24px 60px rgba(15,42,38,.16); }
:root[data-tema="claro"] .overlay { background: rgba(15,42,38,.35); }

/* a topbar antiga não existe mais; neutraliza resíduos se algum surgir */
.topbar { display: none; }

@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; box-shadow: 8px 0 40px rgba(0,0,0,.5); }
  .main { padding: 20px 16px; }
  body:not(.nav-off) .nav-fab { opacity: 1; transform: none; pointer-events: auto; }
}



/* ============================================================
   v18 — LOGIN COM MASCOTE INTERATIVA (layout de referência)
   Estágio escuro à esquerda com a mascote que segue o mouse,
   cartão claro à direita. Cores da paleta teal.
   ============================================================ */
@keyframes k-rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes k-float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes k-shadow  { 0%,100% { transform: scaleX(1); opacity: .5; } 50% { transform: scaleX(.82); opacity: .3; } }

#app:has(.auth-wrap) { display: block; }
.auth-wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; width: 100vw;
  max-width: 100%; margin: 0; padding: 0; background: var(--panel); place-items: stretch;
}

/* ---- estágio da mascote (esquerda) ---- */
.auth-stage {
  position: relative; overflow: hidden; display: grid; place-items: center;
  width: 100%; height: 100%; min-height: 100vh; margin: 0;
  /* fundo rico preenchendo até as bordas do painel (a logo é transparente por cima) */
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(18,184,166,.10), transparent 70%),
    radial-gradient(130% 120% at 44% 36%, #10221e 0%, #0a1512 48%, #050d0b 100%);
}
.as-glow {
  position: absolute; width: 90%; height: 70%; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.18), transparent 66%);
  filter: blur(60px); pointer-events: none;
  animation: k-float-y 7s ease-in-out infinite;
}
.as-shadow {
  position: absolute; bottom: 16%; width: 40%; max-width: 240px; height: 30px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20,184,166,.3), transparent 70%);
  filter: blur(11px); animation: k-shadow 6s ease-in-out infinite;
}
.as-brand {
  position: absolute; top: 30px; left: 34px; z-index: 3;
  font-family: 'Space Grotesk'; font-weight: 700; font-size: 15px; letter-spacing: .04em;
  color: var(--accent-2); opacity: .85;
}

/* ---- lado do formulário (direita) ---- */
.auth-side { display: grid; place-items: center; width: 100%; height: 100%; min-height: 100vh; padding: 40px 48px; background: var(--panel); }
.auth-card {
  width: 100%; max-width: 380px; border: none; box-shadow: none; padding: 0; background: transparent;
  animation: k-rise .45s ease .1s both;
}
.ac-ava {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent)); }
.ac-title { text-align: center; font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.ac-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }

.ac-lbl { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 7px; text-transform: none; letter-spacing: 0; }
.ac-inp {
  position: relative; margin-bottom: 16px;
  background: var(--panel-2); border: 1.5px solid transparent; border-radius: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.ac-inp:focus-within { border-color: var(--accent); background: var(--panel); box-shadow: 0 0 0 4px rgba(20,184,166,.14); }
.ac-inp input { background: transparent; border: none; box-shadow: none; padding: 13px 15px; font-size: 14.5px; }
.ac-inp input:focus { outline: none; box-shadow: none; }
.ac-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 15px; opacity: .6; transition: opacity .16s ease, color .16s ease; }
.ac-eye:hover, .ac-eye.on { opacity: 1; color: var(--accent); }

.ac-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 13px; }
.ac-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.ac-check input { width: 16px; height: 16px; accent-color: var(--accent-deep); cursor: pointer; }
.ac-forgot { color: var(--accent-deep); font-weight: 600; cursor: pointer; }
.ac-forgot:hover { text-decoration: underline; }

.ac-submit {
  width: 100%; padding: 15px; border-radius: 40px; font-size: 15px; font-weight: 700;
  color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 26px rgba(13,148,136,.32); transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
.ac-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(13,148,136,.42); filter: brightness(1.08); }
.ac-submit:active { transform: translateY(0) scale(.99); }

/* no tema claro o botão preto some no fundo branco? não — fundo do card é claro,
   então o preto contrasta. Mas no tema preto, trocamos para teal. */

.ac-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 12px; }
.ac-or::before, .ac-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.ac-alt {
  width: 100%; padding: 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.ac-alt:hover { border-color: var(--accent); background: rgba(20,184,166,.06); transform: translateY(-1px); }
.ac-alt-ic { color: var(--accent-deep); font-size: 15px; }

.ac-switch { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.ac-switch a { color: var(--accent-deep); font-weight: 700; cursor: pointer; }
.ac-switch a:hover { text-decoration: underline; }
.ac-ver { text-align: center; margin-top: 14px; font-family: 'JetBrains Mono'; font-size: 10px; color: var(--muted); opacity: .5; letter-spacing: .06em; }

.auth-card .error { margin-bottom: 16px; animation: k-rise .28s ease both; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-stage { min-height: 280px; }
  .auth-side { padding: 32px 22px; }
}

/* ============================================================
   v19 — INTERRUPTOR DE TEMA, RECOLHER MAIOR, LIXEIRA, POLIMENTO
   ============================================================ */

/* ---- botão de recolher: maior e mais visível ---- */
.sb-toggle {
  width: 38px; height: 38px; border-radius: 11px; font-size: 22px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sb-toggle:hover { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); transform: scale(1.06); box-shadow: 0 4px 14px rgba(13,148,136,.4); }
.sb-toggle:active { transform: scale(.94); }
/* o botão flutuante de reabrir também cresce */
.nav-fab { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; }

/* ---- interruptor claro/escuro ---- */
.sb-switch {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px;
  border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px;
  transition: background .16s ease, color .16s ease;
}
.sb-switch:hover { background: var(--panel-2); color: var(--text); }
.sw-track {
  position: relative; width: 46px; height: 26px; flex: 0 0 auto; border-radius: 40px;
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
  transition: background .22s ease;
}
.sb-switch.dark .sw-track { background: #0b2420; }
.sw-ic { font-size: 11px; line-height: 1; z-index: 1; transition: opacity .22s ease; }
.sw-sun { color: #f59e0b; }
.sw-moon { color: var(--accent-2); }
.sb-switch:not(.dark) .sw-moon { opacity: .3; }
.sb-switch.dark .sw-sun { opacity: .3; }
.sw-knob {
  position: absolute; top: 50%; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  transform: translateY(-50%); transition: transform .26s cubic-bezier(.4,.1,.2,1.3), background .22s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.sb-switch.dark .sw-knob { transform: translateY(-50%) translateX(20px); background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }


/* ---- lixeira do Kanban ---- */
.kb-trash {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 200%); opacity: 0;
  z-index: 70; display: flex; align-items: center; gap: 12px;
  padding: 16px 30px; border-radius: 16px;
  background: rgba(20,184,166,.14); border: 2px dashed var(--accent); color: var(--accent-2);
  font-weight: 600; font-size: 14px; backdrop-filter: blur(8px);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), background .18s ease, box-shadow .18s ease;
  pointer-events: none;
}
body.dragging .kb-trash { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.kb-trash.over {
  background: var(--accent-deep); color: #fff; border-style: solid;
  box-shadow: 0 12px 40px rgba(13,148,136,.5); transform: translate(-50%, 0) scale(1.05);
}
.kb-trash-ic { font-size: 22px; }
.kb-trash.over .kb-trash-ic { animation: k-shake .4s ease infinite; }
@keyframes k-shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
/* card levemente destacado enquanto arrasta */
body.dragging .card { cursor: grabbing; }

/* ---- polimento geral do "local" (áreas de conteúdo) ---- */
.page-head h2 { font-size: 26px; font-weight: 600; }
.page-head .eyebrow { font-family: 'JetBrains Mono'; }
.col { border-radius: 14px; }
.col-head { padding: 14px 15px; }
.col-head .idx { background: var(--accent-deep); color: #fff; }
.card { border-radius: 11px; }
.main { max-width: 1600px; }

/* Poppins pede um respiro a mais entre linhas nos textos longos */
.gdesc, .block-hint, .ag-guia, .comment .cbody p, .vbody p { line-height: 1.6; }

/* remove qualquer resquício do botão de tema antigo */
.sb-theme, .sb-theme-ic { all: unset; }

@media (max-width: 760px) {
  .kb-trash { left: 16px; right: 16px; transform: translateY(130%); justify-content: center; }
  body.dragging .kb-trash { transform: translateY(0); }
  .kb-trash.over { transform: translateY(0) scale(1.03); }
}

/* ============================================================
   v20 — ÍCONES SVG (dimensionamento e alinhamento)
   ============================================================ */
/* na navegação: ícone maior e mais presente que a versão em símbolo */
.sb-ic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.sb-ic svg { width: 20px; height: 20px; display: block; }
/* item ativo: o ícone acende no teal (currentColor já herda) e ganha leve escala */
.sb-item { transition: background .16s ease, color .16s ease; }
.sb-item.on .sb-ic svg { color: var(--accent); }
.sb-item:hover .sb-ic { transform: scale(1.08); transition: transform .14s ease; }

/* interruptor: sol e lua desenhados */
.sw-ic svg { width: 12px; height: 12px; display: block; }
.sw-track { padding: 0 5px; }

/* rodapé: estrela do nível e power do sair */
.sb-level .sb-ic svg { width: 18px; height: 18px; color: var(--accent); }
.sb-out .sb-ic svg { width: 18px; height: 18px; }

/* login: avatar com ícone e botão de convite */
.ac-ava svg { width: 24px; height: 24px; color: #fff; }
.ac-alt-ic svg { width: 17px; height: 17px; display: block; }
.ac-alt-ic { display: inline-flex; }

/* garante que todo SVG de ícone não herde stroke-width estranho de outros escopos */
.sb-ic svg, .sw-ic svg, .ac-ava svg, .ac-alt-ic svg { flex: 0 0 auto; }


/* ===== v23: gerenciar concluídas ===== */
.cc-count { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.cc-count b { color: var(--accent); font-size: 18px; }
.cc-sep { height: 1px; background: var(--line); margin: 18px 0; }
.cc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 260px; overflow-y: auto; }
.cc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.cc-row-title { font-size: 13.5px; opacity: .85; }

/* ============================================================
   v24 — PAINEL DE ADMINISTRAÇÃO
   ============================================================ */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.adm-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.adm-card:hover { border-color: rgba(20,184,166,.4); box-shadow: 0 8px 24px rgba(0,0,0,.25); transform: translateY(-2px); }
.adm-card.susp { opacity: .72; border-style: dashed; }
.adm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.adm-name { font-family: 'Space Grotesk'; font-weight: 700; font-size: 17px; }
.adm-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.adm-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.adm-badge.on { background: rgba(52,211,153,.16); color: var(--okay); }
.adm-badge.off { background: rgba(248,113,113,.16); color: var(--danger); }
.adm-plano { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.adm-plano b { color: var(--accent-2); }
.adm-metric { margin-bottom: 12px; }
.adm-metric-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.adm-bar { height: 7px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.adm-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); border-radius: 4px; transition: width .4s ease; }
.adm-bar i.hot { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.adm-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.adm-actions .btn { flex: 1; min-width: 84px; }


/* ============================================================
   v30 — LOGO VETORIAL (recriação da arte 3D) no login
   ============================================================ */
@keyframes lg-enter {
  from { opacity: 0; transform: scale(.9) translateY(20px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes lg-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lg-confirm {
  0%   { transform: scale(1); filter: none; }
  30%  { transform: scale(1.05); filter: drop-shadow(0 0 34px rgba(20,184,166,.9)) brightness(1.15); }
  55%  { transform: scale(.98); }
  100% { transform: scale(1.5) translateY(-40px); opacity: 0; filter: drop-shadow(0 0 50px rgba(20,184,166,1)); }
}

/* o SVG entra ao carregar e depois respira de leve */
.mascote {
  display: block; width: min(88%, 560px); height: auto;
  user-select: none; -webkit-user-drag: none;
  will-change: transform;
  animation: lg-enter .7s cubic-bezier(.2,.9,.3,1.05) both, lg-breathe 7s ease-in-out infinite 1.2s;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,.6));
}
/* cada camada gira/desloca em torno do próprio centro no parallax */
.mascote .kb-rede, .mascote .kb-nos, .mascote .kb-brac, .mascote .kb-espinha {
  transform-box: view-box; transition: transform .05s linear;
}
@media (max-width: 860px) { .mascote { width: 74%; } }

/* gesto ao confirmar o login */
.mascote.lg-go { animation: lg-confirm .62s cubic-bezier(.4,0,.2,1) forwards !important; }

/* ===== v33: efeito de LUZES na rede (nós acendem em onda, conexões vivas) ===== */
@keyframes kb-luz {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(90,214,198,.45)); }
  50%      { filter: drop-shadow(0 0 9px rgba(120,236,220,.95)) brightness(1.28); }
}
.mascote .kb-nos circle { animation: kb-luz 2.6s ease-in-out infinite; }
/* onda: cada nó acende com um pequeno atraso, dando a sensação de sinal percorrendo a rede */
.mascote .kb-nos circle:nth-child(1)  { animation-delay: 0s; }
.mascote .kb-nos circle:nth-child(2)  { animation-delay: .18s; }
.mascote .kb-nos circle:nth-child(3)  { animation-delay: .36s; }
.mascote .kb-nos circle:nth-child(4)  { animation-delay: .54s; }
.mascote .kb-nos circle:nth-child(5)  { animation-delay: .72s; }
.mascote .kb-nos circle:nth-child(6)  { animation-delay: .90s; }
.mascote .kb-nos circle:nth-child(7)  { animation-delay: 1.08s; }
.mascote .kb-nos circle:nth-child(8)  { animation-delay: 1.26s; }
.mascote .kb-nos circle:nth-child(9)  { animation-delay: 1.44s; }
.mascote .kb-nos circle:nth-child(10) { animation-delay: 1.62s; }
.mascote .kb-nos circle:nth-child(11) { animation-delay: 1.80s; }
.mascote .kb-nos circle:nth-child(12) { animation-delay: 1.98s; }
.mascote .kb-nos circle:nth-child(13) { animation-delay: 2.16s; }
/* o vértice do K é o hub: brilha mais forte */
@keyframes kb-hub {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(107,221,205,.6)); }
  50%      { filter: drop-shadow(0 0 16px rgba(120,236,220,1)) brightness(1.35); }
}
.mascote .kb-vertice circle { animation: kb-hub 2.6s ease-in-out infinite; }
/* linhas dos braços com um leve brilho para as luzes "correrem" sobre elas */
.mascote .kb-rede { filter: drop-shadow(0 0 2px rgba(60,182,165,.35)); }
/* os pontos de luz que viajam pelos braços */
.mascote .kb-flux circle { filter: drop-shadow(0 0 6px rgba(150,240,228,.95)); }

/* movimento reduzido: SVG estático e visível, luzes desligadas */
@media (prefers-reduced-motion: reduce) {
  .mascote { animation: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
  .mascote.lg-go { animation: none !important; }
  .mascote .kb-rede, .mascote .kb-nos, .mascote .kb-brac, .mascote .kb-espinha { transform: none !important; }
  .mascote .kb-nos circle, .mascote .kb-vertice circle { animation: none !important; filter: none !important; }
  .mascote .kb-flux { display: none !important; }
}

/* ===== v30: barra de uso de IA para o cliente (só %, sem valores) ===== */
.ag-uso { display: inline-flex; flex-direction: column; gap: 5px; min-width: 150px; padding: 4px 0; }
.ag-uso-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ag-uso-bar { height: 7px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.ag-uso-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); border-radius: 4px; transition: width .4s ease; }
.ag-uso-alerta .ag-uso-top { color: var(--warn); }
.ag-uso-alerta .ag-uso-bar i { background: linear-gradient(90deg, var(--warn), var(--danger)); }

/* ===== v35: barra de ações da coluna (renomear + excluir), sempre visível ===== */
.col-head { position: relative; }
.col-acts {
  display: flex; gap: 6px; padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.col-edit, .col-del {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 8px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  cursor: pointer; transition: all .15s ease;
}
.col-edit:hover { border-color: var(--accent); color: var(--accent); background: rgba(20,184,166,.08); }
.col-del:hover { border-color: var(--danger); color: var(--danger); background: rgba(248,113,113,.1); }

/* ================= ESTÚDIO (v35) ================= */
.estudio-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.est-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }

/* grade de cards de arte */
.est-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.est-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.est-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.est-thumb { position: relative; aspect-ratio: 1; background: var(--ink); }
.est-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.est-nocapa { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.est-multi { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 20px; }
.est-selo { position: absolute; bottom: 8px; left: 8px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.sel-vot { background: rgba(94,234,212,.2); color: var(--accent-2); border: 1px solid var(--accent-2); }
.sel-ok { background: rgba(20,184,166,.9); color: #04211d; }
.sel-alt { background: rgba(248,113,113,.9); color: #2a0808; }
.est-info { padding: 10px 12px; }
.est-info b { font-size: 13.5px; display: block; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-votos { display: flex; gap: 12px; font-size: 12px; }
.est-votos .v-ok { color: var(--accent); } .est-votos .v-alt { color: var(--danger); }

/* upload */
.est-drop { border: 2px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; font-size: 13px; transition: all .15s ease; }
.est-drop:hover, .est-drop.over { border-color: var(--accent); color: var(--accent); background: rgba(20,184,166,.05); }
.est-previa { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.previa-item { position: relative; width: 70px; height: 70px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.previa-item img { width: 100%; height: 100%; object-fit: cover; }
.previa-item .cap { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); color: #04211d; font-size: 9px; text-align: center; font-weight: 700; }
.previa-item .rem { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer; font-size: 13px; line-height: 1; }

/* visualização da arte + votação */
.art-view { margin-bottom: 12px; }
.art-gal { position: relative; border-radius: 10px; overflow: hidden; background: var(--ink); }
.art-gal img { width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 20px; cursor: pointer; }
.gal-nav.prev { left: 8px; } .gal-nav.next { right: 8px; }
.art-dots { display: flex; gap: 5px; justify-content: center; margin-top: 8px; }
.art-dots span, .ig-ph-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.art-dots span.on, .ig-ph-dots span.on { background: var(--accent); }
.art-cap { font-size: 13.5px; line-height: 1.5; margin-bottom: 10px; white-space: pre-wrap; }
.art-status { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12px; }
.art-by { color: var(--muted); }
.art-vote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.vote-btns { display: flex; gap: 8px; margin: 8px 0; }
.vb { flex: 1; padding: 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.vb-ok.on { background: var(--accent); color: #04211d; border-color: var(--accent); }
.vb-alt.on { background: var(--danger); color: #2a0808; border-color: var(--danger); }
.art-vote textarea { width: 100%; margin: 6px 0; min-height: 54px; }
.art-votos { margin-bottom: 8px; }
.voto-linha { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.voto-linha:last-child { border-bottom: none; }
.voto-ava { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.voto-body b { font-size: 13px; }
.voto-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 20px; margin-left: 6px; }
.t-ok { background: rgba(20,184,166,.18); color: var(--accent); }
.t-alt { background: rgba(248,113,113,.18); color: var(--danger); }
.voto-body p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.voto-vazio { color: var(--muted); font-size: 13px; }
.art-dono { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 6px; }

/* simulador de feed (grid 3x3 do Instagram) */
.ig-wrap { max-width: 470px; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.ig-perfil { display: flex; align-items: center; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.ig-ava { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex-shrink: 0; }
.ig-nome b { font-size: 15px; }
.ig-stats { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ig-stats b { color: var(--text); }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cel { position: relative; aspect-ratio: 1; background: var(--ink); cursor: pointer; overflow: hidden; }
.ig-cel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s ease; }
.ig-cel:hover img { opacity: .82; }
.ig-multi { position: absolute; top: 6px; right: 6px; color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* simulador de carrossel (moldura de celular) */
.carr-topo { margin-bottom: 16px; }
.carr-topo select { max-width: 340px; }
.carr-palco { display: flex; justify-content: center; }
.carr-load { color: var(--muted); padding: 30px; }
.ig-phone { width: 330px; max-width: 100%; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel-2); }
.ig-ph-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.ig-ph-ava { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ig-ph-img { position: relative; aspect-ratio: 1; background: var(--ink); }
.ig-ph-img img { width: 100%; height: 100%; object-fit: cover; }
.ig-ph-cont { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.ig-ph-dots { display: flex; gap: 5px; justify-content: center; padding: 10px; }
.ig-ph-acts { padding: 4px 14px 14px; font-size: 20px; letter-spacing: 8px; color: var(--text); }

@media (max-width: 640px) {
  .est-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ===== v36: feed como mural editável (arrastar e soltar) ===== */
.feed-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.feed-gaveta { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.fg-tit { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.fg-lista { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.fg-item { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: grab; transition: border-color .15s ease; }
.fg-item:hover { border-color: var(--accent); }
.fg-item:active { cursor: grabbing; }
.fg-item img, .fg-noimg { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--ink); }
.fg-nome { font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-multi { font-size: 12px; color: var(--muted); }
.fg-vazio { font-size: 12px; color: var(--muted); padding: 8px; line-height: 1.4; }

.ig-cel.vazia { display: grid; place-items: center; border: 2px dashed var(--line); background: transparent; cursor: default; }
.ig-vazia-ic { font-size: 26px; color: var(--line); font-weight: 300; }
.ig-cel { position: relative; }
.ig-cel[draggable="true"] { cursor: grab; }
.ig-cel[draggable="true"]:active { cursor: grabbing; }
.ig-cel.arrastando { opacity: .4; }
.ig-cel.drop-alvo { outline: 2px solid var(--accent); outline-offset: -2px; }
.ig-rem { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; cursor: pointer; font-size: 13px; line-height: 1; opacity: 0; transition: opacity .15s ease; }
.ig-cel:hover .ig-rem { opacity: 1; }

@media (max-width: 720px) {
  .feed-wrap { grid-template-columns: 1fr; }
  .fg-lista { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .fg-item { width: calc(50% - 4px); }
}
