/* New Central da operação (/events/:id/manage). Reuses the operation page tokens and cards (co-op-*). */
.co-mg { padding-bottom: 32px; }
/* The manage route has no side padding of its own: the Central keeps a gutter (and the notch safe area). */
.co-mg-main { box-sizing: border-box; width: 100%; max-width: 672px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
@media (min-width: 768px) { .co-mg-main { max-width: 704px; padding-left: 32px; padding-right: 32px; } .co-mg-card { padding: 16px; } }
@media (max-width: 360px) { .co-mg-main { padding-left: 12px; padding-right: 12px; } .co-mg-card { padding: 12px; } .co-mg .co-op-line { gap: 10px; padding: 11px 12px; } }
.co-mg .co-op-line__copy b, .co-mg .co-op-line__copy small { overflow-wrap: anywhere; }
.co-mg-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.co-mg-top { display: flex; align-items: center; gap: 10px; padding: 16px 0 12px; }
.co-mg-top a.co-op-round { flex: none; text-decoration: none; }
.co-mg-top__t { flex: 1; min-width: 0; }
.co-mg-top__t small { display: block; font-size: 11px; color: var(--muted); }
.co-mg-top__t b { display: block; overflow: hidden; font-size: 16px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.co-mg-mini { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 8px 12px; border: 1px solid #ffffff14; border-radius: 999px; background: var(--c-bg); box-shadow: var(--c-shadow); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.co-mg-mini:disabled { opacity: 0.5; cursor: default; }
.co-mg-status { margin: 2px 0 4px; }
.co-mg-sec { margin: 20px 2px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.co-mg-card { padding: 14px; }
.co-mg-card > h3 { margin: 0 0 4px; font-size: 16px; }
.co-mg-p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.co-mg-go { flex: none; color: var(--dim, #8c9488); }
.co-mg-right { display: inline-flex; flex: none; align-items: center; gap: 8px; color: var(--dim, #8c9488); }
.co-mg-act { flex: none; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.co-mg-act.is-warn { color: #e7c66b; }
.co-op-line.is-off .co-op-line__icon { background: #ffffff0a; color: #8c9488; }
.co-op-line.is-off .co-op-line__copy b { color: #c9cfc3; }
.co-op-line.is-warn .co-op-line__icon { background: #e7c66b1c; color: #e7c66b; }
.co-op-line.is-bad .co-op-line__copy b { color: #f3c3b9; }
.co-mg-sw { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: #ffffff1a; cursor: pointer; transition: background 0.2s; }
.co-mg-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #dfe3d9; transition: transform 0.25s var(--ease); }
.co-mg-sw.is-on { background: var(--accent); }
.co-mg-sw.is-on::after { transform: translateX(18px); background: #1b2110; }
.co-mg-sw:disabled { opacity: 0.4; cursor: default; }
i.co-mg-sw { display: inline-block; pointer-events: none; }
.co-mg-ready__h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.co-mg-ready__h h3 { margin: 0; font-size: 16px; }
.co-mg-ready__h span { font-size: 12.5px; color: var(--muted); }
.co-mg-bar { height: 5px; margin: 0 0 8px; overflow: hidden; border-radius: 5px; background: #ffffff14; }
.co-mg-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.4s var(--ease); }
.co-mg-chk { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #ffffff0a; font-size: 13.5px; }
.co-mg-chk:last-of-type { border-bottom: 0; }
.co-mg-chk[role="button"] { cursor: pointer; }
.co-mg-chk__b { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border: 1.5px solid #4a5043; border-radius: 7px; color: #1b2110; }
.co-mg-chk.is-done .co-mg-chk__b { border-color: var(--accent); background: var(--accent); }
.co-mg-chk__t { flex: 1; }
.co-mg-chk.is-done .co-mg-chk__t { color: var(--muted); }
.co-mg-chk__go { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.co-mg-hint { margin: 2px 2px 12px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.co-mg-hint.is-foot { margin: 10px 2px 0; }
.co-mg-ok { margin: 6px 0 10px; font-size: 13px; color: #d6e4a8; }
.co-mg-empty { margin: 4px 0; font-size: 12.5px; color: #8c9488; }
.co-mg-care { border-color: #e9a08f26; background: linear-gradient(125deg, #3a221eb0, #1a1514c7 65%); }
.co-mg-care > h3 { margin: 0 0 4px; font-size: 15px; color: #f3c3b9; }
.co-mg-care > p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
/* "Configurações avançadas": one quiet row that opens the rest of the Central. */
.co-mg-adv { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 20px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.co-mg-adv__copy { flex: 1; min-width: 0; }
.co-mg-adv__copy b { display: block; font-size: 14.5px; font-weight: 600; }
.co-mg-adv__copy small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.co-mg-adv__chev { flex: none; color: #8c9488; transition: transform 0.25s var(--ease); }
.co-mg-adv.is-open .co-mg-adv__chev { transform: rotate(90deg); }
.co-mg-toast { position: fixed; left: 50%; bottom: calc(var(--co-op-nav, 64px) + 18px); z-index: 1100; max-width: calc(100% - 32px); padding: 9px 14px; transform: translateX(-50%); border: 1px solid #c3d58f33; border-radius: 999px; background: #151a16f2; box-shadow: 0 10px 24px -10px #000d; color: #d6e4a8; font-size: 12.5px; animation: co-op-fade 0.25s; }

/* Floating sheets */
.co-mg-float { width: min(420px, calc(100% - 24px)); max-height: calc(100% - 32px); }
.co-mg-float.is-wide { width: min(640px, calc(100% - 24px)); }
.co-mg-float .co-mg-sec { margin: 16px 2px 8px; }
.co-mg-btn { margin-top: 8px; }
.co-mg-btn.is-glass { border: 1px solid #ffffff14; background: var(--c-bg); color: var(--text); box-shadow: var(--c-shadow); }
.co-mg-btn.is-danger { background: #e9a08f; color: #2a130d; }
.co-mg-field { display: block; margin: 0 0 12px; }
.co-mg-field > span { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; }
.co-mg-field > small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.co-mg-field input, .co-mg-field select, .co-mg-addrow input, .co-mg-addrow select, .co-mg-mv, .co-mg-acts select {
  box-sizing: border-box; width: 100%; padding: 11px 12px; border: 1px solid var(--c-line); border-radius: 12px; background: #0d100e99; box-shadow: inset 0 1px 3px #0006; color: var(--text); font: inherit; font-size: 14px; color-scheme: dark;
}
.co-mg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.co-mg-opt { display: block; box-sizing: border-box; width: 100%; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-bg); box-shadow: var(--c-shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.co-mg-opt b { display: block; font-size: 14px; }
.co-mg-opt span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.co-mg-opt.is-on { border-color: #c3d58f40; background: #c3d58f14; }
.co-mg-opt.is-on > b { color: var(--accent); }
.co-mg-opt.is-tog { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.co-mg-opt.is-tog b { flex: 1; }
.co-mg-opt.is-tog span { order: 3; width: 100%; margin-top: 0; }
.co-mg-tag { display: inline !important; margin-left: 6px !important; padding: 2px 7px; border-radius: 999px; background: #c3d58f1c; color: #d6e4a8 !important; font-size: 10.5px !important; font-weight: 600; }
.co-mg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.co-mg-chip { padding: 6px 11px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-bg); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.co-mg-chip.is-on { border-color: #c3d58f33; background: #c3d58f1c; color: var(--accent); }
.co-mg-cat { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg); box-shadow: var(--c-shadow); }
.co-mg-cat b, .co-mg-cat > span { flex: 1; font-size: 13.5px; }
.co-mg-cat input { width: 58px; padding: 7px 6px; border: 1px solid var(--c-line); border-radius: 9px; background: #0d100e99; color: var(--text); font: inherit; font-size: 13px; text-align: center; }
.co-mg-cat small { font-size: 11px; color: var(--muted); }
.co-mg-addrow { display: flex; gap: 8px; margin: 0 0 8px; }
.co-mg-addrow input, .co-mg-addrow select { flex: 1; min-width: 0; padding: 9px 10px; font-size: 13px; }
.co-mg-addrow select { flex: 0 1 auto; width: auto; }
.co-mg-modrow { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 12px 14px; border: 1px dashed #ffffff1a; border-radius: 14px; }
.co-mg-modrow > span { flex: 1; }
.co-mg-modrow b { display: block; font-size: 13.5px; }
.co-mg-modrow small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.co-mg-link { padding: 4px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.co-mg-link.is-bad { color: #e9a08f; }
.co-mg-link:disabled { opacity: 0.5; }
.co-mg-go2 { display: block; margin-top: 4px; }
.co-mg-note { margin: 8px 0 0; padding: 10px 12px; border: 1px solid #c3d58f26; border-radius: 12px; background: #c3d58f14; font-size: 12.5px; line-height: 1.5; color: #d9e3bd; }
.co-mg-warn { color: #f0dca0; }
.co-mg-seg { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-bg); }
.co-mg-seg button { flex: 1; padding: 9px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.co-mg-seg button.is-on { background: #ffffff12; color: var(--text); }
.co-mg-embed { margin: 0 0 8px; }
/* App components keep the classic Central's styles (scoped to .management-preview), without its page layout. */
.management-preview.co-mg-scope { max-width: none !important; margin: 0 !important; padding: 0 !important; isolation: auto; background: transparent; }
.management-preview.co-mg-scope::before, .management-preview.co-mg-scope > .dynamic-background { display: none !important; }
.co-mg-full__stack.co-mg-scope { padding: 14px !important; }
.co-mg-embed :is(h1, h2) { font-size: 17px !important; }

/* Team by role */
.co-mg-role { margin: 0 0 10px; padding: 12px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-bg); box-shadow: var(--c-shadow); }
.co-mg-role__h { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.co-mg-role__h > span { flex: 1; }
.co-mg-role__h b { display: block; font-size: 14px; }
.co-mg-role__h small { display: block; font-size: 11.5px; color: var(--muted); }
.co-mg-person { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.co-mg-person > span:nth-child(2) { flex: 1; min-width: 0; }
.co-mg-person b { display: block; font-size: 13.5px; font-weight: 600; }
.co-mg-person small { display: block; font-size: 11.5px; color: var(--muted); }
.co-mg-av { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #3b4a33, #24301f); font-size: 11px; font-weight: 600; }
.co-mg-acts { display: inline-flex; flex: none; align-items: center; gap: 10px; }
.co-mg-acts select { width: auto; max-width: 140px; padding: 6px 8px; font-size: 12.5px; }
.co-mg-invite { margin-top: 8px; padding-top: 10px; border-top: 1px solid #ffffff0d; }
.co-mg-invite .co-mg-addrow { flex-wrap: wrap; }
.co-mg-invite .co-mg-addrow select { flex: 1 1 100%; width: 100%; }
.co-mg-invite .co-mg-addrow input { flex: 1 1 140px; }
.co-mg-person .co-mg-acts { flex-wrap: wrap; justify-content: flex-end; }

/* Factions */
.co-mg-tsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 4px; }
.co-mg-tsum span { padding: 10px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-bg); box-shadow: var(--c-shadow); text-align: center; }
.co-mg-tsum b { display: block; font-size: 17px; }
.co-mg-tsum small { font-size: 11px; color: var(--muted); }
.co-mg-fac { margin: 0 0 10px; padding: 12px; border: 1px solid var(--c-line); border-left: 3px solid var(--c, #c3d58f); border-radius: 16px; background: var(--c-bg); box-shadow: var(--c-shadow); }
.co-mg-fac .co-mg-fac { margin: 8px 0 0; box-shadow: none; }
.co-mg-fac__h { display: flex; align-items: center; gap: 8px; }
.co-mg-fac__h i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.co-mg-fac__h b { flex: 1; font-size: 14.5px; }
.co-mg-fac__h span { font-size: 12.5px; color: var(--muted); }
.co-mg-fac__meta { display: block; margin: 0 0 4px; font-size: 11.5px; color: var(--muted); }
.co-mg-fbar { height: 4px; margin: 8px 0 6px; overflow: hidden; border-radius: 4px; background: #ffffff14; }
.co-mg-fbar i { display: block; height: 100%; background: var(--c); }
.co-mg-sq { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 2px; border: 0; border-top: 1px solid #ffffff0a; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.co-mg-sq span { flex: 1; }
.co-mg-sq small { font-size: 11.5px; color: var(--muted); }
.co-mg-sq em { min-width: 30px; font-size: 12px; font-style: normal; text-align: right; color: #dde2d7; }
.co-mg-swatches { display: flex; gap: 8px; }
.co-mg-swatch { width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.co-mg-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px #0008; }
.co-mg-rebal { margin: 0 0 6px; padding: 12px; border: 1px solid #e7c66b26; border-radius: 16px; background: #e7c66b10; }
.co-mg-rebal > b { display: block; font-size: 14px; }
.co-mg-rebal > small { display: block; margin: 3px 0 10px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.co-mg-vs { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.co-mg-vs span { flex: 1; padding: 10px; border: 1px solid var(--c-line); border-top: 3px solid var(--c); border-radius: 12px; background: var(--c-bg); font-size: 11.5px; text-align: center; color: var(--muted); }
.co-mg-vs span b { display: block; font-size: 20px; color: var(--text); }
.co-mg-vs em { font-style: normal; color: #8c9488; }
.co-mg-una { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #e7c66b26; border-radius: 14px; background: #e7c66b14; }
.co-mg-una b { font-size: 13px; color: #f0dca0; }
.co-mg-player { gap: 8px; }
.co-mg-mv { flex: none; width: auto; max-width: 130px; padding: 7px 8px; font-size: 12.5px; }

/* Media */
.co-mg-cover { position: relative; height: 140px; margin: 0 0 12px; overflow: hidden; border-radius: 16px; background: radial-gradient(120% 90% at 70% 20%, #2c3826, #10140f 70%); box-shadow: var(--c-shadow); }
.co-mg-cover img, .co-mg-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.co-mg-cover__empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.co-mg-cover em { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 7px; background: #000a; color: var(--accent); font-size: 11px; font-style: normal; font-weight: 700; }
.co-mg-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 8px; }
.co-mg-ph { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #121811; }
.co-mg-ph .media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.co-mg-ph__use { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 5px 4px; border: 0; border-radius: 8px; background: #0d100ed9; color: var(--text); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.co-mg-ph__x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: #0d100ed9; color: var(--text); cursor: pointer; }
.co-mg-ph__x svg { width: 12px; height: 12px; }
.co-mg-ph__x.is-inline { position: static; flex: none; }
.co-mg-ph.is-add { display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed #c3d58f55; background: var(--c-bg); color: var(--accent); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }

/* Briefing editor, full screen over the blurred page */
.co-mg-full { position: absolute; inset: 0; z-index: 2; overflow-y: auto; padding: calc(64px + env(safe-area-inset-top)) 10px 24px; }
.co-mg-full__stack { max-width: 760px; margin: 0 auto; animation: co-op-float 0.45s var(--ease) both; }
/* The page blur targets every <header>; the ones inside a floating card (briefing editor) stay sharp. */
html.co-op-layer .co-op-layer header { filter: none !important; }
html.co-op-layer .co-mg > :not(.co-op-layer) { filter: blur(12px) brightness(0.65); transition: filter 0.3s ease; }
@media (max-width: 340px) { .co-mg-two { grid-template-columns: 1fr; } .co-mg-gallery { grid-template-columns: repeat(2, 1fr); } }
