/* Identidade: Base Aérea de Porto Velho (BAPV) — azul, ouro e verde do brasão. */
:root {
  /* azul do brasão e variações */
  --azul-900: #142a4d;   /* texto principal */
  --azul-800: #1c3a69;   /* barra superior */
  --azul-700: #2a4b80;   /* hover */
  --azul-600: #375e9c;   /* azul institucional */
  --azul-300: #9fb4d6;
  --azul-100: #dce5f3;
  --azul-50: #eef3fa;    /* fundo da planta */
  /* ouro */
  --ouro: #ffcc00;
  --ouro-700: #8c6a00;   /* ouro como texto sobre claro */
  --ouro-100: #fff3c4;
  /* verde e apoio */
  --verde: #00a651;
  --verde-800: #0b6b3a;
  --verde-50: #e6f6ed;
  --cinza: #e6e7e8;
  --contorno: #231f20;
  --vermelho: #b3261e;
  --branco: #ffffff;

  --ink: var(--azul-900);
  --ink-2: #4a5d7a;
  --ink-3: #8293ad;
  --line: #c9d4e6;
  --panel: #f7f9fd;

  --r-sm: 6px;
  --r-md: 10px;
  --font: 'Archivo', system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.3, 1.6, .5, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--azul-50);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.display { font-weight: 800; font-variation-settings: 'wdth' 115; letter-spacing: -.01em; line-height: 1.05; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--branco);
  border-radius: var(--r-sm); padding: 7px 12px; cursor: pointer;
  font-weight: 500; white-space: nowrap; text-decoration: none; color: inherit;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--azul-300); background: var(--azul-50); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--azul-600); color: var(--branco); border-color: var(--azul-600); font-weight: 600; }
.btn.primary:hover { background: var(--azul-700); border-color: var(--azul-700); }
.btn.gold { background: var(--ouro); color: var(--azul-900); border-color: var(--ouro); font-weight: 700; }
.btn.gold:hover { background: #ffd633; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(55, 94, 156, .08); }
.btn.danger { color: var(--vermelho); }
.btn.danger:hover { background: #fdeceb; border-color: #f0b8b4; }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn.icon { padding: 6px 9px; min-width: 34px; justify-content: center; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; }

.field { display: grid; gap: 4px; }
.field > span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--branco);
  border-radius: var(--r-sm); padding: 8px 10px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--azul-600); box-shadow: 0 0 0 3px rgba(55, 94, 156, .2); }
textarea.input { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--branco); }
.seg button { border: 0; background: none; padding: 5px 10px; cursor: pointer; font-size: 13px; color: var(--ink-2); transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--ink); background: var(--azul-50); }
.seg button.on { background: var(--azul-600); color: var(--branco); }

/* ---------- moldura do brasão (assinatura visual) ---------- */
.frame-rule { height: 5px; background: var(--ouro); box-shadow: inset 0 -1px 0 var(--contorno), 0 1px 0 var(--contorno); }

