/* Manual do sistema (menu Suporte). CSS próprio e sem Tailwind: só carrega nesta tela e
   usa os tokens da identidade visual (IDENTIDADE_VISUAL.md). Tudo com prefixo m-. */
:root {
  --m-cyan: #00E5FF; --m-primary: #6D5DFB; --m-accent: #8B5CF6; --m-mint: #00FFB2;
  --m-amber: #FFC857; --m-red: #FF6B7A;
  --m-text: #E8EDF5; --m-muted: #A3B1C6; --m-line: rgba(255, 255, 255, .1);
  --m-card: rgba(255, 255, 255, .04); --m-card-2: rgba(255, 255, 255, .07);
  --m-grad: linear-gradient(120deg, #00E5FF, #6D5DFB 55%, #8B5CF6);
  --m-top: 76px;
}

#manual-root { color: var(--m-text); font-size: 15.5px; line-height: 1.68; }
#manual-root a { color: var(--m-cyan); text-decoration: none; }
#manual-root a:hover { text-decoration: underline; }
#manual-root code { font-size: .88em; background: rgba(0, 229, 255, .09); color: #9BEFFF;
  padding: .12em .4em; border-radius: 6px; word-break: break-word; }
#manual-root b, #manual-root strong { color: #fff; font-weight: 600; }

.m-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: var(--m-grad); }

/* ---------- Capa ---------- */
.m-hero { position: relative; overflow: hidden; border: 1px solid var(--m-line); border-radius: 28px;
  padding: 56px 48px 44px; margin-bottom: 28px;
  background:
    radial-gradient(900px 340px at 12% -20%, rgba(0, 229, 255, .22), transparent 60%),
    radial-gradient(800px 380px at 92% 0%, rgba(139, 92, 246, .3), transparent 60%),
    rgba(11, 16, 32, .75); }
.m-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 75%); }
.m-hero > * { position: relative; z-index: 1; }
.m-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .04em;
  color: var(--m-mint); border: 1px solid rgba(0, 255, 178, .3); background: rgba(0, 255, 178, .07);
  padding: 4px 12px; border-radius: 99px; }
