/* ===== Painel do administrador ===== */
body.adm-body { background: #f2eeef; }
.adm { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .adm { grid-template-columns: 252px 1fr; } }

.adm-side { background: var(--ink); color: #fff; padding: 18px 16px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 960px) { .adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 16px; } }
.adm-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-brand a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.adm-brand small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.75rem; opacity: 0.6; }
.adm-menu-btn { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.25); color: #fff; border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
@media (min-width: 960px) { .adm-menu-btn { display: none; } }
.adm-nav { display: none; flex-direction: column; gap: 4px; }
.adm-side.open .adm-nav { display: flex; }
@media (min-width: 960px) { .adm-nav { display: flex; flex: 1; } }
.adm-nav a, .adm-nav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, 0.78);
  text-decoration: none; font-weight: 600; font-size: 0.925rem; background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.adm-nav a:hover, .adm-nav button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.adm-nav a.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.adm-nav .nav-label { font-size: 0.75rem; color: rgba(255, 255, 255, 0.66); padding: 14px 12px 4px; font-weight: 600; }
.adm-nav .nav-ev { font-weight: 500; font-size: 0.875rem; }
.adm-nav .nav-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-nav .spacer { flex: 1; min-height: 16px; }

.adm-main { padding: 22px 16px 80px; min-width: 0; }
@media (min-width: 720px) { .adm-main { padding: 32px 36px 80px; } }
.adm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.adm-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; }
.adm-head .sub { color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.adm-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.kpi .k-value { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.kpi .k-note { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.kpi.attn { background: #e5f0ff; }
.kpi-link { display: grid; gap: 0; position: relative; text-decoration: none; color: var(--ink); transition: transform 0.15s, box-shadow 0.15s; }
.kpi-link .k-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.kpi-link .k-value { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.kpi-link .k-note { font-size: 0.8rem; color: var(--brand-deep); font-weight: 650; margin-top: 4px; }
.kpi-link .k-ir { position: absolute; right: 14px; top: 14px; color: var(--muted); }
.kpi-link:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(36, 21, 22, 0.06), 0 14px 28px -14px rgba(36, 21, 22, 0.3); }

.panel-box { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-box > header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-box > header h2 { font-size: 1.05rem; font-weight: 700; }
.panel-body { padding: 20px; }

/* tabelas */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
.tbl th { text-align: left; font-size: 0.8rem; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f8f9fc; position: sticky; top: 0; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #f6f8fd; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .t-name strong { display: block; font-weight: 650; }
.tbl .t-name small { color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.code { font-family: var(--display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; white-space: nowrap; }
.prog { display: grid; gap: 6px; min-width: 120px; }
.prog .meter { height: 7px; }
.prog small { color: var(--muted); }
.checkmark { color: var(--ok); font-weight: 700; }
@media (max-width: 720px) {
  table.tbl.cards thead { display: none; }
  table.tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
  .tbl.cards td { padding: 0; border: 0; }
  .tbl.cards td[data-hide-sm] { display: none; }
  .tbl.cards td.num { text-align: left; }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { position: relative; flex: 1 1 220px; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 38px; min-height: 42px; }
.toolbar select { flex: 0 1 auto; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); }
.toolbar .count { color: var(--muted); font-size: 0.875rem; margin-left: auto; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1.5px solid var(--line-strong); overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 650; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .badge { background: var(--brand); color: var(--on-brand); font-size: 0.72rem; padding: 1px 7px; border-radius: 99px; }

/* gaveta */
.drawer-bg { position: fixed; inset: 0; background: rgba(36, 21, 22, 0.35); z-index: 40; opacity: 0; transition: opacity 0.2s; }
.drawer-bg.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 41;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.22s ease; box-shadow: -12px 0 40px -20px rgba(0, 0, 0, 0.4);
}
.drawer.show { transform: none; }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.drawer-head .row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-head h2 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.drawer-close { background: var(--paper); border: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.drawer-body { padding: 18px 22px 40px; overflow-y: auto; display: grid; gap: 22px; align-content: start; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dsec h3 { font-size: 0.85rem; color: var(--muted); font-weight: 650; margin-bottom: 8px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.925rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; white-space: pre-wrap; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.875rem; }
.hist li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.hist li span:first-child { color: var(--ink); }

/* resumo */
.sum-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .sum-grid { grid-template-columns: 1fr 1fr; } }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 12px; align-items: center; font-size: 0.9rem; }
.bars .b-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b-track, .bars .b-fill { display: block; }
.bars .b-track { height: 12px; background: var(--paper); border-radius: 0 4px 4px 0; }
.bars .b-fill { height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 3px; }
.bars .b-val { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 3ch; text-align: right; }
.cols { position: relative; }
.cols svg { width: 100%; height: auto; max-height: 240px; display: block; overflow: visible; }
.cols .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity 0.1s; }

/* check-in */
.ci-grid { display: grid; gap: 18px; }
@media (min-width: 980px) { .ci-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.ci-input { display: flex; gap: 8px; }
.ci-input input { flex: 1; font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.06em; text-transform: uppercase; min-height: 54px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); }
.ci-input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.ci-cam { position: relative; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.ci-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-cam .frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 18px; }
.ci-result { border-radius: var(--r-lg); padding: 22px; display: grid; gap: 10px; }
.ci-result h2, .ci-result h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.ci-result.ok { background: var(--ok-soft); }
.ci-result.warn { background: var(--warn-soft); }
.ci-result.bad { background: var(--danger-soft); }
.ci-result.info { background: #e5f0ff; }
.ci-big { font-family: var(--display); font-weight: 700; font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 920px; }
.ed-sec { padding: clamp(18px, 3vw, 28px); }
.ed-sec > h2 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.ed-sec > p.muted { margin-top: 4px; }
.ed-sec > .grid-2, .ed-sec > .stack { margin-top: 18px; }
.rows { display: grid; gap: 10px; }
.row-item { display: grid; gap: 10px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fafbfe; position: relative; }
@media (min-width: 720px) {
  .row-item.lote { grid-template-columns: 1.4fr 1fr 1fr auto; align-items: end; }
  .row-item.cupom { grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr auto; align-items: end; }
  .row-item.extra { grid-template-columns: 1.6fr 1fr auto; align-items: end; }
  .row-item.extra .full { grid-column: 1 / -1; }
  .row-item.faq { grid-template-columns: 1fr auto; align-items: end; }
  .row-item.faq .full { grid-column: 1 / -1; }
}
.row-item .field label { font-size: 0.825rem; }
.row-item .field input, .row-item .field select { min-height: 42px; padding: 8px 12px; }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }
.campos-tbl { width: 100%; border-collapse: collapse; }
.campos-tbl td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.campos-tbl td:last-child { text-align: right; }
/* telas bem estreitas (320px): o nome do campo em cima e as tres opcoes embaixo, ocupando a largura */
@media (max-width: 400px) {
  .campos-tbl tr { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .campos-tbl td { display: block; padding: 0; border-bottom: 0; }
  .campos-tbl td:last-child { text-align: left; }
  .campos-tbl .seg { display: flex; }
  .campos-tbl .seg label { flex: 1; display: flex; text-align: center; }
  .campos-tbl .seg span { flex: 1; display: grid; place-items: center; padding: 8px 6px; }
}
.seg { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.seg label { cursor: pointer; }
.seg span { display: block; padding: 6px 12px; font-size: 0.8rem; font-weight: 650; color: var(--muted); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.toggle input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; cursor: pointer; transition: background 0.15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.toggle input:checked { background: var(--brand); }
.toggle input:checked::after { transform: translateX(18px); }
.toggle b { display: block; font-weight: 650; }
.toggle small { color: var(--muted); font-size: 0.85rem; }
.cover-prev { aspect-ratio: 1600 / 848; border-radius: var(--r); background: var(--paper) center / cover no-repeat; border: 1.5px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 0; background: linear-gradient(transparent, #f2eeef 30%); }
.danger-zone { border: 1.5px solid var(--danger-soft); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.login .card { width: min(420px, 100%); padding: 32px; display: grid; gap: 18px; }
.login h1 { font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; }

.empty-box { padding: 40px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty-box h2 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.empty-box p { color: var(--muted); max-width: 48ch; }
@media (max-width: 720px) { .toolbar select { flex: 1 1 100%; } .toolbar .count { margin-left: 0; } }

/* ===== Telas de acesso (entrar / criar conta) ===== */
.auth { min-height: 100vh; display: grid; background: var(--surface); }
@media (min-width: 960px) { .auth { grid-template-columns: minmax(440px, 1fr) 1.1fr; } }
.auth-side { display: flex; flex-direction: column; padding: 28px 20px 40px; }
@media (min-width: 640px) { .auth-side { padding: 36px 48px 48px; } }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; }
.auth-brand .brand-mark { width: 36px; height: 36px; }
.auth-brand .brand-mark .ic { width: 20px; height: 20px; }
.auth-box { width: min(420px, 100%); margin: 0 auto auto; padding-top: clamp(32px, 9vh, 72px); display: grid; gap: 16px; }
@media (min-width: 960px) { .auth-box { margin: auto; padding-top: 32px; } }
.auth-box h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2rem); letter-spacing: -0.02em; }
.auth-links { margin-top: -4px; font-size: 0.925rem; }
.auth-switch { color: var(--muted); font-size: 0.95rem; text-align: center; margin-top: 4px; }
.auth-switch a, .auth-links a { font-weight: 650; }
.auth-art { display: none; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
@media (min-width: 960px) { .auth-art { display: flex; align-items: center; } }
.auth-art::before { content: ""; position: absolute; inset: auto -20% -35% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--brand); opacity: 0.35; filter: blur(60px); }
.auth-art-inner { position: relative; padding: 56px; max-width: 620px; display: grid; gap: 22px; }
.auth-art h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 3.6vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.02; }
.auth-art p { color: rgba(255, 255, 255, 0.72); font-size: 1.1rem; max-width: 44ch; }
.mini-ticket { --notch: 18px; position: relative; display: grid; grid-template-columns: 1fr 130px; background: #fff; color: var(--ink); border-radius: 18px; max-width: 420px; transform: rotate(-3deg); margin-top: 12px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); overflow: hidden; padding-top: 10px; }
.mini-ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: var(--brand); }
.mt-main { padding: 18px 20px; display: grid; gap: 4px; }
.mt-org { font-size: 0.75rem; color: var(--muted); font-weight: 650; }
.mt-main strong { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.mt-meta { font-size: 0.85rem; color: var(--muted); }
.mt-code { font-family: var(--display); font-weight: 700; letter-spacing: 0.05em; margin-top: 8px; }
.mt-stub { border-left: 2px dashed var(--line-strong); padding: 14px; display: grid; place-items: center; position: relative; }
.mt-stub svg { width: 100%; height: auto; }
.mt-stub::before, .mt-stub::after { content: ""; position: absolute; left: calc(var(--notch) / -2); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--ink); }
.mt-stub::before { top: calc(var(--notch) / -2); }
.mt-stub::after { bottom: calc(var(--notch) / -2); }
.phone { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.phone span { display: grid; place-items: center; padding: 0 12px; background: var(--paper); color: var(--muted); font-weight: 600; border-right: 1.5px solid var(--line); white-space: nowrap; font-size: 0.925rem; }
.phone input.input, .field .phone input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-width: 0; }
.phone:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field.has-err .phone { border-color: var(--danger); }
.pw { position: relative; }
.pw input { padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { color: var(--ink); background: var(--paper); }
.rec-code { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 5vw, 1.7rem); letter-spacing: 0.06em; text-align: center; padding: 20px; border-radius: var(--r); background: var(--paper); border: 2px dashed var(--line-strong); }

/* ===== Janela (modal) e compartilhamento ===== */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(36, 21, 22, 0.45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity 0.15s; }
.modal-wrap.show { opacity: 1; }
.modal { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 16px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35); }
.modal.largo { width: min(640px, 100%); }
.modal h2 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; padding-right: 44px; }
.modal-x { position: absolute; top: 18px; right: 18px; }
.share-link { display: flex; gap: 8px; flex-wrap: wrap; }
.share-link input { flex: 1 1 240px; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--paper); font-weight: 600; }
.share-qr { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--paper); }
.share-qr .qr { width: 150px; padding: 8px; border-radius: 12px; }
@media (max-width: 480px) { .share-qr { grid-template-columns: 1fr; justify-items: start; } }

/* ===== Troca de organizacao ===== */
.org-switch { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; border-radius: 12px; text-align: left; min-width: 0; flex: 1; }
.org-switch:hover { background: rgba(255, 255, 255, 0.08); }
.org-switch-txt { display: grid; font-family: var(--display); font-weight: 600; font-size: 0.95rem; line-height: 1.2; min-width: 0; }
.org-switch-txt small { font-family: var(--body); font-weight: 500; font-size: 0.75rem; opacity: 0.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-caret { margin-left: auto; opacity: 0.7; flex: none; }
.org-logo { border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.org-menu { background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 6px; display: grid; gap: 2px; }
.org-menu button, .org-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: none; border: 0; color: rgba(255, 255, 255, 0.85); text-decoration: none; cursor: pointer; text-align: left; font-weight: 600; font-size: 0.9rem; width: 100%; }
.org-menu button span { display: grid; line-height: 1.2; }
.org-menu button small { font-weight: 500; font-size: 0.72rem; opacity: 0.6; }
.org-menu button:hover, .org-menu a:hover, .org-menu .active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.org-menu .brand-mark { font-size: 0.8rem; }

/* ===== Organizacao ===== */
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 96px; height: 96px; border-radius: 16px; background: var(--paper) center / contain no-repeat; border: 1.5px dashed var(--line-strong); flex: none; }

/* ===== Pagamentos ===== */
.opcoes-pg { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 720px) { .opcoes-pg { grid-template-columns: 1fr 1fr; } }
.opcao-pg { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.opcao-pg input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.opcao-pg b { display: block; font-size: 1rem; }
.opcao-pg small { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 4px; line-height: 1.45; }
.opcao-pg:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.input.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }
.conta-ok { color: var(--ok); margin-top: 6px; }
.conta-ok code { font-size: 0.8rem; color: var(--muted); }
.lista-segura { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.lista-segura strong { color: var(--ink); }
.test-banner { display: flex; gap: 10px; align-items: flex-start; }
.test-banner .ic { margin-top: 3px; }
.mp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r); padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.mp-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.mp-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.9rem; }
.mp-list small { display: block; color: var(--muted); font-size: 0.78rem; }
.mp-list .num { text-align: right; }
.atencao { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 0.75rem; font-weight: 800; vertical-align: 1px; }
.chip-teste { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--warn-soft); color: var(--warn); padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.alerta-reg { display: grid; gap: 10px; }
.alerta-reg .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Situacao do evento (rascunho, publicado, encerrado) =====
   Cada situacao tem uma cor fixa no painel inteiro: ambar = fora do ar, verde = no ar, cinza = encerrado.
   A luz verde pulsa devagar: e o unico movimento automatico do painel e quer dizer "no ar agora". */
.st-rascunho { --st: var(--warn); --st-soft: var(--warn-soft); }
.st-publicado { --st: var(--ok); --st-soft: var(--ok-soft); }
.st-encerrado { --st: #545a74; --st-soft: #eceef4; }
.st-luz { width: 12px; height: 12px; border-radius: 50%; background: var(--st); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 22%, transparent); }
.st-publicado .st-luz { animation: no-ar 2.4s ease-in-out infinite; }
@keyframes no-ar { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--st) 10%, transparent); } }

/* situacao do evento: uma linha so, com a luz da situacao (sem faixa lateral) */
.faixa-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--st-soft); }
.faixa-status .st-txt { flex: 1 1 280px; margin: 0; font-size: 0.925rem; line-height: 1.45; color: var(--ink); }
.faixa-status .st-titulo { font-weight: 700; color: var(--st); }
.faixa-status .st-agora { font-weight: 650; }
.faixa-status .btn-ghost { background: var(--surface); }