/* ---------- login ---------- */
.login {
  min-height: 100%; display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(55, 94, 156, .55), transparent 60%),
    var(--azul-800);
  color: var(--branco);
}
.login-wrap { width: min(400px, 100%); display: grid; gap: 22px; justify-items: center; text-align: center; }
.login-crest { width: 128px; height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); animation: crestIn .9s var(--ease-out) both; }
.login-title { animation: fadeUp .6s .25s var(--ease-out) both; }
.login-title h1 { font-size: 30px; margin: 0 0 6px; }
.login-title p { margin: 0; color: var(--azul-100); font-size: 14px; }
.login-card {
  width: 100%; background: var(--branco); color: var(--ink); border-radius: var(--r-md); padding: 22px; display: grid; gap: 14px; text-align: left;
  border-top: 5px solid var(--ouro); box-shadow: 0 20px 50px rgba(8, 20, 40, .35);
  animation: fadeUp .6s .4s var(--ease-out) both;
}
.err { color: var(--vermelho); font-size: 13px; min-height: 1em; }
.login-card.shake { animation: shake .4s; }
@keyframes crestIn { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- cabeçalho institucional ---------- */
.brandbar { background: var(--azul-800); color: var(--branco); }
.brandbar-inner { max-width: 1000px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.brandbar img { height: 42px; width: auto; }
.brandbar b { display: block; font-size: 15px; font-weight: 700; }
.brandbar small { display: block; color: var(--azul-100); font-size: 12.5px; }
.brandbar .btn.ghost { color: var(--branco); }
.brandbar .btn.push { margin-left: auto; }
.brandbar .btn.ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- lista de eventos ---------- */
.events-page { max-width: 1000px; margin: 0 auto; padding: 36px 16px 80px; }
.events-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.events-head h1 { font-size: 40px; margin: 0; }
.ev-list { display: grid; border-top: 3px solid var(--azul-600); }
.ev-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center;
  padding: 18px 8px; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left;
  background: none; width: 100%; position: relative; transition: background-color .15s, padding-left .2s var(--ease-out);
}
.ev-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ouro); transform: scaleY(0); transition: transform .2s var(--ease-out); }
.ev-row:hover { background: var(--branco); padding-left: 16px; }
.ev-row:hover::before { transform: scaleY(1); }
.ev-date { font-variation-settings: 'wdth' 80; font-weight: 800; font-size: 20px; color: var(--azul-600); }
.ev-date small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); font-variation-settings: normal; }
.ev-name { font-size: 20px; font-weight: 600; }
.ev-meta { font-size: 13px; color: var(--ink-2); }
.ev-bar { width: 150px; height: 6px; background: var(--azul-100); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.ev-bar i { display: block; height: 100%; background: var(--azul-600); border-radius: 3px; }
.ev-bar i.full { background: var(--verde); }
.empty-state { padding: 40px 24px; color: var(--ink-2); background: var(--branco); border: 1px dashed var(--azul-300); border-radius: var(--r-md); display: grid; gap: 12px; justify-items: start; }
.empty-state b { color: var(--ink); font-size: 18px; }

/* ---------- workspace ---------- */
#app { height: 100%; }
.ws { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.topbar-wrap { position: relative; z-index: 10; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--azul-800); color: var(--branco); min-height: 54px; flex-wrap: nowrap; }
.topbar .btn.ghost { color: var(--branco); }
.topbar .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.topbar .crest { height: 34px; width: auto; }
.ws-title { font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }
.tabs { display: flex; gap: 2px; margin-left: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; background: none; border: 0; color: var(--azul-100); padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; white-space: nowrap; transition: color .15s, background-color .15s; }
.tabs button:hover { color: var(--branco); background: rgba(255, 255, 255, .07); }
.tabs button.on { color: var(--branco); font-weight: 700; }
.tabs button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 3px; border-radius: 2px; background: var(--ouro); transform: scaleX(0); transition: transform .25s var(--ease-out); }
.tabs button.on::after { transform: scaleX(1); }
.tabs button.help { color: var(--ouro); }
.topbar .spacer { flex: 1; }
.sync { font-size: 12px; color: var(--azul-100); display: flex; align-items: center; gap: 6px; }
.sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 3px rgba(0, 166, 81, .25); }
.sync.saving::before { background: var(--ouro); box-shadow: 0 0 0 3px rgba(255, 204, 0, .3); animation: blink 1s infinite; }
.sync.offline::before { background: #ff7b6e; box-shadow: none; }
@keyframes blink { 50% { opacity: .35; } }

.view { min-height: 0; overflow: hidden; }
.view-enter { animation: viewIn .22s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* mapa */
.map-view { display: grid; grid-template-columns: 300px minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; transition: background-color .2s; }
.side-head { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.glist { overflow: auto; flex: 1; padding: 6px 6px 20px; }
.chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm);
  cursor: grab; user-select: none; touch-action: pan-y; transition: background-color .12s, transform .12s;
}
.chip:hover { background: var(--branco); box-shadow: 0 0 0 1px var(--line); }
.chip.on { background: var(--ouro-100); }
.chip.lifted { opacity: .4; }
.chip .dot { width: 24px; height: 24px; border-radius: 50%; flex: none; color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; letter-spacing: .02em; }
.chip .who { min-width: 0; flex: 1; }
.chip .who b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .who small { color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.chip .where { font-size: 12px; color: var(--azul-600); font-weight: 600; font-variation-settings: 'wdth' 85; white-space: nowrap; }
.side.drop-target { background: var(--ouro-100); }
.side-tip { margin: 4px 6px 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--azul-100); color: var(--azul-900); font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.side-tip button { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--ink-2); padding: 0 2px; font-size: 16px; line-height: 1; }

.stage { position: relative; overflow: hidden; background: var(--azul-50); min-width: 0; }
.stage > svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.toolbar > * { pointer-events: auto; }
.toolbar .group { display: flex; gap: 4px; background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; box-shadow: 0 2px 8px rgba(20, 42, 77, .08); }
.toolbar .btn { border-color: transparent; }
.toolbar .btn:hover { background: var(--azul-50); }
.zoombar { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; box-shadow: 0 2px 8px rgba(20, 42, 77, .08); }
.zoombar .btn { border-color: transparent; }
.legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 10px; font-size: 12px; max-width: calc(100% - 200px); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hint { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); background: var(--azul-900); color: var(--branco); padding: 8px 10px 8px 14px; border-radius: var(--r-md); font-size: 14px; display: flex; gap: 10px; align-items: center; border-left: 4px solid var(--ouro); box-shadow: 0 8px 24px rgba(20, 42, 77, .25); animation: hintIn .2s var(--ease-out); z-index: 7; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.coach {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px));
  background: var(--branco); border-radius: var(--r-md); padding: 22px; display: grid; gap: 12px;
  border-top: 5px solid var(--ouro); box-shadow: 0 16px 40px rgba(20, 42, 77, .18); animation: fadeUp .35s var(--ease-out);
}
.coach h2 { margin: 0; font-size: 22px; }
.coach p { margin: 0; color: var(--ink-2); }
.coach .row { flex-wrap: wrap; }

