/* CM Collaborator – typography system (one scale for the whole platform).
   Inspired by Jira (Atlassian Sans is derived from Inter), Azure DevOps and Kanbanize, fixing what they get wrong:
   - same font on every OS (Azure DevOps falls back to each system's font) → Inter shipped as a web font;
   - one fixed scale instead of ad-hoc sizes; body 14px like Jira; nothing readable below 11px;
   - unambiguous characters for IDs and keys (l / I / 1) via Inter's alternate glyphs;
   - aligned (tabular) numbers in tables, reports and indicators;
   - secondary text meets WCAG AA contrast (4.5:1), unlike the pale greys common in these tools.
   Poppins stays only for the logo and marketing pages (landing / beta). Whiteboard content keeps user-chosen sizes. */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Poppins", var(--font);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  /* scale: caption · small · dense UI · body · large · heading S · heading M · heading L */
  --fs-10: 10px;  /* only tiny badges ("NOVO" corner) and avatar initials */
  --fs-11: 11px;  /* captions, labels, column headers */
  --fs-12: 12px;  /* secondary text, card metadata */
  --fs-13: 13px;  /* dense UI: tables, cards, toolbars */
  --fs-14: 14px;  /* body (default) */
  --fs-16: 16px;  /* large body, section titles */
  --fs-20: 20px;  /* page/section headings */
  --fs-24: 24px;  /* page titles */
  --fs-32: 32px;  /* indicators (KPI numbers) */
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-feature-settings: "cv05" 1, "cv08" 1, "calt" 1; /* l with tail, I with serifs: no l/I/1 confusion */
  text-rendering: optimizeLegibility;
}
b, strong { font-weight: var(--fw-semibold); }
input, select, textarea, button { font-family: inherit; }
table, .tnum, .kpi, .kpis, [data-num] { font-variant-numeric: tabular-nums; }
code, kbd, pre { font-family: var(--font-mono); }