.opcoes-st { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 760px) { .opcoes-st { grid-template-columns: repeat(3, 1fr); } }
.opcao-st { cursor: pointer; position: relative; }
.opcao-st input { position: absolute; opacity: 0; pointer-events: none; }
.opcao-st > span { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; height: 100%; padding: 16px; border-radius: var(--r); border: 1.5px solid var(--line-strong); background: var(--surface); }
.opcao-st b { font-weight: 650; }
.opcao-st small { grid-column: 2; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.opcao-st input:checked + span { border-color: var(--st); background: var(--st-soft); box-shadow: inset 0 0 0 1.5px var(--st); }
.opcao-st input:checked + span b { color: var(--st); }
.opcao-st input:focus-visible + span { outline: 3px solid var(--t-foco, #bb7f7f); outline-offset: 2px; }
.st-pill { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--st-soft); color: var(--st); font-weight: 650; font-size: 0.9rem; box-shadow: var(--shadow); }
.save-bar { align-items: center; }
/* eventos no menu: a cor de cada evento; a situacao vai escrita (nao so pela cor) */
.adm-nav .ev-cor { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18); }
.adm-nav .nav-ev span { flex: 1; min-width: 0; }
.adm-nav .ev-st { font-style: normal; font-size: 0.7rem; font-weight: 650; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.85); flex: none; }
.adm-nav .ev-st.rascunho { background: rgba(255, 179, 71, 0.2); color: #ffd59a; }
.adm-nav .nav-num { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #e5f0ff; color: #1d58c4; font-size: 0.72rem; display: grid; place-items: center; }
.tabs .badge.cinza { background: var(--line-strong); color: var(--ink); }
.chip-camiseta { background: var(--wait-soft); color: var(--wait); }

/* cupons com o uso de cada um */
.row-item.cupom .uso-cupom { grid-column: 1 / -1; order: 10; display: flex; gap: 8px; align-items: center; font-size: 0.875rem; color: var(--muted); margin: 0; }

/* camiseta */
.opcoes-cam { margin-top: 14px; }
@media (min-width: 720px) { .opcoes-cam { grid-template-columns: repeat(3, 1fr); } }
#cam-box { margin-top: 18px; }

/* ===== Identidade visual do evento ===== */
.ident { display: grid; gap: 22px; margin-top: 18px; }
@media (min-width: 900px) { .ident { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; } .ident-prev-wrap { position: sticky; top: 20px; } }
.ident-prev-wrap { display: grid; gap: 8px; }
.ident-prev-wrap .label { font-weight: 650; font-size: 0.9375rem; }
.cor-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cor-row input[type="color"] { width: 48px; height: 44px; padding: 2px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.fundos, .fontes { display: grid; gap: 8px; }
.fundos { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .fontes { grid-template-columns: 1fr 1fr; } }
.fundo, .fonte-op { position: relative; cursor: pointer; }
.fundo input, .fonte-op input { position: absolute; opacity: 0; pointer-events: none; }
.fundo span { display: grid; gap: 8px; justify-items: center; padding: 10px; border-radius: var(--r); border: 1.5px solid var(--line-strong); font-weight: 600; font-size: 0.875rem; background: var(--surface); }
.fundo i { width: 100%; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.f-claro i { background: #f8f5f5; }
.f-escuro i { background: var(--t-esc-paper, #290f11); }
.f-colorido i { background: linear-gradient(var(--brand) 55%, var(--t-col-paper, #ebdada) 55%); }
.fonte-op span { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--line-strong); background: var(--surface); }
.fonte-op b { font-family: var(--ev-font); font-weight: var(--ev-peso); letter-spacing: var(--ev-espaco); font-size: calc(1.05rem * var(--ev-escala)); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fonte-op small { color: var(--muted); font-size: 0.8rem; }
.fundo input:checked + span, .fonte-op input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.fundo input:focus-visible + span, .fonte-op input:focus-visible + span { outline: 3px solid var(--t-foco, #bb7f7f); outline-offset: 2px; }

/* miniatura da pagina do evento */
.ident-prev { --paper: var(--t-claro-paper, #f1e8e8); --surface: #fff; --ink: #241516; --muted: #6c5b5b; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 12px; display: grid; gap: 10px; }
.ident-prev.fundo-escuro { --paper: var(--t-esc-paper, #290f11); --surface: var(--t-esc-surface, #271719); --ink: #f6f0f2; --muted: #c3b4ba; }
.ident-prev.fundo-colorido { --paper: var(--t-col-paper, #ebdada); }
.ip-hero { display: grid; gap: 8px; }
.fundo-colorido .ip-hero { background: var(--brand); color: var(--on-brand); padding: 8px; border-radius: 12px; }
.ip-hero img { width: 100%; aspect-ratio: 1600 / 848; object-fit: cover; border-radius: 8px; }
.ip-hero img.ip-logo { width: auto; max-width: 60%; max-height: 40px; aspect-ratio: auto; object-fit: contain; border-radius: 0; }
.ip-titulo { font-family: var(--ev-font); font-weight: var(--ev-peso); letter-spacing: var(--ev-espaco); font-size: calc(1.35rem * var(--ev-escala)); line-height: 1.05; overflow-wrap: anywhere; }
.ip-contagem { display: flex; gap: 5px; align-items: baseline; flex-wrap: wrap; padding: 7px 10px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: 0.72rem; }
.ip-contagem b { font-family: var(--display); font-size: 0.95rem; }
.fundo-colorido .ip-contagem { background: var(--surface); color: var(--ink); }
.ip-corpo { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--surface); }
.ip-linha { height: 7px; border-radius: 4px; background: var(--ink); opacity: 0.14; }
.ip-linha.curta { width: 60%; }
.ip-botao { margin-top: 4px; text-align: center; padding: 7px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 0.78rem; font-weight: 650; }

/* ---------- e-mails, prazo e lista de espera ---------- */
.sub-opcao { margin-left: 56px; }
.prazo-acoes { display: inline-flex; gap: 12px; margin-left: 10px; flex-wrap: wrap; }
.prazo-acoes .link-btn { font-size: 0.85rem; }
.hist li svg { width: 15px; height: 15px; vertical-align: -3px; }
.erro-email { color: var(--danger); }
.envios { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.envios li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.envios li small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.envios .andamento { color: var(--brand-deep); font-weight: 600; }
.envios details summary { cursor: pointer; color: var(--muted); }
@media (max-width: 560px) { .sub-opcao { margin-left: 0; } }

/* ===================================================================
   v2.3: identidade do evento no painel, telas de trabalho e portaria
   Escala de espacos: 4, 8, 12, 16, 20, 24, 32
   =================================================================== */
.adm-main:focus { outline: none; }

/* canhoto com a data: o mesmo desenho do ingresso do site */
.canhoto { --notch: 12px; position: relative; flex: none; display: grid; place-content: center; justify-items: center; gap: 2px; width: 76px; align-self: stretch; min-height: 76px; border-radius: var(--r) 0 0 var(--r); background: var(--brand); color: var(--on-brand); line-height: 1; text-align: center; }
.canhoto b { font-family: var(--display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.03em; }
.canhoto small { font-family: var(--display); font-size: 0.78rem; font-weight: 500; }

.canhoto.pequeno { --notch: 0px; width: 44px; min-height: 44px; border-radius: 10px; align-self: center; }
.canhoto.pequeno b { font-size: 1.05rem; }
.tbl .canhoto small, .canhoto small { color: var(--on-brand); }
.canhoto.pequeno small { font-size: 0.66rem; }

/* cabecalho do evento */
.ev-cabeca { display: flex; align-items: stretch; gap: 0; margin-bottom: 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.ev-cabeca-txt { flex: 1 1 auto; min-width: 0; padding: 16px 20px; display: grid; gap: 6px; align-content: center; border-left: 2px dashed var(--line-strong); }
.ev-cabeca-tit { font-family: var(--ev-font); font-weight: var(--ev-peso); letter-spacing: var(--ev-espaco); font-size: calc(clamp(1.35rem, 2.6vw, 1.8rem) * var(--ev-escala)); line-height: 1.1; overflow-wrap: anywhere; }
.ev-cabeca .sub { color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.925rem; }
.ev-cabeca .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; padding: 16px 20px 16px 0; }
@media (max-width: 860px) {
  .ev-cabeca { flex-wrap: wrap; }
  .ev-cabeca-txt { flex-basis: calc(100% - 76px); }
  .ev-cabeca .actions { flex-basis: 100%; justify-content: flex-start; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .canhoto:not(.pequeno) { width: 60px; }
  .canhoto:not(.pequeno) b { font-size: 1.5rem; }
  .ev-cabeca-txt { padding: 12px 14px; flex-basis: calc(100% - 60px); }
  .ev-cabeca .actions .btn { flex: 1 1 auto; }
}

/* menu Mais */
.menu-mais { position: relative; }
.menu-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; max-width: min(340px, calc(100vw - 32px)); padding: 6px; display: grid; gap: 2px; background: var(--surface); border-radius: var(--r); box-shadow: 0 2px 6px rgba(36, 21, 22, 0.08), 0 18px 40px -16px rgba(36, 21, 22, 0.4); border: 1px solid var(--line); }
.menu-lista [role="menuitem"] { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--ink); font-weight: 600; font-size: 0.925rem; text-align: left; cursor: pointer; }
.menu-lista [role="menuitem"]:hover { background: var(--paper); }
.menu-lista [role="menuitem"]:focus-visible { background: var(--brand-soft); outline: 2px solid var(--brand); outline-offset: -2px; }
.menu-lista [role="menuitem"] .ic { color: var(--muted); }
.menu-lista .perigo { color: var(--danger); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.menu-lista .perigo .ic { color: var(--danger); }
@media (max-width: 860px) { .menu-lista { left: 0; right: auto; } }

/* avisos e atalhos para o que precisa de atencao */
.alerta-link { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 16px; text-decoration: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.alerta-link > span:first-of-type { flex: 1; }
.alerta-ir { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.aviso-fixo { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.aviso-fixo > span { flex: 1; }
.aviso-fixo .link-btn { color: inherit; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.mp-nota { display: flex; gap: 8px; align-items: center; margin: -4px 0 14px; }
.faixa-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #e5f0ff; color: #12366f; text-decoration: none; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.faixa-fila > span:first-of-type { flex: 1 1 260px; }
.faixa-fila .btn { pointer-events: none; }

/* lista de inscritos: chips de situacao com numeros */
.chips-filtro { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.chip-f { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 650; font-size: 0.875rem; cursor: pointer; white-space: nowrap; }
.chip-f b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.chip-f[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-f[aria-checked="true"] b { color: rgba(255, 255, 255, 0.75); }
.chip-f.perigo { border-color: #e9a8a3; color: var(--danger); }
.chip-f.perigo[aria-checked="true"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.chips-filtro .count { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.toolbar .search { flex: 1 1 260px; }
@media (max-width: 720px) { .toolbar select { flex: 1 1 40%; min-width: 0; } }

/* acoes em grupo */
.barra-grupo { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 10px 20px; background: var(--ink); color: #fff; }
.barra-grupo .btn-ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.barra-grupo .link-btn { color: #fff; margin-left: auto; }
.tbl .t-sel { width: 44px; padding-right: 0; }
.tbl .t-sel input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; margin: 0; display: block; }
/* area de toque de 40px em volta da caixinha, sem mudar o desenho */
.sel-alvo { display: inline-grid; place-items: center; padding: 11px; margin: -11px; cursor: pointer; border-radius: 10px; }
.tbl tbody tr.sel { background: var(--brand-soft); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.t-abrir { background: none; border: 0; padding: 6px 0; margin: -6px 0; font: inherit; font-weight: 650; color: inherit; cursor: pointer; text-align: left; }
.t-abrir:hover { text-decoration: underline; text-underline-offset: 3px; }
.pag-txt { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.pag-txt.pago { color: var(--ok); }
.pag-txt.aguardando { color: var(--warn); }
@media (max-width: 720px) {
  .tbl.cards.tbl-inscritos tr { grid-template-columns: auto 1fr auto; }
  .tbl.cards.tbl-inscritos td.t-sel { grid-row: span 2; padding-top: 2px; }
}

/* eventos no painel inicial */
.t-ev { display: flex; align-items: center; gap: 12px; }
.t-ev > span { display: grid; min-width: 0; }
.t-link { font-family: var(--ev-font); font-weight: var(--ev-peso); letter-spacing: var(--ev-espaco); font-size: calc(1rem * var(--ev-escala)); color: var(--ink); text-decoration: none; }
.t-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tbl .t-ev > span:not(.canhoto) > small { color: var(--muted); }
a.chip { text-decoration: none; }

/* ficha (gaveta) */
.gaveta-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px 0 2px; }
.gaveta-nav .link-btn { display: inline-flex; gap: 4px; align-items: center; min-height: 36px; text-decoration: none; }
.gaveta-nav .link-btn:disabled { opacity: 0.35; cursor: default; }
.comp-junto { border-radius: var(--r); background: var(--paper); padding: 8px; display: grid; place-items: center; }
.comp-img { display: block; }
.comp-img img { max-height: 260px; width: auto; max-width: 100%; border-radius: 10px; }
.comp-img.grande img { max-height: min(70vh, 720px); }
.btn-wa-leve .ic { color: #117a43; }
.drawer-head .drawer-actions .btn-ok { order: -1; }

/* fila de comprovantes */
.fila { display: grid; gap: 16px; }
.fila-topo { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.fila-topo h1, .fila-topo h2 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.fila-prog { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.fila-prog b { color: var(--ink); }
.fila-barra { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.fila-barra span { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.fila-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) { .fila-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); } .fila-info { position: sticky; top: 16px; } }
.fila-img { margin: 0; min-height: 320px; display: grid; place-items: center; padding: 12px; border-radius: var(--r-lg); background: #241516; }
.fila-img .comp-img img { max-height: min(72vh, 760px); border-radius: 8px; }
.fila-img > p { color: rgba(255, 255, 255, 0.75); }
.comp-pdf { width: 100%; height: min(72vh, 760px); border: 0; border-radius: 8px; background: #fff; }
.fila-info { padding: 20px; display: grid; gap: 12px; align-content: start; }
.fila-info h2, .fila-info h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.15; }
.fila-ev { display: flex; gap: 8px; align-items: center; font-weight: 650; font-size: 0.875rem; color: var(--brand-deep); }
.fila-ev .ev-cor { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.fila-valor { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--paper); }
.fila-valor span { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.fila-valor b { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.fila-valor small { color: var(--muted); }
.fila-kv > div { grid-template-columns: 46% 1fr; }
.fila-acoes { display: grid; gap: 8px; }
.fila-acoes .btn-ok { min-height: 52px; font-size: 1.02rem; }
.fila-acoes kbd, .fila-acoes kbd { font: 600 0.72rem var(--body); padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.22); margin-left: 4px; }
.fila-acoes .btn-ghost kbd { background: var(--paper); }
.fila-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fila-nav .link-btn { display: inline-flex; gap: 4px; align-items: center; min-height: 40px; text-decoration: none; }
.fila-nav .link-btn:disabled { opacity: 0.35; cursor: default; }
.fila-motivo { display: grid; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--warn-soft); }
.fila-motivo label { font-size: 0.9rem; }
.fila-ultima { padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: #05543a; }
.fila-vazia { padding: 48px 24px; }
.fila-ok { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.fila-ok .ic { width: 28px; height: 28px; }
@media (max-width: 959px) {
  .fila-img { min-height: 220px; }
  .fila-img .comp-img img { max-height: 52vh; }
  /* no celular os botoes ficam sempre a mao, presos no rodape da ficha */
  .fila-acoes { position: sticky; bottom: 0; z-index: 3; background: var(--surface); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 0 -4px; box-shadow: 0 -12px 16px -12px rgba(36, 21, 22, 0.25); }
}

/* portaria */
.modo-portaria .adm { grid-template-columns: 1fr; }
.modo-portaria .adm-side { display: none; }
.modo-portaria .adm-main { padding: 0 0 40px; }
.portaria { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.portaria.cheia { min-height: 100vh; background: var(--paper); }
.pt-topo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--brand); color: var(--on-brand); }
.portaria.cheia .pt-topo { position: sticky; top: 0; z-index: 10; border-radius: 0; padding: 12px 16px calc(12px); padding-top: calc(12px + env(safe-area-inset-top)); }
.pt-sair { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: inherit; background: rgba(255, 255, 255, 0.14); background: color-mix(in srgb, var(--on-brand) 14%, transparent); }
.pt-ev { flex: 1; min-width: 0; }
.pt-ev p { font-size: 0.78rem; font-weight: 650; opacity: 0.85; }
.pt-ev h1, .pt-ev h2 { font-family: var(--ev-font); font-weight: var(--ev-peso); letter-spacing: var(--ev-espaco); font-size: calc(1.15rem * var(--ev-escala)); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-conta { flex: none; display: flex; align-items: center; gap: 8px; line-height: 1.1; }
.pt-conta b { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pt-conta span { font-size: 0.78rem; opacity: 0.9; }
.pt-rede { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r); background: var(--warn-soft); color: #6b3305; font-weight: 600; font-size: 0.9rem; }
.portaria.cheia .pt-rede, .portaria.cheia .pt-grid { margin-inline: 16px; }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
@media (min-width: 980px) { .pt-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.pt-cam-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pt-cam { position: relative; aspect-ratio: 1; max-height: 62vh; min-width: 0; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #241516; display: grid; place-items: center; }
@media (min-width: 980px) { .pt-cam { aspect-ratio: 4 / 3; } }
.pt-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pt-cam .frame { position: absolute; inset: 16%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
.pt-abrir { min-height: 56px; font-size: 1.02rem; }
.pt-res { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; }
.pt-res .ci-result { box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); }
.pt-res .ci-result h2, .pt-res .ci-result h3 { font-size: 1.5rem; }
.pt-nome { font-size: 1.2rem; font-weight: 700; }
.pt-codigo { display: grid; gap: 6px; }
.pt-codigo label { font-weight: 650; font-size: 0.9375rem; }
.ci-input input { width: 0; min-width: 0; flex: 1 1 auto; }
.pt-codigo { grid-template-columns: minmax(0, 1fr); }
.pt-achados { display: grid; gap: 8px; }
.pt-achado { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.pt-pend { font-size: 0.72rem; font-weight: 650; color: var(--warn); }
.pt-lista-box { min-width: 0; }
.ci-result.ok { background: var(--ok-soft); color: #05543a; }
.ci-result.warn { background: var(--warn-soft); color: #5c2c04; }
.ci-result.bad { background: var(--danger-soft); color: #7d1810; }
.ci-result.info { background: #e5f0ff; color: #12366f; }

/* ajuda */
.ajuda-lista { display: grid; gap: 10px; max-width: 760px; }
.ajuda-item summary { cursor: pointer; padding: 16px 20px; font-weight: 650; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 52px; }
.ajuda-item summary::-webkit-details-marker { display: none; }
.ajuda-item summary::after { content: "+"; font-family: var(--display); font-size: 1.3rem; color: var(--muted); transition: transform 0.2s; }
.ajuda-item[open] summary::after { transform: rotate(45deg); }
.ajuda-resp { padding: 0 20px 18px; color: var(--ink); max-width: 66ch; line-height: 1.6; }
.ajuda-rodape { margin-top: 16px; }

.envios .var { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-deep); font-size: 0.85em; font-weight: 700; }

/* lista de presenca impressa da propria pagina (sem janela nova) */
.so-impressao { display: none; }
@media print {
  body.imprimindo > *:not(.so-impressao) { display: none !important; }
  body.imprimindo .so-impressao { display: block; font-family: system-ui, sans-serif; color: #111; }
  .so-impressao h1 { font-size: 20px; margin: 0 0 4px; }
  .so-impressao p { margin: 0 0 16px; color: #555; font-size: 13px; }
  .so-impressao table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .so-impressao th, .so-impressao td { border: 1px solid #bbb; padding: 7px 8px; text-align: left; }
  .so-impressao th { background: #f1f1f1; }
  .so-impressao td.box { width: 70px; }
  .so-impressao tr { break-inside: avoid; }
}
.fila-pagina .fila-topo h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; }
.portaria:not(.cheia) .pt-topo { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); flex-wrap: wrap; }
.portaria:not(.cheia) .pt-ev p { font-size: 0.9rem; font-weight: 500; opacity: 1; color: var(--muted); }
.pt-cheia { background: var(--brand); color: var(--on-brand); }
.pt-cheia:hover { background: var(--brand-deep); color: #fff; }
@media (max-width: 720px) { .tabs a { padding: 10px 12px; font-size: 0.925rem; } .tabs a .ic { display: none; } }
.pt-res.solto { position: static; }
.pt-res.solto:empty { display: none; }
.pt-codigo .help { color: var(--muted); font-size: 0.85rem; }

/* v2.3: so no celular / so no computador */
.so-celular { display: none !important; }
@media (max-width: 720px) {
  .so-pc { display: none !important; }
  .so-celular { display: flex !important; }
  /* topo do evento: so Compartilhar e Mais; a faixa de situacao fica curta */
  .ev-cabeca .actions .btn, .ev-cabeca .actions .menu-mais { flex: 1 1 0; }
  .ev-cabeca .actions .menu-mais > .btn { width: 100%; }
  .faixa-status .st-desc { display: none; }
  /* abas: todas visiveis, em duas linhas se precisar */
  .tabs { flex-wrap: wrap; overflow: visible; gap: 6px; border-bottom: 0; }
  .tabs a { padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: 999px; margin: 0; font-size: 0.9rem; }
  .tabs a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
  .tabs a.active .badge.cinza { background: rgba(255, 255, 255, 0.25); color: #fff; }
  /* filtros extras atras do botao Filtros */
  .toolbar .search { flex: 1 1 60%; }
  .filtros-extra { display: none; flex: 1 1 100%; gap: 10px; }
  .filtros-extra.aberto { display: flex; }
}
@media (min-width: 721px) { .filtros-extra { display: contents; } }

/* indice do editor (computador largo) */
.editor-com-indice { display: block; }
.ed-indice { display: none; }
@media (min-width: 1240px) {
  .editor-com-indice { display: grid; grid-template-columns: minmax(0, 920px) 190px; gap: 28px; align-items: start; }
  .ed-indice { display: grid; gap: 2px; position: sticky; top: 24px; order: 2; padding: 8px 0; }
  .ed-indice p { font-size: 0.78rem; font-weight: 650; color: var(--muted); padding: 0 12px 6px; }
  .ed-indice a { padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
  .ed-indice a:hover { background: var(--surface); }
}

/* "Abrir a ficha completa" na fila: area de toque maior sem mudar o texto */
#fila-ficha { padding: 8px 0; margin: -8px 0; }

/* editor de imagem (public/assets/imagem.js): enquadrar capa e logos antes de enviar */
body.ie-aberto { overflow: hidden; }
.ie-fundo { position: fixed; inset: 0; z-index: 80; background: rgba(36, 21, 22, 0.55); display: grid; place-items: center; padding: 16px; }
.ie-caixa { width: min(880px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.45); }
.ie-topo h2 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.ie-topo p { color: var(--muted); font-size: 0.92rem; margin-top: 4px; line-height: 1.45; }
.ie-palco { position: relative; height: min(56vh, 480px); height: min(56dvh, 480px); min-height: 220px; border-radius: var(--r); overflow: hidden; background: #1c1315; }
.ie-tela { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ie-tela.arrastando { cursor: grabbing; }
.ie-tela:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.ie-controles { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.ie-zoom { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; }
.ie-zoom input[type="range"] { flex: 1; min-width: 0; accent-color: var(--brand); height: 44px; }
.ie-pct { min-width: 4.2ch; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.9rem; }
.ie-botoes { display: flex; flex-wrap: wrap; gap: 6px; }
.ie-botoes .btn svg { width: 16px; height: 16px; }
.ie-botoes [aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }
.ie-aviso { margin: 0; font-size: 0.875rem; color: var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); padding: 10px 12px; }
.ie-aviso:empty { display: none; }
.ie-rodape { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.ie-saida { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.ie-acoes { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) {
  .ie-fundo { padding: 0; place-items: stretch; }
  .ie-caixa { max-height: 100vh; max-height: 100dvh; border-radius: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); align-content: start; }
  .ie-palco { height: min(48vh, 420px); height: min(48dvh, 420px); }
  .ie-acoes { width: 100%; }
  .ie-acoes .btn { flex: 1; }
}
.ed-sec h2 .opt { font-family: var(--body); font-weight: 500; font-size: 0.85rem; letter-spacing: 0; color: var(--muted); }

/* equipe: papel de cada pessoa */
.sel-papel { width: auto; min-height: 40px; padding: 6px 34px 6px 12px; font-size: 0.875rem; }
.acoes-equipe { align-items: center; flex-wrap: wrap; }
.chip.papel-principal { background: var(--brand-soft); color: var(--brand-deep); }