.m-hero h1 { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(32px, 5vw, 52px); line-height: 1.08;
  margin: 18px 0 12px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.m-hero h1 span { background: var(--m-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m-hero p.m-lead { color: var(--m-muted); font-size: 18px; max-width: 62ch; margin: 0 0 26px; }

.m-search { position: relative; max-width: 640px; }
.m-search input { width: 100%; height: 52px; border-radius: 16px; padding: 0 92px 0 48px; font-size: 16px;
  color: #fff; background: rgba(5, 8, 22, .75); border: 1px solid rgba(255, 255, 255, .18); outline: none; }
.m-search input:focus { border-color: var(--m-cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .18); }
.m-search svg { position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; color: var(--m-muted); }
.m-search kbd { position: absolute; right: 14px; top: 14px; font-size: 12px; color: var(--m-muted);
  border: 1px solid var(--m-line); border-radius: 7px; padding: 2px 7px; background: var(--m-card); }
.m-results { position: absolute; z-index: 30; left: 0; right: 0; top: 60px; max-height: 420px; overflow: auto;
  background: #0B1020; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.m-results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--m-text) !important; }
.m-results a:hover, .m-results a.on { background: rgba(0, 229, 255, .1); text-decoration: none !important; }
.m-results b { display: block; font-size: 14.5px; }
.m-results small { display: block; color: var(--m-muted); font-size: 12.5px; line-height: 1.45; }
.m-results mark { background: rgba(0, 229, 255, .25); color: #fff; border-radius: 3px; }
.m-results p { margin: 0; padding: 12px; color: var(--m-muted); font-size: 14px; }

.m-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.m-role { border: 1px solid var(--m-line); border-radius: 18px; background: rgba(5, 8, 22, .5); padding: 18px 20px; }
.m-role h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 17px; margin: 0 0 8px; color: #fff; font-weight: 600; }
.m-role ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.m-role li { padding: 3px 0; }
.m-role li a::before { content: "→ "; opacity: .6; }

/* ---------- Estrutura ---------- */
.m-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 36px; align-items: start; }
.m-side { position: sticky; top: var(--m-top); max-height: calc(100vh - var(--m-top) - 16px); overflow: auto;
  padding: 14px 10px 14px 14px; border: 1px solid var(--m-line); border-radius: 18px; background: rgba(11, 16, 32, .7);
  scrollbar-width: thin; }
.m-side summary { display: none; }
.m-side h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--m-muted);
  margin: 14px 8px 4px; font-weight: 600; }
.m-side h2:first-of-type { margin-top: 2px; }
.m-side a { display: block; padding: 5px 10px; border-radius: 9px; font-size: 14px; color: var(--m-muted) !important;
  border-left: 2px solid transparent; line-height: 1.35; }
.m-side a:hover { color: #fff !important; background: var(--m-card); text-decoration: none !important; }
.m-side a.on { color: #fff !important; background: rgba(0, 229, 255, .09); border-left-color: var(--m-cyan); }
.m-side a.m-sublink { padding-left: 22px; font-size: 13px; display: none; }
.m-side .m-group.open a.m-sublink { display: block; }

.m-body { min-width: 0; max-width: 1020px; }
.m-chapter { scroll-margin-top: var(--m-top); padding-bottom: 12px; margin-bottom: 44px; }
.m-sub { scroll-margin-top: var(--m-top); margin-top: 34px; }
.m-part { display: flex; align-items: center; gap: 14px; margin: 8px 0 22px; color: var(--m-muted);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .14em; }
.m-part::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--m-line), transparent); }
.m-chapter-head { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.m-ico { flex: none; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font: 700 19px "Space Grotesk", Inter, sans-serif; color: #fff; background: var(--m-grad);
  box-shadow: 0 10px 30px rgba(109, 93, 251, .35); }
.m-chapter h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 31px; line-height: 1.15; font-weight: 700;
  color: #fff; margin: 0; letter-spacing: -.01em; }
.m-chapter-head p { margin: 2px 0 0; color: var(--m-muted); font-size: 15px; }
.m-sub > h3, .m-chapter h3 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 21px; font-weight: 600; color: #fff;
  margin: 0 0 8px; }
.m-chapter h4 { font-size: 15.5px; font-weight: 600; color: #fff; margin: 20px 0 6px; }
.m-chapter p { margin: 10px 0; }
.m-chapter ul.m-list { margin: 10px 0; padding-left: 20px; list-style: disc; }
.m-chapter ul.m-list li { margin: 5px 0; }
.m-chapter ul.m-list li::marker { color: var(--m-cyan); }

.m-who { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 14px; }
.m-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 11px; border-radius: 99px;
  border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-muted); white-space: nowrap; }
.m-chip.admin { color: #FFB4C0; border-color: rgba(255, 107, 122, .35); background: rgba(255, 107, 122, .08); }
.m-chip.gestor { color: #C9BFFF; border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .1); }
.m-chip.dev { color: #8FF3D2; border-color: rgba(0, 255, 178, .3); background: rgba(0, 255, 178, .07); }
.m-chip.where { color: #9BEFFF; border-color: rgba(0, 229, 255, .3); background: rgba(0, 229, 255, .07); }

/* ---------- Prints com marcadores ---------- */
.m-shot { margin: 18px 0 8px; }
.m-frame { position: relative; display: block; width: 100%; padding: 0; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #050816; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.m-frame:focus-visible { outline: 2px solid var(--m-cyan); outline-offset: 2px; }
.m-frame img { display: block; width: 100%; height: auto; }
.m-shot.narrow { max-width: 460px; }
.m-shot.mid { max-width: 680px; }
.m-shot figcaption { color: var(--m-muted); font-size: 13.5px; margin-top: 8px; }
.m-hot { position: absolute; border: 2px solid var(--m-cyan); border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 229, 255, .45); transition: box-shadow .15s, background .15s; }
.m-hot i { position: absolute; left: -19px; top: -13px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px Inter, sans-serif; font-style: normal; color: #04121A;
  background: var(--m-cyan); box-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: auto; }
.m-hot.on { background: rgba(0, 229, 255, .16); box-shadow: 0 0 0 3px rgba(0, 229, 255, .5), 0 0 24px rgba(0, 229, 255, .8); }

.m-steps { list-style: none; margin: 14px 0; padding: 0; counter-reset: m; }
.m-steps > li { position: relative; padding: 9px 12px 9px 46px; border-radius: 12px; counter-increment: m; transition: background .15s; }
.m-steps > li::before { content: attr(data-n); position: absolute; left: 10px; top: 10px; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12.5px Inter, sans-serif; color: #04121A; background: var(--m-cyan); }
.m-steps.auto > li::before { content: counter(m); background: var(--m-grad); color: #fff; }
.m-steps > li.m-dot::before { content: ""; width: 8px; height: 8px; left: 18px; top: 19px; background: var(--m-muted); }
.m-steps > li[data-n]:hover, .m-steps > li.on { background: rgba(0, 229, 255, .08); }

/* ---------- Avisos ---------- */
.m-note { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 16px 0; padding: 12px 16px;
  border-radius: 14px; border: 1px solid var(--m-line); background: var(--m-card); font-size: 14.5px; }
.m-note > span { font-size: 16px; line-height: 1.5; }
.m-note.tip { border-color: rgba(0, 255, 178, .28); background: rgba(0, 255, 178, .06); }
.m-note.warn { border-color: rgba(255, 200, 87, .35); background: rgba(255, 200, 87, .07); }
.m-note.danger { border-color: rgba(255, 107, 122, .4); background: rgba(255, 107, 122, .08); }

/* ---------- Tabelas, cartões ---------- */
.m-table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--m-line); border-radius: 14px; }
.m-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.m-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--m-muted);
  padding: 10px 14px; background: var(--m-card); white-space: nowrap; font-weight: 600; }
.m-table td { padding: 10px 14px; border-top: 1px solid var(--m-line); vertical-align: top; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0; }
.m-card { border: 1px solid var(--m-line); border-radius: 16px; background: var(--m-card); padding: 16px 18px; font-size: 14.5px; }
.m-card h4 { margin: 0 0 6px !important; font-family: "Space Grotesk", Inter, sans-serif; font-size: 16px !important; }
.m-card ul { margin: 6px 0 0; padding-left: 18px; }
.m-card p { margin: 4px 0; }
.m-check { list-style: none; margin: 6px 0 0; padding: 0; }
.m-check li { position: relative; padding: 3px 0 3px 24px; }
.m-check li::before { content: "✓"; position: absolute; left: 2px; color: var(--m-mint); font-weight: 700; }

/* ---------- Fluxos ---------- */
.m-flow { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 18px 0; }
.m-flow > div { position: relative; flex: 1 1 118px; min-width: 118px; padding: 12px 14px 12px 22px; font-size: 13px;
  background: linear-gradient(135deg, rgba(0, 229, 255, .12), rgba(139, 92, 246, .14));
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); margin-right: -6px; }
.m-flow > div:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-left: 14px; }
.m-flow b { display: block; font-size: 14px; }
.m-flow span { color: var(--m-muted); font-size: 12px; line-height: 1.3; display: block; }
.m-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; font-size: 14px; }
.m-formula div { border: 1px solid var(--m-line); background: var(--m-card); border-radius: 12px; padding: 9px 14px; }
.m-formula div.res { background: linear-gradient(135deg, rgba(0, 229, 255, .16), rgba(139, 92, 246, .18)); border-color: rgba(0, 229, 255, .35); }
.m-formula em { font-style: normal; color: var(--m-cyan); font-size: 18px; font-weight: 700; }