/* ---------- "Módulos" switcher (top bar, all app pages) ---------- */
.modsw { position: relative; display: inline-flex; align-items: center; margin-left: 12px; font-family: var(--font); }
.modsw-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(127,140,170,.35); background: rgba(127,140,170,.12); color: inherit; font: 600 var(--fs-13)/1 var(--font); cursor: pointer; white-space: nowrap; }
.modsw-btn:hover, .modsw-btn[aria-expanded="true"] { border-color: #2cc4b3; background: rgba(44,196,179,.16); }
.modsw-btn svg { color: #2cc4b3; }
.modsw-car { font-size: 10px; opacity: .7; }
.modsw-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 200; width: min(400px, calc(100vw - 24px)); background: #fff; color: #1c2033; border: 1px solid #e3e6ef; border-radius: 14px; box-shadow: 0 18px 50px rgba(10,20,45,.28); padding: 8px; }
.modsw-pop[hidden] { display: none; }
.modsw-h { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; font: 700 var(--fs-11)/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #626a80; border-bottom: 1px solid #eef0f5; margin-bottom: 4px; }
.modsw-h small { font: 500 var(--fs-12)/1.3 var(--font); letter-spacing: 0; text-transform: none; color: #626a80; }
.modsw-load { padding: 14px 10px; font-size: var(--fs-13); color: #626a80; }
.modsw-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; text-align: left; color: inherit; cursor: pointer; font-family: var(--font); }
.modsw-row:hover, .modsw-row:focus-visible { background: #f2f5fa; outline: none; }
.modsw-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #0e1a33; color: #2cc4b3; font-size: 18px; }
.modsw-row.locked .modsw-ic { background: #eef0f5; color: #8a93a8; filter: grayscale(.6); }
.modsw-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.modsw-t b { font-size: var(--fs-14); font-weight: 600; }
.modsw-t small { font-size: var(--fs-12); color: #626a80; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modsw-row.locked .modsw-t b { color: #4b5368; }
.modsw-chip { font: 600 var(--fs-11)/1 var(--font); padding: 5px 8px; border-radius: 999px; background: #dff7f3; color: #0b7d70; white-space: nowrap; }
.modsw-chip.no { background: #fdf3d8; color: #8a6100; }
.modsw-foot { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid #eef0f5; font: 600 var(--fs-13) var(--font); color: #0b7d70; text-decoration: none; }
.modsw-dlg { position: fixed; inset: 0; z-index: 300; background: rgba(5,10,25,.6); display: grid; place-items: center; padding: 16px; font-family: var(--font); }
.modsw-dlg-card { width: min(520px, 100%); background: #fff; color: #1c2033; border-radius: 16px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modsw-dlg-card h2 { font-size: var(--fs-20); margin: 10px 0 8px; }
.modsw-dlg-card p { font-size: var(--fs-14); line-height: 1.5; margin: 0 0 8px; }
.modsw-muted { color: #626a80; font-size: var(--fs-13) !important; }
.modsw-dlg .mod-gate-tag { display: inline-block; font: 600 var(--fs-11)/1 var(--font); text-transform: uppercase; letter-spacing: .06em; padding: 5px 9px; border-radius: 999px; background: #fdf3d8; color: #8a6100; }
.modsw-dlg .mod-gate-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.modsw-b { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid #d9dde8; background: #fff; color: #1c2033; font: 600 var(--fs-14) var(--font); cursor: pointer; }
.modsw-b.primary { background: #e8c468; border-color: #e8c468; color: #0e1a33; }
@media (max-width: 720px) {
  .modsw { margin-left: 6px; }
  .modsw-btn { padding: 0 10px; } .modsw-btn > span:not(.modsw-car) { display: none; }
  .modsw-pop { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
}
.modsw-ic[data-m="collab"] { background: rgba(44,196,179,.14); color: #0b8f80; }
.modsw-ic[data-m="planning"] { background: rgba(66,98,255,.12); color: #3550d6; }
.modsw-ic[data-m="itsm"] { background: rgba(130,92,230,.13); color: #6a43c9; }
.modsw-ic[data-m="game"] { background: rgba(232,196,104,.25); color: #8a6100; }
.modsw-hic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; vertical-align: middle; margin-right: 4px; }
.modsw-hic[data-m="itsm"] { background: rgba(130,92,230,.13); color: #6a43c9; } .modsw-hic[data-m="game"] { background: rgba(232,196,104,.25); color: #8a6100; }
.mod-tile-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; vertical-align: middle; }
.mod-tile-ic[data-m="planning"] { background: rgba(66,98,255,.16); color: #8ea2ff; } .mod-tile-ic[data-m="collab"] { background: rgba(44,196,179,.16); color: #5fe0d1; }
.mod-tile-ic[data-m="game"] { background: rgba(232,196,104,.2); color: #e8c468; } .userbar .btn svg { vertical-align: -3px; }

/* ---------- area-first template picker (hub "Start something new" and board "Templates") ---------- */
.tpl-pick { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.tpl-areas { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid rgba(127,140,170,.28); border-radius: 12px; position: sticky; top: 76px; }
.tpl-areas button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-left: 3px solid transparent; border-radius: 8px; background: none; color: inherit; font: 500 var(--fs-13)/1.3 var(--font); text-align: left; cursor: pointer; opacity: .82; }
.tpl-areas button:hover { background: rgba(127,140,170,.12); opacity: 1; }
.tpl-areas button.on { background: rgba(127,140,170,.18); border-left-color: #e8c468; font-weight: 600; opacity: 1; }
.tpl-areas small { font: 600 var(--fs-11)/1 var(--font); padding: 3px 7px; border-radius: 99px; background: rgba(127,140,170,.18); font-variant-numeric: tabular-nums; }
.tpl-pick .tpl-strip, .tpl-pick .tpl-grid { margin: 0; }
.tpl-pick [hidden] { display: none !important; }
@media (max-width: 760px) {
  .tpl-pick { grid-template-columns: 1fr; gap: 10px; }
  .tpl-areas { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; padding: 4px; }
  .tpl-areas::-webkit-scrollbar { display: none; }
  .tpl-areas button { width: auto; flex: none; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px; }
  .tpl-areas button.on { border-bottom-color: #e8c468; }
  .tpl-pick .tpl-strip, .tpl-pick .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tpl-pick .tpl-tile b, .tpl-pick .tpl-card b { font-size: var(--fs-12); }
  .tpl-pick .tpl-card small { display: none; }
}

/* ---------- 3D "clay" icon tiles (CMIcon3D) ---------- */
.ic3d { --s: 36px; --a: #5b8cff; --b: #2f55d4; --sh: 47,85,212; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); color: #fff; vertical-align: middle;
  background: radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.55), rgba(255,255,255,0) 45%), linear-gradient(150deg, var(--a), var(--b));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -3px 0 rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.12), 0 calc(var(--s) * .12) calc(var(--s) * .3) rgba(var(--sh),.42);
  transform: perspective(120px) rotateX(8deg); transition: transform .2s ease, box-shadow .2s ease; }
.ic3d svg { width: 56% !important; height: 56% !important; stroke-width: 2.1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.28)); }
.ic3d::after { content: ""; position: absolute; left: 14%; right: 14%; top: 6%; height: 32%; border-radius: 999px; background: linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,0)); pointer-events: none; }
.ic3d[data-t="teal"]   { --a: #3fe0cc; --b: #0b8f80; --sh: 11,143,128; }
.ic3d[data-t="violet"] { --a: #a98bff; --b: #5a35c4; --sh: 90,53,196; }
.ic3d[data-t="gold"]   { --a: #ffd77a; --b: #c98a0b; --sh: 201,138,11; color: #3b2a00; }
.ic3d[data-t="green"]  { --a: #5fd38d; --b: #12804a; --sh: 18,128,74; }
.ic3d[data-t="coral"]  { --a: #ff9a76; --b: #d9482b; --sh: 217,72,43; }
.ic3d[data-t="blue"]   { --a: #6f9bff; --b: #2f55d4; --sh: 47,85,212; }
:is(a, button, label):hover > * > .ic3d, :is(a, button, label):hover .ic3d { transform: perspective(120px) rotateX(0deg) translateY(-1px); }
/* card tag on planning / ITSM / game previews */
.pv-tag { gap: 6px !important; padding: 3px 9px 3px 3px !important; font-size: var(--fs-11) !important; backdrop-filter: blur(6px); background: rgba(14,26,51,.82) !important; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.pv-tag .ic3d { transform: none; }
.pv-tag > svg { width: 12px !important; height: 12px !important; }
.plan-tile b { display: inline-flex; align-items: center; gap: 8px; }
.board-card .tpl-pv { position: relative; }
.modsw-ic[data-m="sst"], .modsw-hic[data-m="sst"] { background: rgba(27,175,122,.14); color: #12804a; }
.modsw-ic[data-m="security"], .modsw-hic[data-m="security"] { background: rgba(14,26,51,.08); color: #1f3a8a; }
.mod-tile-ic[data-m="security"] { background: rgba(142,162,255,.16); color: #b9c6ff; }
.mod-tile-ic[data-m="sst"] { background: rgba(27,175,122,.18); color: #5fd38d; }

/* presentation video of each module (Módulos menu, module gate, home page) */
.modsw-line { display: flex; align-items: center; gap: 4px; }
.modsw-line .modsw-row { flex: 1; min-width: 0; }
.modsw-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d7dce8; background: #fff; color: #0E1A33; font-size: var(--fs-12); line-height: 1; cursor: pointer; display: grid; place-items: center; padding-left: 2px; }
.modsw-play:hover, .modsw-play:focus-visible { background: #2CC4B3; border-color: #2CC4B3; color: #0E1A33; outline: none; }
.mod-vid { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 12px; background: #0E1A33; margin: 12px 0; border: 1px solid rgba(14, 26, 51, .12); }
.mod-vid-dlg .modsw-dlg-card { width: min(880px, 100%); }
.mod-gate-card .mod-vid, .modsw-dlg-card .mod-vid { margin: 14px 0; }