/* svg */
.gridbg { fill: url(#gridpat); }
.item { cursor: grab; }
.item.dragging { cursor: grabbing; filter: drop-shadow(0 8px 10px rgba(20, 42, 77, .25)); }
.tbody { fill: var(--branco); stroke: var(--azul-800); stroke-width: 1.6; transition: fill .2s; }
.table:hover .tbody { fill: #fffbe8; }
.halo { fill: none; stroke: none; }
.table.is-selected .halo { fill: rgba(255, 204, 0, .25); stroke: var(--ouro); stroke-width: 2.5; }
.table.is-pick .halo { fill: rgba(55, 94, 156, .1); stroke: var(--azul-600); stroke-width: 1.5; stroke-dasharray: 5 4; animation: march .8s linear infinite; }
.table.is-hit .halo { fill: rgba(255, 204, 0, .45); }
.table.drop-over .halo { fill: rgba(0, 166, 81, .14); stroke: var(--verde); stroke-width: 2.5; stroke-dasharray: 6 4; animation: march .6s linear infinite; }
.table.drop-over .tbody { fill: var(--verde-50); }
.table.pulse .halo { animation: pulse .7s var(--ease-out); }
@keyframes march { to { stroke-dashoffset: -20; } }
@keyframes pulse { 0% { fill: rgba(255, 204, 0, .65); stroke: var(--ouro); stroke-width: 3; } 100% { fill: rgba(255, 204, 0, 0); stroke: rgba(255, 204, 0, 0); } }
.el.is-selected .hit { stroke: var(--ouro); stroke-width: 3.5; }
.tname { font-size: 12.5px; font-weight: 700; text-anchor: middle; fill: var(--azul-900); font-variation-settings: 'wdth' 72; pointer-events: none; }
.tcount { font-size: 10.5px; text-anchor: middle; fill: var(--ink-2); pointer-events: none; font-variant-numeric: tabular-nums; }
.tcount.over { fill: var(--vermelho); font-weight: 700; }
.seat.empty { fill: none; stroke: var(--azul-300); stroke-width: 1.2; stroke-dasharray: 3 3; }
.seat-g { cursor: grab; }
.seat-g .seat { stroke: var(--branco); stroke-width: 1.5; transition: stroke-width .15s; }
.seat-g:hover .seat { stroke: var(--ouro); stroke-width: 3; }
.seat-g .ini { font-size: 8.5px; font-weight: 700; fill: #fff; text-anchor: middle; pointer-events: none; letter-spacing: .03em; }
.seat-g.is-in .seat { stroke: var(--verde); stroke-width: 3; }
.seat-g.is-hit .seat { stroke: var(--ouro); stroke-width: 4; }
.seat-g.drop-over .seat { stroke: var(--verde); stroke-width: 4; }
.seat-g.pop > * { transform-box: fill-box; transform-origin: center; animation: seatPop .45s var(--ease-pop); }
@keyframes seatPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.el-label { font-weight: 700; font-variation-settings: 'wdth' 85; pointer-events: none; }

/* inspetor */
.inspector { width: 300px; background: var(--panel); border-left: 1px solid var(--line); overflow: auto; padding: 16px; display: grid; gap: 14px; align-content: start; animation: slideIn .22s var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.inspector h3 { margin: 0; font-size: 17px; }
.inspector .close { justify-self: end; margin-bottom: -10px; }
.seated { display: grid; gap: 2px; }
.seated .chip { cursor: default; }
.seated .chip .num { font-size: 12px; color: var(--ink-3); width: 18px; text-align: right; font-variant-numeric: tabular-nums; }

/* convidados */
.guests-view, .reception, .print-view, .help-view { overflow: auto; height: 100%; padding: 24px 16px 60px; }
.guests-inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 16px; }
.addbar { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr 1fr auto; gap: 8px; align-items: end; background: var(--branco); border: 1px solid var(--line); border-top: 4px solid var(--azul-600); border-radius: var(--r-md); padding: 14px; }
.table-wrap { background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13px; padding: 10px 12px; border-bottom: 2px solid var(--azul-100); position: sticky; top: 0; background: var(--branco); cursor: pointer; white-space: nowrap; user-select: none; }
table.data th:hover { color: var(--azul-600); }
table.data th.sorted { color: var(--azul-600); }
table.data th.sorted::after { content: ' ▾'; }
table.data td { padding: 8px 12px; border-bottom: 1px solid #edf1f7; vertical-align: middle; transition: background-color .4s; }
table.data tr:hover td { background: var(--azul-50); }
table.data tr.flash td { background: var(--ouro-100); }
table.data td.name { font-weight: 500; color: var(--azul-700); }
table.data td.name:hover { text-decoration: underline; }
table.data select { border: 1px solid transparent; background: transparent; padding: 4px; border-radius: 4px; max-width: 150px; cursor: pointer; }
table.data select:hover { border-color: var(--line); background: var(--branco); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.tag i { width: 9px; height: 9px; border-radius: 50%; }
.check { width: 18px; height: 18px; accent-color: var(--verde); cursor: pointer; }

/* recepção */
.rc-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.rc-count { display: flex; align-items: center; gap: 16px; }
.rc-count b { font-size: 60px; line-height: 1; font-weight: 800; font-variation-settings: 'wdth' 70; font-variant-numeric: tabular-nums; color: var(--azul-600); display: inline-block; }
.rc-count b.bump { animation: bump .45s var(--ease-pop); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--verde); } }
.rc-meter { flex: 1; max-width: 260px; height: 10px; background: var(--azul-100); border-radius: 5px; overflow: hidden; }
.rc-meter i { display: block; height: 100%; background: var(--verde); border-radius: 5px; transition: width .5s var(--ease-out); }
.rc-search { font-size: 22px; padding: 14px 16px; border: 2px solid var(--azul-600); border-radius: var(--r-md); width: 100%; background: var(--branco); transition: box-shadow .15s; }
.rc-search:focus { outline: none; box-shadow: 0 0 0 4px rgba(255, 204, 0, .55); }
.rc-list { display: grid; gap: 8px; }
.rc-item { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; transition: border-color .2s, background-color .2s; }
.rc-item.in { border-color: var(--verde); background: var(--verde-50); }
.rc-item.just-in { animation: justIn .8s var(--ease-out); }
@keyframes justIn { 0% { box-shadow: 0 0 0 0 rgba(0, 166, 81, .6); } 100% { box-shadow: 0 0 0 14px rgba(0, 166, 81, 0); } }
.rc-item .nm { font-size: 18px; font-weight: 600; }
.rc-item .tbl { font-size: 24px; font-weight: 800; font-variation-settings: 'wdth' 70; text-align: right; min-width: 90px; color: var(--azul-600); }
.rc-item .tbl small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); font-variation-settings: normal; }
.rc-item .btn.primary { background: var(--verde-800); border-color: var(--verde-800); }
.rc-item .btn.primary:hover { background: #095a31; }

/* imprimir */
.pv-inner { max-width: 900px; margin: 0 auto; display: grid; gap: 12px; }
.pv-option { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; transition: border-color .15s; }
.pv-option:hover { border-color: var(--azul-300); }
.pv-option h3 { margin: 0 0 2px; font-size: 17px; }
.pv-option p { margin: 0; color: var(--ink-2); font-size: 14px; }
.share { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--azul-800); color: var(--branco); border-radius: var(--r-md); padding: 20px; border-bottom: 5px solid var(--ouro); }
.share #qrBox { width: 156px; height: 156px; background: #fff; padding: 8px; border-radius: 6px; }
.share p { color: var(--azul-100); }
.share code { font-size: 13px; word-break: break-all; background: rgba(255, 255, 255, .1); padding: 6px 8px; border-radius: 4px; display: block; }
.share .btn { background: transparent; color: var(--branco); border-color: rgba(255, 255, 255, .35); }
.share .btn:hover { background: rgba(255, 255, 255, .1); }
.share .btn.gold { background: var(--ouro); color: var(--azul-900); border-color: var(--ouro); }

/* instruções */
.help-inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.help-nav { position: sticky; top: 0; display: grid; gap: 2px; padding-top: 4px; }
.help-nav a { text-decoration: none; color: var(--ink-2); padding: 7px 10px; border-radius: var(--r-sm); font-size: 14px; display: flex; gap: 10px; align-items: baseline; border-left: 3px solid transparent; transition: background-color .15s, color .15s, border-color .15s; }
.help-nav a:hover { background: var(--branco); color: var(--ink); }
.help-nav a.on { border-left-color: var(--ouro); color: var(--ink); font-weight: 600; background: var(--branco); }
.help-nav a b { color: var(--azul-600); font-variant-numeric: tabular-nums; width: 1.2em; }
.help-main { display: grid; gap: 18px; }
.help-intro h1 { font-size: 34px; margin: 0 0 8px; }
.help-intro p { margin: 0; color: var(--ink-2); max-width: 62ch; font-size: 16px; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; scroll-margin-top: 16px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--azul-600); color: var(--branco); display: grid; place-items: center; font-weight: 800; font-size: 20px; box-shadow: 0 0 0 4px var(--ouro); margin: 4px; }
.step h2 { margin: 6px 0 8px; font-size: 21px; }
.step p { margin: 0 0 10px; max-width: 66ch; }
.step ol, .step ul { margin: 0 0 12px; padding-left: 20px; max-width: 66ch; }
.step li { margin-bottom: 6px; }
.step li::marker { color: var(--azul-600); font-weight: 700; }
.step .go { margin-top: 4px; }
.kbd { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--azul-50); }
.callout { background: var(--ouro-100); border-left: 4px solid var(--ouro); padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14px; margin: 0 0 12px; max-width: 66ch; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tip { background: var(--branco); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; font-size: 14px; }
.tip b { display: block; margin-bottom: 4px; color: var(--azul-700); }
.mini-demo { display: block; width: 100%; max-width: 440px; height: auto; margin: 2px 0 12px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(20, 42, 77, .5); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fadeIn .15s; }
.modal { background: var(--branco); border-radius: var(--r-md); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; display: grid; gap: 14px; border-top: 5px solid var(--ouro); animation: modalIn .22s var(--ease-out); }
.modal h2 { margin: 0; font-size: 21px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--azul-900); color: var(--branco); padding: 10px 16px; border-radius: var(--r-md); z-index: 60; font-size: 14px; max-width: calc(100% - 32px); border-left: 4px solid var(--verde); box-shadow: 0 8px 24px rgba(20, 42, 77, .3); animation: toastIn .25s var(--ease-out); }
.toast.bad { background: var(--vermelho); border-left-color: #ffb4ab; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ghost-drag { position: fixed; pointer-events: none; z-index: 70; background: var(--azul-600); color: var(--branco); padding: 6px 12px 6px 6px; border-radius: 16px; font-size: 13px; font-weight: 600; transform: translate(12px, 12px) rotate(-2deg); white-space: nowrap; display: flex; align-items: center; gap: 6px; box-shadow: 0 8px 18px rgba(20, 42, 77, .35); }
.ghost-drag i { width: 18px; height: 18px; border-radius: 50%; background: var(--ouro); }

#printArea { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .addbar { grid-template-columns: 1fr 1fr; }
  .addbar .btn { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 860px) {
  .map-view { grid-template-columns: 1fr; grid-template-rows: 1fr; position: relative; }
  .side { position: absolute; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 5; transform: translateX(-100%); transition: transform .25s var(--ease-out); }
  .map-view.side-open .side { transform: none; box-shadow: 4px 0 20px rgba(20, 42, 77, .2); }
  .inspector { position: absolute; inset: auto 0 0 0; width: auto; max-height: 60%; z-index: 6; border-left: 0; border-top: 4px solid var(--ouro); box-shadow: 0 -6px 20px rgba(20, 42, 77, .15); animation-name: fadeUp; }
  .legend { display: none; }
  .ws { overflow: hidden; }
  .topbar { gap: 6px; padding: 6px 8px; flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .tabs button { white-space: nowrap; padding: 8px 10px; }
  .sync { font-size: 0; gap: 0; }
  .toolbar { left: 8px; right: 8px; top: 8px; gap: 4px; }
  .toolbar .group { flex-wrap: wrap; padding: 3px; gap: 2px; }
  .toolbar .btn { padding: 5px 8px; font-size: 13px; }
  .hint { top: 8px; bottom: auto; left: 8px; right: 8px; transform: none; animation-name: fadeIn; justify-content: space-between; }
  .ws-title { max-width: 18ch; }
  .ev-row { grid-template-columns: 1fr; gap: 6px; }
  .rc-item { grid-template-columns: 1fr auto; }
  .rc-item .tbl { grid-row: 1; grid-column: 2; }
  .rc-item .btn { grid-column: 1 / -1; justify-content: center; }
  .help-inner { grid-template-columns: 1fr; }
  .help-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .help-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .help-nav a.on { border-bottom-color: var(--ouro); }
  .step { grid-template-columns: 1fr; gap: 6px; padding: 16px; }
  .share { grid-template-columns: 1fr; }
  .brandbar small { display: none; }
}
@media (min-width: 861px) { .only-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- impressão ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  body.printing #app, body.printing .toast { display: none !important; }
  body.printing #printArea { display: block; }
  .p-head { display: flex; align-items: center; gap: 5mm; margin-bottom: 6mm; border-bottom: 1.5pt solid var(--azul-600); padding-bottom: 3mm; }
  .p-head img { height: 18mm; }
  .p-title { font-size: 20pt; font-weight: 800; margin: 0; }
  .p-sub { font-size: 10pt; color: #555; margin: 1mm 0 0; }
  .p-tables { columns: 3; column-gap: 8mm; font-size: 9.5pt; }
  .p-table { break-inside: avoid; margin-bottom: 5mm; }
  .p-table h3 { font-size: 12pt; margin: 0 0 1mm; border-bottom: 1.5pt solid #000; padding-bottom: 1mm; display: flex; justify-content: space-between; }
  .p-table ol { margin: 0; padding-left: 5mm; }
  .p-alpha { columns: 2; column-gap: 10mm; font-size: 10pt; }
  .p-alpha div { display: flex; justify-content: space-between; gap: 4mm; border-bottom: .5pt dotted #999; padding: 1mm 0; break-inside: avoid; }
  .p-alpha .letter { font-weight: 800; font-size: 13pt; border: 0; margin-top: 2mm; }
  .p-map svg { width: 100%; height: auto; max-height: 160mm; }
  .p-poster { text-align: center; padding-top: 10mm; }
  .p-poster > img { height: 40mm; margin-bottom: 6mm; }
  .p-poster h1 { font-size: 36pt; margin: 0 0 4mm; font-weight: 800; }
  .p-poster p { font-size: 16pt; margin: 0 0 10mm; }
  .p-poster .qr { display: inline-block; }
  .p-poster .qr img, .p-poster .qr canvas { width: 85mm !important; height: 85mm !important; }
  .p-poster code { display: block; margin-top: 8mm; font-size: 12pt; }
  .p-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .p-card { border: 1pt dashed #999; height: 60mm; display: grid; place-items: center; text-align: center; break-inside: avoid; }
  .p-card b { font-size: 34pt; font-weight: 800; font-variation-settings: 'wdth' 72; display: block; color: var(--azul-800); }
  .p-card span { font-size: 10pt; color: #555; }
}

/* acesso do responsável */
.ev-login { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.ev-login b { color: var(--azul-700); font-weight: 600; }
.ev-login .warn { color: var(--vermelho); }
.cred { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px 14px; align-items: end; background: var(--azul-50); border: 1px solid var(--azul-100); border-left: 4px solid var(--ouro); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 10px; }
.cred span { display: block; font-size: 12px; color: var(--ink-2); }
.cred b { font-size: 15px; word-break: break-all; }
.cred p { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ink-2); }
@media (max-width: 520px) { .cred { grid-template-columns: 1fr; } }

/* seleção múltipla e atalhos */
.seat-g.is-picked .seat { stroke: var(--ouro); stroke-width: 4.5; }
.seat-g.is-picked { filter: drop-shadow(0 0 4px rgba(255, 204, 0, .9)); }
.multi-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; }
.tagsel { display: inline-flex; align-items: center; gap: 4px; background: var(--ouro-100); border: 1px solid #f0d77a; border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.tagsel button { border: 0; background: none; cursor: pointer; padding: 2px; display: grid; color: var(--ink-2); border-radius: 50%; }
.tagsel button:hover { background: rgba(0, 0, 0, .08); }
.tagsel svg { width: 12px; height: 12px; }
.kbd-btn { font-size: 16px; line-height: 1; }
table.keys { border-collapse: collapse; font-size: 14px; width: 100%; }
table.keys td { padding: 7px 4px; border-bottom: 1px solid #edf1f7; vertical-align: top; }
table.keys td:first-child { white-space: nowrap; padding-right: 14px; }
@media (max-width: 860px) { .kbd-btn, .only-desktop { display: none !important; } }

.toolbar .btn.primary, .toolbar .btn.primary:hover { background: var(--azul-600); color: var(--branco); }
.hint .btn { color: var(--azul-900); background: var(--ouro); border-color: var(--ouro); font-weight: 700; }