/* ---------- Ilustrações de sites externos ---------- */
.m-web { margin: 16px 0 6px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4); background: #F6F7F9; color: #1F2733; font-size: 13.5px; line-height: 1.45; }
.m-web-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #E5E8EE; }
.m-web-bar i { width: 10px; height: 10px; border-radius: 50%; background: #C4CAD4; }
.m-web-bar span { margin-left: 8px; flex: 1; min-width: 0; background: #fff; border-radius: 7px; padding: 2px 10px; font-size: 12px;
  color: #56606F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-web-body { padding: 16px 18px; display: grid; gap: 10px; }
.m-web-body.cols { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; }
.m-web-nav { display: grid; gap: 2px; align-content: start; font-size: 13px; color: #56606F; }
.m-web-nav div { padding: 4px 9px; border-radius: 7px; }
.m-web h5 { margin: 0; font-size: 15px; font-weight: 700; color: #1F2733; }
.m-web p { margin: 0; color: #56606F; font-size: 12.5px; }
.m-web label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 3px; color: #1F2733; }
.m-web .fld { background: #fff; border: 1px solid #CDD3DC; border-radius: 7px; padding: 5px 10px; color: #56606F; min-height: 30px; }
.m-web .btn { display: inline-block; border-radius: 7px; padding: 5px 12px; font-weight: 600; font-size: 13px; border: 1px solid #CDD3DC; background: #fff; color: #1F2733; }
.m-web .btn.go { background: #2F6FED; border-color: #2F6FED; color: #fff; }
.m-web .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.m-web .tok { font-family: ui-monospace, Consolas, monospace; background: #EAF7EE; border: 1px solid #B9E3C6; border-radius: 7px; padding: 6px 10px; word-break: break-all; color: #1F2733; }
.m-web .hl { position: relative; outline: 2px solid #00B8D9; outline-offset: 2px; border-radius: 7px; }
.m-web .hl::after { content: attr(data-n); position: absolute; right: -9px; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font: 700 11.5px Inter, sans-serif; color: #04121A; background: var(--m-cyan); box-shadow: 0 1px 5px rgba(0,0,0,.35); }
#manual-root .m-web b, #manual-root .m-phone b { color: #1F2733; }
.m-illus { color: var(--m-muted); font-size: 13px; margin: 6px 0 14px; }

.m-phones { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0 6px; }
.m-phone { width: 212px; border-radius: 26px; padding: 10px; background: #10162A; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.m-phone > div { border-radius: 17px; background: #F6F7F9; color: #1F2733; min-height: 300px; padding: 12px; font-size: 12.5px; display: grid; gap: 7px; align-content: start; }
.m-phone h5 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; color: #1F2733; }
.m-phone .it { padding: 7px 9px; background: #fff; border-radius: 8px; border: 1px solid #E0E4EA; color: #1F2733; }
.m-phone .it.hl { outline: 2px solid #00B8D9; position: relative; }
.m-phone .it.hl::after { content: attr(data-n); position: absolute; right: -7px; top: -9px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  font: 700 11px Inter, sans-serif; color: #04121A; background: var(--m-cyan); }
.m-qr { width: 112px; height: 112px; margin: 10px auto; border-radius: 8px;
  background: conic-gradient(#1F2733 25%, #fff 0 50%, #1F2733 0 75%, #fff 0) 0 0 / 22px 22px; border: 6px solid #fff; outline: 1px solid #CDD3DC; }

.m-term { position: relative; margin: 12px 0; border-radius: 12px; background: #070B17; border: 1px solid rgba(255, 255, 255, .14); }
.m-term pre { margin: 0; padding: 14px 76px 14px 16px; overflow-x: auto; font: 13.5px/1.6 ui-monospace, Consolas, monospace; color: #D5F7FF; white-space: pre; }
.m-term button { position: absolute; right: 8px; top: 8px; font-size: 12px; border: 1px solid var(--m-line); color: var(--m-muted); background: var(--m-card);
  border-radius: 8px; padding: 3px 9px; cursor: pointer; }
.m-term button:hover { color: #fff; }

/* ---------- Perguntas ---------- */
.m-faq { border: 1px solid var(--m-line); background: var(--m-card); border-radius: 13px; margin: 8px 0; scroll-margin-top: var(--m-top); }
.m-faq summary { cursor: pointer; padding: 11px 16px; font-weight: 600; color: #fff; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after { content: "+"; color: var(--m-cyan); font-size: 18px; line-height: 1; }
.m-faq[open] summary::after { content: "–"; }
.m-faq > div { padding: 0 16px 12px; color: var(--m-text); font-size: 14.5px; }
.m-flash { animation: m-flash 1.6s ease-out; }
@keyframes m-flash { 0% { background: rgba(0, 229, 255, .22); } 100% { background: transparent; } }

/* ---------- Zoom ---------- */
.m-box { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: rgba(3, 6, 16, .92); backdrop-filter: blur(6px); padding: 14px 18px; }
.m-box header { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--m-text); font-size: 14px; padding-bottom: 10px; }
.m-box header button { border: 1px solid var(--m-line); color: #fff; background: var(--m-card-2); border-radius: 10px; padding: 5px 14px; cursor: pointer; }
.m-box .m-box-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; }
.m-box .m-frame { margin: auto; cursor: default; width: min(100%, 1800px); height: auto; }

/* ---------- Telas menores ---------- */
@media (max-width: 1100px) {
  .m-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .m-side { position: static; max-height: none; padding: 0; overflow: hidden; }
  .m-side summary { display: block; cursor: pointer; padding: 12px 16px; font-weight: 600; color: #fff; }
  .m-side nav { padding: 0 10px 12px; max-height: 60vh; overflow: auto; }
  .m-roles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .m-hero { padding: 30px 20px 24px; border-radius: 20px; }
  .m-search kbd { display: none; }
  .m-search input { padding-right: 16px; }
  .m-chapter h2 { font-size: 25px; }
  .m-ico { width: 44px; height: 44px; font-size: 16px; }
  .m-web-body.cols { grid-template-columns: minmax(0, 1fr); }
  .m-flow > div { flex-basis: 45%; }
  .m-hot i { width: 15px; height: 15px; font-size: 9px; left: -12px; top: -9px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-flash { animation: none; }
  .m-hot, .m-steps > li { transition: none; }
}
