/* Painel da equipe (esboço aprovado: docs/mockups/painel.html). Fundo claro para luz forte de evento. */
:root { --ink: #1d1d1f; --bg: #f4f5f7; --line: #e3e3e8; --muted: #77777c;
  --c-fila: #39B6FF; --c-chamado: #7ED956; --c-producao: #FF7405; --c-pronto: #9b5cf6; --c-entregue: #aaaaaa; }
body { background: var(--bg); color: var(--ink); min-height: 100vh; }

.topbar { background: #282828; color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 14px; position: sticky; top: 0; z-index: 5; }
.topbar img { height: 30px; width: 30px; border-radius: 7px; }
.topbar .ev { min-width: 0; line-height: 1.2; }
.topbar .ev b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .ev span { font-size: 12px; color: #aaa; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #ccc; }
.topbar a, .topbar button.link { color: #fff; background: none; border: 0; text-decoration: underline; padding: 0; font-size: 13px; }
.pill { border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; border: 0; white-space: nowrap; }
.pill.test { background: #FF7405; color: #fff; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; }
.tab { padding: 9px 13px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #555; background: #f0f0f3; border: 0; white-space: nowrap; }
.tab.on { background: var(--ink); color: #fff; }
.search { flex: 1 1 200px; border: 1px solid #d6d6db; border-radius: 10px; padding: 9px 12px; font-size: 15px; background: #fafafa; min-width: 160px; }
.b { border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 700; text-align: center; white-space: nowrap; border: 0; }
.b.dark { background: var(--ink); color: #fff; }
.b.line { border: 1px solid #ccc; color: #333; background: #fff; }
.b.warn { background: #fff4e0; color: #8a5300; border: 1px solid #f3d29a; }
.b[disabled] { opacity: .55; }

.banner { margin: 10px 14px 0; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.banner.paused { background: #fff4e0; color: #8a5300; border: 1px solid #f3d29a; }
.banner.alert { background: #ffe9e7; color: #b42318; border: 1px solid #f5c2bd; }
.banner.closed { background: #ffe9e7; color: #b42318; border: 1px solid #f5c2bd; }

.segs { display: none; gap: 6px; padding: 10px 14px 0; overflow-x: auto; }
.seg { flex: 0 0 auto; padding: 8px 11px; border-radius: 9px; font-size: 13px; font-weight: 700; background: #e9e9ee; color: #555; border: 0; }
.seg.on { background: var(--ink); color: #fff; }

.board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 12px; padding: 12px 14px 90px; align-items: start; }
.col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; color: #444; }
.col h4 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.col h4 .n { margin-left: auto; background: #e6e6ea; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.col .empty { font-size: 13px; color: #aaa; text-align: center; padding: 14px 0; }
.next { width: 100%; background: var(--c-fila); color: #fff; margin-bottom: 10px; padding: 13px; font-size: 15px; white-space: normal; height: auto; }

.tk { background: #fff; border-radius: 14px; padding: 10px 11px; margin-bottom: 9px; border: 1px solid #e6e6ea; border-left: 5px solid var(--c); position: relative; }
.tk.flash { box-shadow: 0 0 0 3px #39B6FF; }
.tk .r1 { display: flex; align-items: baseline; gap: 7px; }
.tk .sn { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tk .nm { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tk .tm { margin-left: auto; color: #999; font-size: 12px; white-space: nowrap; }
.tk .wa { font-size: 12px; margin: 4px 0 8px; color: #777; }
.tk .wa.ok { color: #138a43; } .tk .wa.fail { color: #d92d20; } .tk .wa.off { color: #aaa; }
.tk .tag { font-size: 11px; color: #666; background: #f0f0f3; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.tk .act { display: flex; gap: 6px; }
.tk .act .b { flex: 1; padding: 10px 8px; font-size: 14px; }
.tk .act .more { flex: 0 0 40px; border: 1px solid #ddd; background: #fff; color: #555; }
.tk.faded { opacity: .65; }
.menu { position: absolute; right: 8px; top: 100%; margin-top: -6px; background: #fff; border: 1px solid #ddd; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16); z-index: 4; min-width: 190px; overflow: hidden; }
.menu button { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: #fff; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.menu button:last-child { border-bottom: 0; }
.menu button.danger { color: #d92d20; }
.absent { border: 1px dashed #d0d0d5; border-radius: 12px; padding: 8px 10px; background: #fafafa; margin-top: 6px; }
.absent h5 { margin: 0 0 6px; font-size: 12px; color: #666; }

.results { margin: 10px 14px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.results button { display: flex; width: 100%; gap: 10px; align-items: baseline; padding: 11px 14px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; text-align: left; font-size: 15px; }
.results button b { font-size: 17px; }
.results button span.st { margin-left: auto; font-size: 12px; color: #666; }
.results .none { padding: 12px 14px; color: #888; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #1d1d1f; color: #fff; border-radius: 12px;
  padding: 12px 16px; font-size: 14px; max-width: min(92vw, 560px); z-index: 20; box-shadow: 0 8px 22px rgba(0,0,0,.25); }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 15; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: min(100%, 520px); max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px; }
@media (min-width: 640px) { .overlay { align-items: center; } .sheet { border-radius: 18px; } }
.sheet h3 { margin: 0 0 12px; }
.sheet input { width: 100%; border: 1px solid #ccc; border-radius: 10px; padding: 12px; font-size: 17px; margin-bottom: 12px; }
.sheet .big { font-size: 64px; font-weight: 800; text-align: center; margin: 6px 0; }
.sheet img.qr { display: block; width: 200px; height: 200px; margin: 8px auto; }
.sheet .row { display: flex; gap: 8px; margin-top: 8px; }
.sheet .row .b { flex: 1; }
.sheet .err { color: #d92d20; font-size: 14px; min-height: 1em; margin: 0 0 8px; }
.msg { border-bottom: 1px solid #eee; padding: 10px 0; font-size: 14px; }
.msg .meta { color: #666; font-size: 12px; margin-bottom: 4px; }
.msg .body { white-space: pre-wrap; word-break: break-word; }

@media (max-width: 799px) {
  .segs { display: flex; }
  .board { grid-template-columns: 1fr; }
  .board .col { display: none; }
  .board .col.on { display: block; }
  .tools .search { order: 5; flex-basis: 100%; }
}

/* Login */
.login { max-width: 420px; margin: 0 auto; padding: 28px 18px; }
.login .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login .brand img { height: 40px; width: 40px; border-radius: 9px; }
.login form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.login label { font-size: 14px; color: #555; display: flex; flex-direction: column; gap: 6px; }
.login input { border: 1px solid #ccc; border-radius: 10px; padding: 12px; font-size: 17px; }
.login .tabs { margin-bottom: 12px; }

/* Página do QR para imprimir */
.qrpage { max-width: 640px; margin: 0 auto; padding: 28px 18px; text-align: center; background: #fff; min-height: 100vh; }
.qrpage h1 { margin: 0; font-size: 30px; }
.qrpage h2 { margin: 4px 0 14px; font-size: 22px; color: #555; font-weight: 600; }
.qrpage .call { font-size: 26px; font-weight: 800; margin: 10px 0; }
.qrpage img.qr { width: min(80vw, 460px); height: auto; }
.qrpage .url { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: #555; word-break: break-all; }
.qrpage .row { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
@media print { .noprint { display: none !important; } .qrpage { padding-top: 40px; } }

/* Etapa 2: tentativas bloqueadas, justificativas */
details.blocked { margin: 10px 14px 0; background: #fff; border: 1px solid #e3e3e8; border-radius: 12px; padding: 10px 14px; }
details.blocked summary { font-weight: 700; font-size: 14px; cursor: pointer; }
details.blocked .brow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #eee; margin-top: 8px; font-size: 14px; }
details.blocked .brow .b { width: auto; padding: 8px 14px; }
.sheet .hint { color: #666; font-size: 13px; margin: -6px 0 12px; }
.sheet .reasons { margin-bottom: 12px; }
.sheet .opt { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; }
.sheet .opt input { width: auto; margin: 0; }
.sheet textarea { width: 100%; border: 1px solid #ccc; border-radius: 10px; padding: 10px; font-size: 16px; font-family: inherit; }
.sheet .lbl { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
