/* ============================================================
   Moura One — sistema de design
   Identidade da marca (Plataforma de Operações e Eventos)
   Azul Profundo #0E1B3D · Azul Institucional #152C6B · Turquesa #00C2B8
   Neutras: Carvão #1A1F2B · Slate #475569/#64748B/#94A3B8
   Cinza Claro #E2E8F0 · Extra Claro #F1F5F9 · Branco #FFFFFF
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --navy: #152C6B;          /* Azul Institucional — títulos, links, ações */
  --navy-deep: #0E1B3D;     /* Azul Profundo — fundos */
  --ink: #0A1228;           /* Base near-black para profundidade da sidebar */
  --cyan: #00C2B8;          /* Turquesa — sinal "ao vivo / requer atenção" */
  --cyan-soft: #e0f7f5;
  --off-white: #F4F6FA;     /* Canvas — cinza frio limpo */
  --gray: #E2E8F0;          /* Cinza Claro */
  --gray-soft: #eef2f7;
  --charcoal: #16203A;      /* Tinta com leve viés navy (texto) */
  --muted: #64748B;         /* Slate (texto secundário) */
  --ok: #00C2B8;
  --danger: #EF4444;        /* Status Crítico */
  --warn: #F59E0B;          /* Status Alto */
  --success: #22C55E;       /* Status Concluído */
  --info: #3B82F6;          /* Status Planejamento */
  --purple: #8B5CF6;        /* Status Produção */
  --white: #fff;
  /* Gradientes da marca */
  --grad-principal: linear-gradient(135deg, #0E1B3D 0%, #152C6B 100%);
  --grad-destaque:  linear-gradient(135deg, #152C6B 0%, #00C2B8 100%);
  --grad-suave:     linear-gradient(135deg, #00C2B8 0%, #66E2D6 100%);
  --radius: 16px;
  --radius-sm: 10px;
  /* Elevação em camadas — sombras suaves com viés navy */
  --shadow-xs: 0 1px 2px rgba(11,21,48,.05);
  --shadow: 0 1px 3px rgba(11,21,48,.06), 0 8px 22px -10px rgba(11,21,48,.16);
  --shadow-lg: 0 18px 48px -12px rgba(11,21,48,.26);
  --ring: 0 0 0 3px rgba(0,194,184,.20);   /* foco — turquesa da marca */
  --display: 'Space Grotesk', system-ui, sans-serif;
  --display-soft: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  /* Numerais tabulares — alinhamento de dados (métricas, tabelas, valores) */
  --tnum: 'tnum' 1, 'lnum' 1;
}

* { box-sizing: border-box; }
/* Bloqueia rolagem horizontal em todos os dispositivos.
   - overflow-x:hidden → fallback para Safari iOS antigo.
   - overflow-x:clip   → browsers modernos: corta sem criar scroll-container,
     mantendo position:sticky 100% funcional.
   - body: max-width:100vw garante que o body nunca seja mais largo que a tela,
     fechando a brecha do Safari iOS que ignorava o clip/hidden no <html> sozinho. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
/* Comporta como app nativo: sem zoom por toque-duplo (o viewport já bloqueia pinça/+/-). */
html, body { touch-action: manipulation; }
body {
  margin: 0;
  max-width: 100vw;
  font-family: var(--body);
  color: var(--charcoal);
  background: var(--off-white);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.018em; margin: 0; }
a { color: var(--navy); }
img { max-width: 100%; display: block; }

.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
/* Numerais tabulares — para dados que precisam alinhar (métricas, valores, datas) */
.tnum, .stat .n, .ov-stat-val, table td, .bar-val, .cc-count { font-variant-numeric: tabular-nums; font-feature-settings: var(--tnum); }

/* ---- Botões ---- */
.btn {
  font-family: var(--body); font-weight: 600; font-size: 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 18px; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease, filter .14s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 1px 2px rgba(11,21,48,.18); }
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(14,27,61,.5); }
.btn-primary:active { transform: translateY(0); }
.btn-accent { background: var(--cyan); color: var(--navy-deep); box-shadow: 0 1px 2px rgba(0,194,184,.30); }
.btn-accent:hover { filter: brightness(.97); transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(0,194,184,.5); }
.btn-accent:active { transform: translateY(0); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--gray); }
.btn-ghost:hover { border-color: var(--navy); background: var(--off-white); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--gray); }
.btn-danger:hover { border-color: var(--danger); background: #fdf2f2; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Campos ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--charcoal); }
.field .req { color: var(--cyan); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%; font-family: var(--body); font-size: 15px; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--gray); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 72px; }
input[type=file] { width: 100%; max-width: 100%; font-size: 13px; }
.field { min-width: 0; }
input:hover, textarea:hover, select:hover { border-color: #cbd5e1; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--cyan); box-shadow: var(--ring);
}
::placeholder { color: #9aa7ba; }
.pw-wrap { position: relative; }
.pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 40px; }
.pw-toggle { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 38px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; font-size: 15px; color: var(--muted, #9aa7ba); padding: 0; transition: color .15s; }
.pw-toggle:hover { color: var(--navy); }

/* ---- Cartões / superfícies ---- */
.card {
  background: var(--white); border: 1px solid var(--gray-soft);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}

/* ---- Pílulas de status ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 100px; letter-spacing: .005em; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok { color: #0a8f88; background: var(--cyan-soft); }
.pill-no { color: var(--danger); background: #fdecec; }
.pill-active { color: #0a8f88; background: var(--cyan-soft); }
.pill-inactive { color: var(--muted); background: var(--gray-soft); }
/* Pulso "ao vivo" — reservado para um único momento de assinatura (tela de acesso) */
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,194,184,.5); } 50% { box-shadow: 0 0 0 5px rgba(0,194,184,0); } }

/* ============================================================
   ADMIN — layout com barra lateral
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
#shell { position: sticky; top: 0; height: 100vh; }
.sidebar { background: var(--navy-deep); color: #cdd6ec; padding: 26px 18px; display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  background-image: radial-gradient(120% 60% at 0% 100%, rgba(0,194,184,.16) 0%, rgba(0,194,184,0) 60%); }
.sidebar .brand { padding: 4px 6px 14px; margin-bottom: 14px; flex: none; }

/* ---- Wordmark "moura expositor" ---- */
.logo-mo { font-family: var(--display-soft); font-weight: 800; font-size: 28px; line-height: 1;
  letter-spacing: -.02em; display: inline-flex; align-items: center; }
/* Na sidebar (desktop): largura fixa para a imagem horizontal preencher o espaço disponível. */
.sidebar .logo-mo img.logo-img { width: 162px; height: auto; display: block; flex: none; object-fit: contain; }
/* Na topbar (mobile): controla pela altura para caber na barra estreita. */
.logo-mo img.logo-img { height: 1em; width: auto; display: block; flex: none; object-fit: contain; }
.sidebar .logo-mo { font-size: 28px; }
.logo-mo .lm { color: #fff; }
.logo-mo .lo { color: var(--cyan); position: relative; margin-left: .14em; }
.logo-mo .lo::before { content: ''; position: absolute; top: -.30em; left: .04em; width: .26em; height: .26em;
  border-radius: 50% 50% 50% 0; transform: rotate(45deg); background: var(--cyan); }
.logo-tag { font-family: var(--body); font-size: 10.5px; color: #8aa0c7; letter-spacing: .01em; margin-top: 7px; }
/* Variante clara (sobre fundo branco) */
.logo-mo.on-light .lm { color: var(--navy-deep); }
.logo-mo.on-light + .logo-tag, .logo-tag.on-light { color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.sidebar nav a { position: relative; color: #cdd6ec; text-decoration: none; padding: 10px 12px; border-radius: 8px;
  font-weight: 500; font-size: 14px; transition: .12s; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { color: #fff; font-weight: 600;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(21,44,107,.55) 100%); }
.sidebar nav a.active::after { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--cyan); box-shadow: 0 0 10px rgba(0,194,184,.7); }
.sidebar .spacer { display: none; }
.side-foot { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.side-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); color: var(--navy-deep);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.side-user-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.side-user-name { color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-role { color: #9fb0d6; font-size: 11.5px; }
.side-version { color: #7e90bb; font-size: 11px; margin-top: 10px; }
.sidebar .logout { color: #9fb0d6; font-size: 13px; background: none; border: none; cursor: pointer;
  text-align: left; padding: 10px 12px; }
.sidebar .logout:hover { color: #fff; }

.main { padding: 32px 40px; max-width: 1180px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em;
  font-size: 11px; font-weight: 600; color: var(--cyan); margin-bottom: 6px; }

/* Cartões de métrica do dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat {
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  padding: 18px; position: relative; overflow: hidden;
}
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy); }
.stat.accent::before { background: var(--cyan); }
/* Cores com significado nas métricas */
.stat.tone-navy::before { background: var(--navy); }
.stat.tone-cyan::before { background: var(--cyan); }
.stat.tone-green::before { background: #2bb673; }
.stat.tone-red::before { background: var(--danger); }
.stat.tone-amber::before { background: #e6a700; }
.stat.tone-green .n { color: #1f9d63; }
.stat.tone-red .n { color: var(--danger); }
.stat.tone-amber .n { color: #b07f00; }
.stat.tone-cyan .n { color: #1597a1; }
.stat.tone-gray::before { background: var(--gray); }
.stat.tone-gray .n { color: var(--muted); }
/* Hierarquia + ícone + tooltip */
.stat .stat-top { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.stat .stat-ico { display: inline-flex; color: var(--muted); opacity: .85; }
.stat.tone-green .stat-ico { color: #1f9d63; }
.stat.tone-red .stat-ico { color: var(--danger); }
.stat.tone-amber .stat-ico { color: #b07f00; }
.stat.tone-navy .stat-ico, .stat.tone-cyan .stat-ico { color: var(--navy); }
.stat .n { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat .l { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; background: var(--gray-soft); color: var(--muted); font-size: 10px; font-weight: 700;
  font-style: normal; cursor: help; font-family: var(--body); }
.info-i:hover { background: var(--navy); color: #fff; }
.stat .n { font-family: var(--display); font-size: 32px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* Tabela */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-soft); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; font-family: var(--display); font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--gray); white-space: nowrap; }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--gray-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--off-white); }
.row-name { font-weight: 600; }

/* Barra de ferramentas (filtros/busca) */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.toolbar .search { flex: 1; min-width: 200px; }
.seg { display: inline-flex; background: var(--white); border: 1px solid var(--gray); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: none; background: none; padding: 9px 14px; font-family: var(--body); font-weight: 600;
  font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--navy); color: #fff; }

/* Lista de eventos */
.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card { background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.event-card .cover { height: 130px; background: var(--navy) center/cover no-repeat; position: relative; }
.event-card .cover .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-family: var(--display); font-size: 13px; letter-spacing: .1em; }
.event-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.event-card h3 { font-size: 17px; }
.event-card .meta { font-size: 13px; color: var(--muted); }
.event-card .nums { display: flex; gap: 14px; font-size: 13px; margin-top: 4px; }
.event-card .nums b { font-family: var(--display); }

/* Modal QR */
.modal-bg { position: fixed; inset: 0; background: rgba(33,52,95,.5); display: flex; align-items: center;
  justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--white); border-radius: var(--radius); padding: 26px; max-width: 360px; width: 100%; text-align: center; }
.modal img { margin: 16px auto; width: 220px; height: 220px; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--charcoal);
  color: #fff; padding: 13px 20px; border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow-lg);
  z-index: 100; opacity: 0; transition: .25s; }
.toast.show { opacity: 1; }

/* Aviso de sessão expirando */
.session-warn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: min(720px, calc(100vw - 24px));
  background: #92400e; color: #fff; padding: 12px 16px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 120; font-size: 13.5px; line-height: 1.4; }
.session-warn-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.session-warn .btn { background: #fff; color: #92400e; border-color: #fff; }
.session-warn-x { background: transparent; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: .8; line-height: 1; }
.session-warn-x:hover { opacity: 1; }
@media (max-width: 767px) { .session-warn { flex-direction: column; align-items: stretch; text-align: center; } }

/* Progresso de upload de arquivos */
.upload-progress { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--gray-soft); border-radius: 8px; background: #f8fafc; }
.upload-bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.upload-bar-fill { height: 100%; background: var(--cyan); width: 0; transition: width .15s ease; }

/* Auditoria */
.audit-line { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--gray); }
.audit-line:last-child { border: none; }
.audit-line .d { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-aside { background: var(--grad-principal); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside .logo { background: #fff; border-radius: 12px; padding: 18px 22px; width: max-content; max-width: 260px; }
.login-aside h2 { font-size: 30px; line-height: 1.2; margin-top: 40px; max-width: 380px; }
.login-aside p { color: #b9c4de; max-width: 360px; }
.login-aside .accent-rule { width: 60px; height: 4px; background: var(--cyan); margin-bottom: 22px; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form { width: 100%; max-width: 340px; }
.login-form h1 { font-size: 22px; margin-bottom: 4px; }
.login-form .sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.error-msg { background: #f7ebe7; color: var(--danger); padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px; }

/* ============================================================
   PÁGINA PÚBLICA (RSVP)
   ============================================================ */
.rsvp-page { min-height: 100vh; padding: 10px 0 50px; }
.rsvp-page h1, .rsvp-page h2, .rsvp-page h3, .rsvp-page .choice-q, .rsvp-page .eyebrow {
  font-family: var(--display-soft); letter-spacing: -0.02em;
}
.rsvp-page h1 { font-weight: 700; }
.rsvp-topbar { background: var(--navy); padding: 14px 20px; display: flex; justify-content: center; }
.rsvp-topbar img { height: 34px; filter: brightness(0) invert(1); }
.rsvp-wrap { max-width: 540px; margin: 0 auto; padding: 0 18px; }
.rsvp-cover { margin-top: 22px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 16/7; background: var(--navy) center/cover no-repeat; }
.rsvp-card { background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; margin-top: 20px; }
.rsvp-card .client-logo { height: 40px; width: auto; margin-bottom: 14px; }
.rsvp-card .eyebrow { color: var(--cyan); }
.rsvp-card h1 { font-size: 25px; line-height: 1.18; margin-bottom: 14px; }
.event-meta { display: grid; gap: 10px; margin: 18px 0 6px; }
.event-meta .m { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.event-meta .m svg { flex: none; margin-top: 1px; color: var(--navy); }
.event-desc { color: var(--charcoal); font-size: 14.5px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--gray-soft); white-space: pre-line; }

.divider { height: 1px; background: var(--gray-soft); margin: 24px 0; }

/* Escolha de presença */
.choice-q { font-family: var(--display); font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--gray); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: .12s; font-weight: 500; }
.choice:hover { border-color: var(--navy); }
.choice input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.choice.sel-yes { border-color: var(--cyan); background: var(--cyan-soft); }
.choice.sel-no { border-color: var(--danger); background: #f7ebe7; }

/* Estado de resposta enviada */
.result { text-align: center; padding: 14px 0; }
.result .badge { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: flex;
  align-items: center; justify-content: center; }
.result .badge.ok { background: var(--cyan-soft); color: #0f8a93; }
.result .badge.no { background: #f7ebe7; color: var(--danger); }
.result h2 { font-size: 22px; margin-bottom: 8px; }
.result p { color: var(--muted); }
.result .note { margin-top: 16px; font-size: 13px; background: var(--off-white); border-radius: var(--radius-sm); padding: 12px; }

.closed-box { text-align: center; padding: 36px 20px; }
.closed-box h2 { font-size: 22px; margin-bottom: 8px; }

.rsvp-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; }

/* ============================================================
   RESPONSIVO — abordagem mobile-first
   Desktop 1200px+ · Tablet 768–1199px · Mobile ≤767px
   ============================================================ */

/* Topbar mobile (oculta no desktop) */
.topbar { display: none; }
.hamburger { display: none; }
.sidebar-overlay { display: none; }

/* ---- TABLET: 768–1199px ---- */
@media (max-width: 1199px) {
  .admin-shell { grid-template-columns: 210px 1fr; }
  .main { padding: 28px 26px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ---- MOBILE: ≤767px ---- */
@media (max-width: 767px) {
  /* Estrutura: conteúdo ocupa 100% da largura */
  .admin-shell { display: block; min-height: 100vh; }

  /* Barra superior fixa com hambúrguer */
  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 40;
    background: var(--navy); padding: 10px 14px;
  }
  .topbar-logo { height: 26px; width: auto; }
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: none; background: rgba(255,255,255,.12);
    border-radius: 10px; cursor: pointer; flex: none;
  }
  .hamburger span { display: block; width: 20px; height: 2px; background: #fff; position: relative; }
  .hamburger span::before, .hamburger span::after {
    content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
  }
  .hamburger span::before { top: -6px; }
  .hamburger span::after { top: 6px; }

  /* Sidebar vira gaveta deslizante */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78%; max-width: 300px;
    z-index: 60; transform: translateX(-100%); transition: transform .25s ease;
    padding: 22px 18px; flex-direction: column;
  }
  .sidebar.open { transform: translateX(0); }
  /* A topbar já mostra o logotipo no mobile — esconde o da gaveta p/ não duplicar */
  .sidebar .brand { display: none; }
  .sidebar nav { flex-direction: column; }
  .sidebar nav a { padding: 14px 14px; font-size: 15px; } /* alvo de toque */
  .sidebar .spacer { display: none; }
  .sidebar .logout { padding: 14px; font-size: 15px; }
  .sidebar-overlay {
    display: block; position: fixed; inset: 0; background: rgba(33,52,95,.5);
    z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }

  .main { padding: 18px 14px; max-width: 100%; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 21px; }
  .page-head .btn { padding: 12px 14px; }

  /* Dashboard: 2 cards por linha */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat { padding: 14px; }
  .stat .n { font-size: 26px; }

  /* Formulários: tudo empilhado, 100% de largura (inclui modais) */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Barra de ferramentas empilha */
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; }
  .toolbar .search { width: 100%; min-width: 0; }

  /* Botões: área de toque mínima 44px e espaçamento */
  .btn { min-height: 44px; }
  /* Botões pequenos (inclusive os de ícone único "×", "👁") garantem 40px nos
     dois eixos para não virar alvo de toque minúsculo ao lado de ações destrutivas. */
  .btn-sm { min-height: 40px; min-width: 40px; }

  /* Tabelas viram cards */
  .table-wrap, .card[style*="padding:0"], .card.table-card { overflow: visible; border: none; background: transparent; }
  table.cards, table.cards thead, table.cards tbody, table.cards th, table.cards td, table.cards tr { display: block; }
  table.cards thead { display: none; }
  table.cards tbody tr {
    background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px;
  }
  table.cards tbody tr:hover { background: var(--white); }
  table.cards tbody td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 7px 0; border: none; text-align: right;
  }
  table.cards tbody td::before {
    content: attr(data-label); font-weight: 600; font-size: 12px; color: var(--muted);
    text-align: left; flex: none; font-family: var(--body); text-transform: none; letter-spacing: 0;
  }
  table.cards tbody td.row-name { font-size: 17px; padding-bottom: 10px; margin-bottom: 4px;
    border-bottom: 1px solid var(--gray-soft); justify-content: flex-start; }
  table.cards tbody td.row-name::before { display: none; }
  table.cards tbody td.cell-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; justify-content: flex-start; }
  table.cards tbody td.cell-actions::before { display: none; }
  table.cards tbody td.cell-actions .btn { flex: 1; min-width: 90px; }

  /* Links longos não estouram */
  .break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

  /* Página pública: usar quase toda a largura */
  .rsvp-wrap { padding: 0 12px; }
  .rsvp-card { padding: 20px 16px; }
  .rsvp-card h1 { font-size: 22px; }
  .modal { padding: 20px 16px; }

  /* Login mobile: aside vira cabeçalho compacto em vez de sumir */
  .login-page { display: flex; flex-direction: column; }
  .login-aside {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 24px 26px; text-align: center; min-height: auto;
  }
  .login-aside .logo-mo { font-size: 0; }
  .login-aside .logo-img { height: 26px; width: auto; filter: brightness(0) invert(1); }
  .login-aside .accent-rule { margin: 16px auto 0; }
  .login-aside h2 { font-size: 17px; margin-top: 12px; line-height: 1.3; max-width: 100%; }
  .login-aside > div > p { font-size: 12px; margin-top: 6px; line-height: 1.5; }
  .login-aside > p:last-child { font-size: 11px; opacity: .6; margin-top: 10px; }
  .login-form-wrap { padding: 32px 20px; min-height: auto; background: #f4f6fa; flex: 1; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Botão WhatsApp (página pública) ---- */
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 13px 18px;
  background: #25D366; color: #08361a; font-weight: 700; font-size: 15px;
  border-radius: 12px; text-decoration: none; border: none;
  transition: background .15s ease;
}
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-whatsapp svg { flex-shrink: 0; }

/* ---- Seletor de presença no modal de edição (admin) ---- */
.edit-presence { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-presence .ep {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; border: 1.5px solid var(--gray); border-radius: 10px;
  cursor: pointer; font-weight: 600; font-size: 14px; margin: 0; color: var(--charcoal);
}
.edit-presence .ep input { display: none; }
.edit-presence .ep.on { border-color: var(--cyan); background: rgba(43,194,206,.12); color: var(--navy-deep); }

/* ---- Gestão de usuários ---- */
.pill-warn { color: #8a5a00; background: #fbf0d8; }
.pending-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-soft);
}
.pending-row:last-child { border-bottom: none; }
.ok-box {
  background: var(--cyan-soft); color: #0f6e6f; border-radius: 10px;
  padding: 14px 16px; font-size: 14px; line-height: 1.5;
}

/* ---- Visualizador de senha ---- */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 44px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 8px;
}
.pwd-eye:hover { color: var(--navy); background: var(--off-white); }

/* ---- Botões de presença interativos (Confirmado / Recusado) ---- */
.edit-presence .ep.ep-yes:hover { border-color: var(--cyan); background: rgba(43,194,206,.10); }
.edit-presence .ep.ep-no:hover { border-color: var(--danger); background: #faece8; }
.edit-presence .ep.ep-yes.on { border-color: var(--ok); background: rgba(43,194,206,.16); color: var(--navy-deep); }
.edit-presence .ep.ep-no.on { border-color: var(--danger); background: #f7ebe7; color: var(--danger); }

/* ---- Indicador de prazo ---- */
.deadline-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 100px; }
.deadline-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.deadline-green { color: #0f8a4a; background: #e6f6ec; }
.deadline-amber { color: #8a5a00; background: #fbf0d8; }
.deadline-red { color: var(--danger); background: #f7ebe7; }

/* ---- Resumo rápido do evento ---- */
.quick-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px 22px; }
.quick-summary .qs { display: flex; flex-direction: column; gap: 2px; }
.quick-summary .qs .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.quick-summary .qs .v { font-size: 15px; font-weight: 600; color: var(--charcoal); }

/* ---- Estado vazio ---- */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .ico { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { color: var(--charcoal); margin-bottom: 6px; }

/* ---- Rodapé da página pública ---- */
.rsvp-footer .footer-logo { height: 30px; width: auto; margin: 0 auto 10px; }
.rsvp-footer .footer-title { font-weight: 700; color: var(--navy); font-size: 14px; }

/* ---- Linha do tempo do evento ---- */
.tl-day { font-family:var(--display); font-weight:600; font-size:13px; color:var(--navy); margin:18px 0 8px; }
.tl-item { display:flex; gap:12px; padding:8px 0; position:relative; }
.tl-ico { width:30px; height:30px; border-radius:50%; background:var(--off-white); display:flex; align-items:center;
  justify-content:center; flex:none; font-size:15px; }
.tl-body { flex:1; min-width:0; }
.tl-text { font-size:14px; }
.tl-time { font-size:12px; color:var(--muted); margin-top:1px; }

/* ---- Barra de formatação básica (diário/comentários) ---- */
.fmt-bar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.fmt-btn { border:1px solid var(--gray); background:var(--white); border-radius:6px; min-width:30px; height:28px;
  padding:0 8px; cursor:pointer; font-size:13px; color:var(--navy); }
.fmt-btn:hover { background:var(--off-white); border-color:var(--navy); }
.fmt-hint { font-size:11.5px; color:var(--muted); }
.rich em { font-style:italic; } .rich strong { font-weight:700; }
.rich ul { margin:4px 0; padding-left:20px; }

/* ---- Botão estilo link (comentários, diário) ---- */
.btn-link-sm { background:none; border:none; padding:0; font:inherit; font-size:12.5px; font-weight:600;
  color:var(--navy); cursor:pointer; }
.btn-link-sm:hover { text-decoration:underline; }

/* ---- Imagem de capa do evento ---- */
.cover-area { border-radius:var(--radius); overflow:hidden; }
.cover-area img { width:100%; max-height:240px; object-fit:cover; display:block; }
.cover-empty { border:2px dashed var(--gray); border-radius:var(--radius); padding:22px; text-align:center;
  color:var(--muted); cursor:pointer; transition:.15s; background:var(--off-white); }
.cover-empty:hover { border-color:var(--cyan); background:var(--cyan-soft); }
.cover-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }

/* ---- Busca global (dashboard) ---- */
.search-global { position: relative; margin-bottom: 24px; }
.search-global input { width: 100%; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 60vh; overflow-y: auto; padding: 6px;
}
.sr-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 700; padding: 10px 10px 4px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  text-decoration: none; color: var(--charcoal); }
.sr-item:hover { background: var(--off-white); }
.sr-item .sr-ico { flex: none; }
.sr-item strong { display: block; font-size: 14px; font-weight: 600; }
.sr-sub { display: block; font-size: 12px; color: var(--muted); }
.sr-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* Busca global na sidebar (visível em todas as páginas) */
.side-search { padding: 0 6px 16px; }
.side-search input {
  width: 100%; padding: 9px 12px; border-radius: 9px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff;
}
.side-search input::placeholder { color: rgba(255,255,255,.55); }
.side-search input:focus { outline: none; border-color: var(--cyan); background: rgba(255,255,255,.12); }

/* ---- Ações no card de evento ---- */
.event-card-actions { padding: 0 16px 14px; display: flex; gap: 8px; }
.event-card-actions .btn { flex: 1; }

/* ---- Toast "Desfazer" ---- */
.undo-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--charcoal); color: #fff; padding: 12px 14px 12px 18px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-lg); z-index: 120;
  opacity: 0; transition: .25s; font-size: 14px; }
.undo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.undo-toast button { background: none; border: none; color: var(--cyan); font-weight: 700; cursor: pointer; font-size: 14px; }

/* ---- Botão atualizar (flecha girando) ---- */
.btn-refresh { padding: 8px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.btn-refresh svg { transition: transform .2s; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.btn-refresh.spinning svg { animation: spin360 .7s linear infinite; }

/* ---- Ações em ícones (tabela de participantes) ---- */
.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-soft); background: var(--white); color: var(--navy); border-radius: 9px;
  cursor: pointer; transition: .15s; padding: 0; }
.icon-btn:hover { background: var(--off-white); border-color: var(--navy); }
.icon-btn.icon-wa { color: #1a8f4c; border-color: #bfe6cd; text-decoration: none; }
.icon-btn.icon-wa:hover { background: #e8f7ee; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.participants-table .p-name { font-weight: 600; font-size: 15px; color: var(--charcoal); }
.participants-table .p-sub { font-size: 12.5px; margin-top: 2px; }
.participants-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0 12px; }
.export-group { display: inline-flex; align-items: center; gap: 6px; }
.qs-link { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-soft); }

@media (max-width: 767px) {
  .participants-table tbody td.cell-actions { justify-content: flex-start; }
  .export-group { width: 100%; justify-content: space-between; }
  .export-group .btn { flex: 1; }
}

/* ---- Última atualização (junto ao botão atualizar) ---- */
.refresh-wrap { display: inline-flex; align-items: center; gap: 8px; }
.refresh-stamp { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---- Seleção múltipla ---- */
.col-check { width: 38px; text-align: center; }
.col-check input { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.bulk-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); margin: 0 0 12px; }
.bulk-bar .bulk-count { font-size: 14px; }
.bulk-bar .bulk-count strong { font-size: 16px; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 767px) {
  .col-check { width: 30px; }
  .bulk-bar { gap: 10px; }
  .bulk-actions { width: 100%; }
  .bulk-actions .btn { flex: 1; }
}

/* ============================================================
   AJUSTES (revisão 2.1)
   ============================================================ */

/* ---- Barra de ações em massa: fundo claro e botões legíveis ---- */
.bulk-bar { background: var(--white); color: var(--charcoal); border: 1px solid var(--gray);
  box-shadow: var(--shadow); }
.bulk-bar .bulk-count { color: var(--navy); }
.bulk-bar .bulk-count strong { color: var(--navy-deep); }
.bulk-confirm { background: #1f9d63; color: #fff; border-color: #1f9d63; }
.bulk-confirm:hover { background: #1a8a56; }
.bulk-decline { background: #fff; color: var(--danger); border-color: var(--danger); }
.bulk-decline:hover { background: #faece8; }
.bulk-delete { background: var(--danger); color: #fff; border-color: var(--danger); }
.bulk-delete:hover { filter: brightness(.95); }

/* ---- Abas de eventos (dashboard) ---- */
.event-tabs { margin-bottom: 18px; max-width: 100%; flex-wrap: wrap; }
.event-tabs button { white-space: nowrap; }

/* ---- Construtor de campos do formulário (event-form) ---- */
.fb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-soft); }
.fb-move { display: flex; flex-direction: column; gap: 2px; }
.fb-arrow { width: 26px; height: 20px; line-height: 1; border: 1px solid var(--gray); background: var(--white);
  color: var(--navy); border-radius: 6px; cursor: pointer; font-size: 12px; padding: 0; }
.fb-arrow:hover:not(:disabled) { border-color: var(--navy); background: var(--off-white); }
.fb-arrow:disabled { opacity: .35; cursor: not-allowed; }
.fb-enable input, .fb-req input { width: 18px; height: 18px; accent-color: var(--navy); cursor: pointer; }
.fb-label { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.fb-label input { flex: 1; min-width: 0; }
.fb-tag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); background: var(--gray-soft); padding: 2px 7px; border-radius: 100px; white-space: nowrap; }
.fb-tag-custom { color: #0f8a93; background: var(--cyan-soft); }
.fb-req { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted);
  cursor: pointer; white-space: nowrap; }
.fb-del { width: 30px; height: 30px; border: 1px solid var(--gray); background: var(--white); color: var(--danger);
  border-radius: 8px; cursor: pointer; font-size: 13px; flex: none; }
.fb-del:hover:not(:disabled) { border-color: var(--danger); background: #faece8; }
.fb-del:disabled { opacity: .3; cursor: not-allowed; }

@media (max-width: 767px) {
  .fb-row { flex-wrap: wrap; gap: 8px; }
  .fb-label { order: -1; flex-basis: 100%; }
  .fb-req span { display: inline; }
}

/* ---- Detalhe de atividade clicável ---- */
.act-detail-btn { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--navy);
  text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.act-detail-btn:hover { text-decoration: underline; }
.act-detail-btn .act-more { font-size: 11px; font-weight: 600; color: var(--cyan); text-transform: uppercase;
  letter-spacing: .04em; margin-left: 4px; }
.act-detail-btn .act-more::before { content: '· '; color: var(--muted); }
#modalSlot .audit-line { display: flex; gap: 12px; }
#modalSlot .audit-line .d { min-width: 96px; flex: none; }

/* ---- Mobile: cartões de participante mais legíveis ---- */
@media (max-width: 767px) {
  /* Nome alinhado à esquerda (estava herdando text-align:right do cartão) */
  table.cards tbody td.row-name { text-align: left; }
  .participants-table .p-name, .participants-table .p-sub { text-align: left; }
  /* Checkbox de seleção com rótulo claro */
  .participants-table tbody td.col-check { justify-content: flex-start; gap: 8px; }
  .participants-table tbody td.col-check::before { content: 'Selecionar'; display: inline; }
  /* Botões de ação ocupam a linha de forma equilibrada */
  .participants-table tbody td.cell-actions .icon-btn { flex: 0 0 auto; }
}

/* ---- Selo de notificação (solicitações de acesso pendentes) ---- */
.sidebar nav a { position: relative; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 8px; border-radius: 100px;
  background: #f97316; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  vertical-align: middle; }
.nav-badge.hidden { display: none; }

/* Ícone SVG inline (biblioteca icons.js) alinhado ao texto de botões/títulos. */
.ic { display: inline-flex; align-items: center; justify-content: center; vertical-align: -.16em; }
.ic svg { width: 1.05em; height: 1.05em; }

/* ---- Botão "Minha conta" na barra lateral ---- */
.side-account { display: block; width: 100%; margin-bottom: 8px; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.22); background: transparent; color: rgba(255,255,255,.85);
  border-radius: 8px; font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: center; text-decoration: none;
  transition: background .15s, border-color .15s; }
.side-account:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); color: #fff; }

/* ---- Matriz de acesso por evento (gestão de usuários) ---- */
.access-modal { max-width: 760px; width: 96vw; text-align: left; }
.access-table-wrap { max-height: 52vh; overflow: auto; border: 1px solid var(--gray-soft); border-radius: 10px; }
.access-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.access-table th, .access-table td { padding: 8px 6px; border-bottom: 1px solid var(--gray-soft); text-align: center; }
.access-table thead th { position: sticky; top: 0; background: var(--gray-soft); color: var(--navy);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; z-index: 1; }
.access-table th.ac-name, .access-table td.ac-name { text-align: left; min-width: 180px; }
.access-table .ac-cell input { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.access-table tr.ac-off td.ac-name { opacity: .55; }
.access-table tr.ac-off .ac-cell input:disabled { opacity: .3; cursor: not-allowed; }

@media (max-width: 600px) {
  .access-table { font-size: 12px; }
  .access-table th, .access-table td { padding: 6px 3px; }
  .access-table th.ac-name, .access-table td.ac-name { min-width: 120px; }
}

/* ---- Resumo da seleção em massa (revisão 2.2) ---- */
.bulk-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bulk-breakdown { font-size: 12.5px; color: var(--muted); }
.bulk-selectall { background: none; border: none; padding: 0; font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--navy); text-decoration: underline; cursor: pointer; }
.bulk-selectall:hover { color: var(--navy-deep); }

/* ---- Construtor de campos: arrastar, tipo e opções (revisão 2.2) ---- */
.fb-row { flex-wrap: wrap; }
.fb-drag { cursor: grab; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; user-select: none; flex: none; align-self: center; }
.fb-row.fb-dragging { opacity: .5; }
.fb-row.fb-over { box-shadow: inset 0 2px 0 var(--cyan); }
.fb-type { flex: none; max-width: 220px; font-size: 13px; padding: 7px 9px; }
.fb-options { flex-basis: 100%; margin-top: 8px; padding-left: 30px; }
.fb-options label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.fb-options textarea { min-height: 56px; font-size: 13px; }

/* ---- Grupos de opção (rádio/checkbox) no formulário público e nos modais ---- */
.opt-group { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 9px; font-weight: 400; font-size: 14.5px; cursor: pointer; margin: 0; }
.opt input { width: 17px; height: 17px; accent-color: var(--navy); flex: none; }

/* ---- Observação interna na lista de participantes ---- */
.p-note { font-size: 12.5px; color: #8a6d00; background: #fdf6e3; border-radius: 6px;
  padding: 3px 8px; margin-top: 4px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

/* ---- Sino de notificações ----
   IMPORTANTE: a .topbar é só mobile (display:none no desktop, definido acima).
   NÃO forçar display:flex aqui sem media query — isso fazia a topbar (com logo)
   aparecer no desktop e duplicar o logotipo da sidebar. */
.notif-bell { margin-left: auto; position: relative; background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px; border-radius: 9px; color: var(--navy);
  transition: background .15s; }
.notif-bell:hover { background: var(--off-white); }
.notif-bell-icon { width: 20px; height: 20px; display: block; flex: none; }
/* Animação de balanço quando há notificações não lidas */
@keyframes bellRing {
  0%, 15%, 100% { transform: rotate(0deg); }
  3%  { transform: rotate(16deg); }
  6%  { transform: rotate(-13deg); }
  9%  { transform: rotate(10deg); }
  12% { transform: rotate(-6deg); }
  14% { transform: rotate(3deg); }
}
.notif-bell.has-unread .notif-bell-icon {
  transform-origin: 50% 3px;
  animation: bellRing 5s ease-in-out 0.4s infinite;
}
/* Botão de busca da topbar (mobile): empurra o grupo busca+sino para a direita. */
.topbar-search-btn { margin-left: auto; flex: none; display: inline-flex; align-items: center;
  justify-content: center; width: 44px; height: 44px; border: none; border-radius: 10px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
.topbar-search-btn:hover { background: rgba(255,255,255,.2); }
/* Sino na topbar (mobile): a barra é navy, então o sino precisa ser BRANCO —
   senão fica navy-sobre-navy (invisível). Espelha o tratamento do Moura One e
   garante alvo de toque de 44px. (Auditoria UX — pré-lançamento) */
.topbar .notif-bell { margin-left: 6px; color: #fff; width: 44px; height: 44px; padding: 0; border-radius: 10px; }
.topbar .notif-bell:hover { background: rgba(255,255,255,.2); }
.topbar .notif-bell-icon { width: 22px; height: 22px; }
/* Sino na sidebar (desktop): fica ao lado do logo, em tom claro sobre o navy. */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar .notif-bell { margin-left: 0; flex: none; color: #fff; }
.sidebar .notif-bell:hover { background: rgba(255,255,255,.14); }
.notif-count { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  border-radius: 100px; background: #f97316; color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; }
.notif-count.hidden { display: none; }

/* ---- Painel de notificações ---- */
.notif-panel { background: var(--white); border: 1px solid var(--gray-soft); border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13); width: 360px; max-width: calc(100vw - 16px);
  max-height: 70vh; overflow-y: auto; z-index: 200; }
.notif-panel.hidden { display: none; }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--gray-soft); font-weight: 700;
  font-size: 15px; color: var(--navy); position: sticky; top: 0; background: var(--white); z-index: 1; }
.notif-panel-close { background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.notif-panel-close:hover { background: var(--off-white); color: var(--navy); }
.notif-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 10px 16px 4px; display: flex; align-items: center; gap: 6px; }
.notif-group-count { background: var(--gray-soft); border-radius: 100px; padding: 1px 7px;
  font-size: 11px; font-weight: 700; color: var(--navy); }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 16px;
  text-decoration: none; color: inherit; transition: background .12s; }
.notif-item:hover { background: var(--off-white); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.notif-item strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.notif-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-toggle { flex: none; background: none; border: none; cursor: pointer; font-size: 13px;
  line-height: 1; color: var(--cyan); padding: 4px 5px; border-radius: 6px; margin-top: 2px; opacity: .7; }
.notif-toggle:hover { background: var(--white); opacity: 1; }
.notif-item:not(.notif-unread) .notif-toggle { color: var(--muted); }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; }
/* Item não lido: fundo destacado + barra à esquerda */
.notif-item.notif-unread { background: var(--cyan-soft); box-shadow: inset 3px 0 0 var(--cyan); }
.notif-item.notif-unread:hover { background: var(--cyan-soft); }
.notif-actions { display: flex; justify-content: flex-end; padding: 8px 14px 2px; }
.notif-mark-all { background: none; border: none; color: var(--cyan); font-size: 12.5px; font-weight: 600;
  cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.notif-mark-all:hover { background: var(--off-white); }
/* O posicionamento e a largura do painel são calculados em shell.js
   (mountNotifications/positionPanel), travando dentro da viewport — por isso
   não forçamos width/left/right aqui (evita conflito de !important). */

/* ---- Ator na linha do tempo ---- */
.tl-actor { margin-left: 8px; font-size: 11px; background: var(--off-white); border-radius: 6px;
  padding: 1px 6px; color: var(--muted); }

/* ---- Dashboard: layout em duas colunas (indicadores estratégicos) ---- */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .dash-cols { grid-template-columns: 1fr; gap: 20px; } }

/* ---- Barras horizontais (status / fornecedores) ---- */
.bar-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center;
  gap: 12px; padding: 7px 0; font-size: 13.5px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--navy); }
.bar-track { background: var(--gray-soft); border-radius: 100px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--navy); border-radius: 100px; transition: width .4s ease; }
.bar-fill-cyan { background: var(--cyan); }
.bar-val { white-space: nowrap; font-weight: 600; color: var(--navy); font-size: 13px; text-align: right; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 100px 1fr auto; gap: 8px; font-size: 12.5px; } }

/* ---- Grade chave-valor (situação de backup) ---- */
.kv-grid { display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: start;
  padding-bottom: 14px; border-bottom: 1px solid var(--gray-soft); }
.kv:last-child { border-bottom: none; padding-bottom: 0; }
.kv-k { font-size: 13px; font-weight: 600; color: var(--muted); }
.kv-v { font-size: 14px; color: var(--navy); }
.kv-v code { background: var(--off-white); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 4px; } }

/* ---- Banner de aviso ---- */
.banner { border-radius: 10px; padding: 12px 16px; font-size: 13.5px; line-height: 1.5; }
.banner-warn { background: #fdf6e3; color: #8a6d00; border: 1px solid #f0e0a8; }

/* ---- Visão Geral do evento: blocos de números ---- */
.ov-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 8px; }
.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ov-grid-money { grid-template-columns: repeat(3, 1fr); }
.ov-stat { background: var(--off-white); border: 1px solid var(--gray-soft); border-radius: 10px;
  padding: 14px 12px; text-align: center; }
.ov-stat-val { font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1.15; word-break: break-word; }
.ov-stat-lbl { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.ov-stat-danger .ov-stat-val { color: var(--danger); }
.ov-stat-ok .ov-stat-val { color: #16a34a; }
@media (max-width: 600px) {
  .ov-grid, .ov-grid-money { grid-template-columns: repeat(2, 1fr); }
  .ov-stat-val { font-size: 17px; }
}

/* Seletor de responsáveis (contas) — chips clicáveis */
.resp-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.resp-chip { background: var(--white); border: 1px solid var(--gray-soft); border-radius: 99px;
  padding: 7px 14px; font-size: 13px; font-family: inherit; color: var(--navy); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: border-color .12s, background .12s; }
.resp-chip:hover { border-color: var(--cyan); }
.resp-chip.on { background: var(--cyan); border-color: var(--cyan); color: var(--navy-deep); font-weight: 600; }
.resp-chip-role { font-size: 10.5px; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.resp-chip.on .resp-chip-role { opacity: .85; }

/* Chips de responsáveis (somente leitura, na Visão Geral) */
.resp-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.resp-tag { background: var(--off-white); border: 1px solid var(--gray-soft); border-radius: 99px;
  padding: 2px 10px; font-size: 12.5px; color: var(--navy); }

/* Nome clicável (fornecedor/cliente) em tabela — alinhado à esquerda, quebra limpa */
.link-name { font-weight: 600; color: var(--navy); background: none; border: none; padding: 0;
  cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px;
  line-height: 1.35; font-size: 14px; font-family: inherit; }
.link-name:hover { color: var(--cyan); }
.sup-name-cell { min-width: 160px; }

/* Seletor de status com edição rápida (Visão Geral) */
.ov-status-select { font-size: 13px; font-weight: 600; color: var(--navy); border: 1px solid var(--gray-soft);
  background: var(--white); border-radius: 99px; padding: 5px 30px 5px 14px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.ov-status-select:hover { border-color: var(--cyan); }
.ov-status-select:disabled { opacity: .6; cursor: default; }

/* ============================================================
   Portal do Expositor — utilitários de layout
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 560px) { .kv-grid { grid-template-columns: 1fr; } }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv-l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kv-v { font-size: 14.5px; color: var(--charcoal); font-weight: 500; word-break: break-word; }
.mini-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spaced > * + * { margin-top: 18px; }
.tablebar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tablebar input, .tablebar select { width: auto; min-width: 160px; }
/* Conversa de chamados */
.chat { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 16px; max-height: 420px; overflow-y: auto; }
.chat-msg { max-width: 78%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.chat-them { align-self: flex-start; background: var(--off-white); border: 1px solid var(--gray-soft); }
.chat-me { align-self: flex-end; background: var(--cyan-soft); }
.read-receipt { font-size: 10px; color: var(--muted); margin-left: 5px; }
.read-receipt.seen { color: #0d9488; }
/* Linha de item (documento/credencial/arquivo) */
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-soft); }
.item-row:last-child { border-bottom: none; }
.item-row .meta { min-width: 0; }
.item-row .meta strong { display: block; color: var(--navy); }
.item-row .meta .muted { font-size: 12.5px; }

/* ============================================================
   Portal do Expositor — gráficos simples (sem dependência)
   ============================================================ */
.chart { display: flex; flex-direction: column; gap: 10px; }
.chart-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.chart-row .lbl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-track { background: var(--gray-soft); border-radius: 99px; height: 12px; overflow: hidden; }
.chart-bar { height: 100%; border-radius: 99px; background: var(--navy); transition: width .4s ease; }
.chart-bar.b-cyan { background: var(--cyan); }
.chart-bar.b-green { background: #2bb673; }
.chart-bar.b-amber { background: #e6a700; }
.chart-bar.b-red { background: var(--danger); }
.chart-row .val { text-align: right; font-weight: 600; color: var(--navy); }

/* Miniatura de foto da credencial (portal e admin) */
.cred-thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; vertical-align: middle; border: 1px solid var(--gray);
  background: var(--off-white); overflow: hidden; }
.cred-thumb-ph { font-size: 12px; font-weight: 700; color: var(--muted); }
.cred-thumb-lg { width: 120px; height: 120px; font-size: 32px; }

/* Dashboard — grade de duas colunas (top fornecedores + distribuição por status) */
.dash-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
@media (max-width: 767px) { .dash-bottom-grid { grid-template-columns: 1fr; } }

/* Inline button that looks like a link */
.btn-link { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }

/* ============================================================
   FASE 6 — Central do Expositor: refinamento visual + por evento
   A Central é organizada por evento (a feira). O elemento-assinatura é o
   painel do evento, com uma sutil malha de "planta de pavilhão" sobre o azul
   da marca. O resto fica quieto e disciplinado: profundidade leve, foco em
   tipografia e espaçamento. Marca preservada (azul #152C6B + turquesa #00C2B8).
   Este bloco vem por último de propósito — refina componentes sem reescrever.
   ============================================================ */

/* ---- Profundidade um pouco mais suave e moderna ---- */
:root {
  --shadow: 0 1px 2px rgba(14,27,61,.05), 0 10px 26px -14px rgba(14,27,61,.20);
  --shadow-lg: 0 24px 60px -22px rgba(14,27,61,.34);
  --ring: 0 0 0 3px rgba(0,194,184,.30);
}
body { background: linear-gradient(180deg, #eef2f8 0%, var(--off-white) 320px); }

/* ---- Botões: micro-interação e relevo discreto ---- */
.btn { transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
.btn-primary { box-shadow: 0 1px 1px rgba(14,27,61,.20), 0 8px 18px -10px rgba(21,44,107,.7); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-accent:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ---- Cartões e tabela: relevo + leitura ---- */
.card { transition: box-shadow .18s ease; }
tbody tr { transition: background .12s ease; }
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr:hover { background: var(--cyan-soft); }

/* ---- Cartões de métrica: leve elevação no hover só para os clicáveis ---- */
.stat { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -16px rgba(14,27,61,.30); border-color: var(--gray); }
.stat .stat-ico svg { width: 20px; height: 20px; }
.stat .n { font-variant-numeric: tabular-nums; }

/* ---- Modais: desfoque de fundo + entrada suave ---- */
.modal-bg { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: ovFade .16s ease; }
.modal { box-shadow: var(--shadow-lg); animation: ovPop .2s cubic-bezier(.2,.8,.2,1); }
@keyframes ovFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ovPop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- Barra lateral: navegação com ícones e estado ativo mais nítido ---- */
.sidebar nav a { display: flex; align-items: center; gap: 11px; }
.sidebar nav a > span:last-child { min-width: 0; }
.nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  flex: none; opacity: .72; transition: opacity .12s ease; }
.sidebar nav a:hover .nav-ico { opacity: 1; }
.sidebar nav a.active { box-shadow: none; }
.sidebar nav a.active .nav-ico { opacity: 1; }

/* ---- Chip do evento ativo (barra lateral) ---- */
.event-chip { display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px; padding: 10px 12px; margin: 0 2px 16px; transition: background .15s, border-color .15s; }
.event-chip:hover { background: rgba(255,255,255,.12); border-color: rgba(0,194,184,.55); }
.event-chip-ico { color: var(--cyan); flex: none; display: inline-flex; }
.event-chip-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.event-chip-k { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #8aa0c7; font-weight: 600; }
.event-chip-name { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-chip-swap { font-size: 11px; font-weight: 700; color: var(--cyan); flex: none; }
.event-chip-empty .event-chip-name { color: #cdd6ec; font-weight: 500; font-size: 13px; }

/* ---- Assinatura: painel do evento (malha de planta de pavilhão) ---- */
.event-hero { position: relative; overflow: hidden; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #0E1B3D 0%, #152C6B 58%, #173576 100%);
  padding: 30px 34px; margin-bottom: 26px; box-shadow: 0 26px 60px -28px rgba(14,27,61,.65); }
.event-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(0,194,184,.13) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,194,184,.13) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(135% 120% at 92% -10%, #000 28%, transparent 72%);
          mask-image: radial-gradient(135% 120% at 92% -10%, #000 28%, transparent 72%); }
.event-hero::after { content: ''; position: absolute; right: -90px; top: -90px; width: 280px; height: 280px;
  pointer-events: none; background: radial-gradient(circle, rgba(0,194,184,.30), transparent 64%); }
.event-hero-inner { position: relative; z-index: 1; }
.event-hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--cyan); margin-bottom: 12px; }
.event-hero-eyebrow svg { width: 15px; height: 15px; }
.event-hero-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.event-hero-name { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -.02em;
  color: #fff; line-height: 1.1; margin: 0; }
.event-hero-meta { display: flex; gap: 14px 22px; flex-wrap: wrap; margin-top: 14px; }
.event-hero-meta .ehm { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #c6d2ec; }
.event-hero-meta .ehm svg { width: 17px; height: 17px; color: var(--cyan); flex: none; }
.event-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-hero-ghost { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.24); }
.btn-hero-ghost:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); transform: translateY(-1px); }

/* ---- Rótulo de seção ---- */
.section-label { font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); }

/* ---- Atalhos do painel (cards de navegação) ---- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 14px; }
.quick-card { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--white);
  border: 1px solid var(--gray-soft); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(0,194,184,.5); }
.quick-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--cyan-soft); color: var(--navy); }
.quick-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.quick-body strong { font-size: 14.5px; color: var(--navy-deep); }
.quick-body .muted { font-size: 12.5px; }
.quick-arrow { color: var(--gray); font-size: 18px; transition: color .15s ease, transform .15s ease; flex: none; }
.quick-card:hover .quick-arrow { color: var(--cyan); transform: translateX(3px); }

/* ---- Seleção de evento (cartões-botão) ---- */
.ev-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(312px, 1fr)); gap: 16px; }
.ev-pick { text-align: left; font-family: inherit; cursor: pointer; padding: 0; background: var(--white);
  border: 1px solid var(--gray-soft); border-radius: 16px; overflow: hidden; display: flex;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ev-pick:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(0,194,184,.55); }
.ev-pick:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow); }
.ev-pick-bar { width: 6px; flex: none; background: var(--grad-destaque); }
.ev-pick-main { flex: 1; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ev-pick-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ev-pick-name { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--navy-deep);
  letter-spacing: -.01em; line-height: 1.2; }
.ev-pick-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.ev-pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--gray-soft); }
.ev-pick-count { font-size: 13px; color: var(--charcoal); }
.ev-pick-count strong { font-family: var(--display); font-size: 16px; color: var(--navy); }
.ev-pick-go { font-size: 13px; font-weight: 600; color: var(--cyan); white-space: nowrap; }
.ev-pick:hover .ev-pick-go { color: var(--navy); }

/* ---- Ajustes mobile da Fase 6 ---- */
@media (max-width: 767px) {
  .event-hero { padding: 22px 20px; border-radius: 14px; }
  .event-hero-name { font-size: 23px; }
  .event-hero-meta { gap: 8px 16px; }
  .ev-pick-grid, .quick-grid { grid-template-columns: 1fr; }
}

/* ---- Movimento reduzido: sem entrada/elevação ---- */
@media (prefers-reduced-motion: reduce) {
  .modal-bg, .modal { animation: none !important; }
  .btn:hover, a.stat:hover, .quick-card:hover, .ev-pick:hover, .btn-hero-ghost:hover { transform: none !important; }
}

/* ============================================================
   FASE 7 — botão fechar no modal, status rotulado, WhatsApp
   ============================================================ */
/* Botão "✕" sempre presente no modal de formulário (openModal). Junto com a
   proteção anti-perda-de-dados (clique fora/ESC não fecham modal preenchido),
   dá uma saída explícita e clara. */
.modal { position: relative; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: none; background: none;
  color: var(--muted); font-size: 15px; cursor: pointer; border-radius: 8px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; }
.modal-x:hover { background: var(--off-white); color: var(--navy); }

/* Status do expositor com rótulo (Acesso ao portal / Contrato) — evita o
   "ativo ou pendente?" de pílulas soltas sem contexto. */
.hdr-status-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hdr-status { display: inline-flex; align-items: center; gap: 7px; }
.hdr-status-k { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Telefone com atalho de WhatsApp (reusa .icon-btn.icon-wa). */
.phone-wa { display: inline-flex; align-items: center; gap: 8px; }
.phone-wa .icon-btn { width: 30px; height: 30px; }
.icon-btn.icon-wa svg { display: block; }

/* ── Seletor de evento do portal (quando 1 login expõe em vários eventos) ──── */
.event-switch { margin: 2px 6px 22px; }
.event-switch-lbl { display: block; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  color: #8aa0c7; margin-bottom: 6px; }
.event-switch-sel { width: 100%; background: rgba(255,255,255,.06); color: #eaf0fb;
  border: 1px solid rgba(255,255,255,.16); border-radius: 9px; padding: 9px 10px; font: 600 13px var(--body);
  cursor: pointer; transition: border-color .15s, background .15s; }
.event-switch-sel:hover { border-color: var(--cyan); background: rgba(255,255,255,.1); }
.event-switch-sel:focus { outline: none; border-color: var(--cyan); }
.event-switch-sel option { color: #11203f; background: #fff; }
.event-switch-static { font-size: 12px; color: #aebbd6; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 7px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Variante compacta na topbar (só-mobile): ocupa o meio e empurra o sino p/ direita. */
.event-switch-top { display: flex; align-items: center; flex: 1; min-width: 0; margin: 0 2px; }
.event-switch-top .event-switch-sel { width: auto; flex: 1; min-width: 0; padding: 7px 8px; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Botão de excluir no card de evento (tela de seleção) ──────────────────── */
.ev-pick { position: relative; }
.ev-pick-del { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: 8px; cursor: pointer;
  opacity: 0; transition: opacity .15s ease, background .15s ease, border-color .15s ease, transform .1s ease; }
.ev-pick:hover .ev-pick-del, .ev-pick:focus-within .ev-pick-del { opacity: 1; }
.ev-pick-del:hover { background: #fdecec; border-color: #f3b4b4; transform: scale(1.06); }
@media (hover: none) { .ev-pick-del { opacity: 1; } }
/* Reserva espaço no topo p/ a pílula de status não ficar sob o 🗑 (top-right). */
.ev-pick.has-del .ev-pick-top { padding-right: 36px; }

/* ── Configuração do evento: abas de módulo + toggles ─────────────────────── */
.tab-pill { background: var(--white); border: 1px solid var(--gray-soft); color: var(--charcoal);
  border-radius: 999px; padding: 8px 16px; font: 600 13px var(--body); cursor: pointer; transition: .15s; }
.tab-pill:hover { border-color: var(--navy); }
.tab-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.sw { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; vertical-align: middle; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; background: var(--gray); border-radius: 999px; transition: .2s; }
.sw span::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw input:checked + span { background: var(--cyan); }
.sw input:checked + span::before { transform: translateX(18px); }
.sw input:disabled + span { opacity: .5; cursor: default; }
.cfg-ord { white-space: nowrap; }
.cfg-ord .icon-btn { width: 26px; height: 26px; font-size: 11px; }

/* ── Bloco de credenciais de acesso (copiar/reenviar) ─────────────────────── */
.access-box { border: 1px solid var(--gray-soft); border-radius: 12px; overflow: hidden; background: var(--off-white); }
.access-row { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--gray-soft); font-size: 14px; }
.access-row:last-child { border-bottom: none; }
.access-copy { cursor: pointer; transition: background .12s; }
.access-copy:hover { background: #eef4ff; }
.access-copy::after { content: '⧉'; margin-left: auto; color: var(--muted); font-size: 13px; align-self: center; }
.access-k { flex: none; width: 64px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.access-v { flex: 1; min-width: 0; font-weight: 600; color: var(--charcoal); word-break: break-all; font-family: var(--mono, ui-monospace, monospace); }

/* ── Dashboard de Usuários ────────────────────────────────────────────────── */
.usr-avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; font: 700 14px var(--body); color: #fff;
  flex-shrink: 0; letter-spacing: .03em; text-transform: uppercase; }
.row-title  { font-weight: 600; color: var(--charcoal); font-size: 14px; line-height: 1.3; }
.row-sub    { font-size: 12px; color: var(--muted); line-height: 1.3; }
.sub-line   { font-size: 11px; color: var(--cyan); font-weight: 600; letter-spacing: .02em; }
.tag-wrap   { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.tag-chip   { display: inline-block; background: var(--off-white); border: 1px solid var(--gray-soft);
  border-radius: 999px; padding: 2px 9px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.btn-sm     { padding: 4px 10px !important; font-size: 12px !important; }
.btn-danger-ghost { color: var(--danger); border-color: var(--danger); }
.btn-danger-ghost:hover { background: #fdecec; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 12px; flex-wrap: wrap; }
.page-info  { font-size: 13px; color: var(--muted); }
.page-btns  { display: flex; align-items: center; gap: 8px; }
.page-label { font-size: 13px; color: var(--charcoal); font-weight: 500; }
.loading-row { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* Pills extras: purple para expositor ───────────────────────────────────── */
.pill-purple { background: #f3e8ff; color: #7c3aed; border-color: #c4b5fd; }

/* Tone de stat card extras ───────────────────────────────────────────────── */
.tone-red    { border-left-color: var(--danger) !important; }
.tone-purple { border-left-color: #7c3aed !important; }
.tone-gray   { border-left-color: var(--muted) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   Alterações Portal Expositor — KPIs compactos, view toggle, board (kanban),
   checkboxes de requisito, seg-toggle e feed de comunicados.
   ═══════════════════════════════════════════════════════════════════════════ */

/* KPIs compactos: cabem mais por linha (pedido: "menor, tudo numa linha só") */
.stat-grid.kpi-compact { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 22px; }
.kpi-compact .stat { padding: 11px 12px; }
.kpi-compact .stat::before { width: 3px; }
.kpi-compact .stat .stat-top { gap: 5px; margin-bottom: 2px; }
.kpi-compact .stat .n { font-size: 21px; }
.kpi-compact .stat .l { font-size: 11px; }
@media (max-width: 720px) { .stat-grid.kpi-compact { grid-template-columns: repeat(3, 1fr) !important; } }

/* Alternância de visão (Lista / Boards) e toggle segmentado genérico */
.view-toggle, .seg-toggle { display: inline-flex; border: 1px solid var(--gray-soft); border-radius: 9px; overflow: hidden; background: var(--white); }
.view-toggle button, .seg-toggle button {
  border: none; background: transparent; padding: 8px 13px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; font-family: inherit; transition: background .15s ease, color .15s ease;
}
.view-toggle button + button, .seg-toggle button + button { border-left: 1px solid var(--gray-soft); }
.view-toggle button.active, .seg-toggle button.active { background: var(--navy); color: #fff; }
.view-toggle button:not(.active):hover, .seg-toggle button:not(.active):hover { background: var(--off-white, #f1f5f9); color: var(--navy); }
.seg-toggle { width: 100%; }
.seg-toggle button { flex: 1; }

/* Board / kanban de expositores por status de contrato */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--off-white, #f5f7fb); border: 1px solid var(--gray-soft); border-radius: 12px; padding: 10px; min-height: 80px; }
.board-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 2px 4px; }
.board-col-n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--white); border: 1px solid var(--gray-soft); border-radius: 20px; padding: 1px 9px; }
.board-col-body { display: flex; flex-direction: column; gap: 9px; }
.board-card { background: var(--white); border: 1px solid var(--gray-soft); border-radius: 10px; padding: 11px 12px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(14,27,61,.05); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.board-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(14,27,61,.28); border-color: rgba(0,194,184,.5); }
.board-card-title { font-weight: 600; color: var(--navy-deep, var(--navy)); font-size: 14px; line-height: 1.25; }
.board-card-meta { font-size: 12px; color: var(--muted); margin: 3px 0 8px; }
.board-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-card-pends { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.board-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 0; }
@media (max-width: 1024px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; } }

/* Checkboxes inline (requisito de documento) */
.chk-row { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 4px 0; }
.chk-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--charcoal, #334155); cursor: pointer; }
.chk-inline input { width: auto !important; margin: 0; }

/* Feed de comunicados (portal) */
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-item { display: flex; gap: 12px; background: var(--white); border: 1px solid var(--gray-soft); border-radius: 12px; padding: 16px 18px;
  position: relative; transition: box-shadow .15s ease, border-color .15s ease; }
.feed-item:hover { box-shadow: 0 10px 26px -16px rgba(14,27,61,.25); }
.feed-unread { border-color: rgba(0,194,184,.55); background: linear-gradient(0deg, var(--white), var(--white)) padding-box, #fff; }
.feed-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; margin-top: 7px; flex: none; }
.feed-unread .feed-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(0,194,184,.16); }
.feed-body { flex: 1; min-width: 0; }
.feed-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.feed-title { color: var(--navy); font-size: 16px; }
.feed-badges { display: inline-flex; gap: 6px; flex: none; }
.feed-actions { margin-top: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Checklist Inteligente · Central de Pendências · Chamados (anexos) · badges
   ═══════════════════════════════════════════════════════════════════════════ */

/* Checklist — barra de progresso + etapas */
.chk-hero { margin-bottom: 18px; }
.chk-hero-admin { background: var(--white); border: 1px solid var(--gray-soft); border-radius: 12px; padding: 14px 16px; margin: 4px 0 18px; }
.chk-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.chk-pct { font-size: 12px; font-weight: 600; color: var(--muted); }
.chk-track { height: 9px; border-radius: 20px; background: var(--off-white, #eef1f6); overflow: hidden; }
.chk-bar { display: block; height: 100%; border-radius: 20px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.chk-bar-low  { background: linear-gradient(90deg, #e6a700, #f0b500); }
.chk-bar-mid  { background: linear-gradient(90deg, var(--cyan), #19a7c9); }
.chk-bar-full { background: linear-gradient(90deg, #2bb673, #16a34a); }
.chk-steps { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chk-step { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--gray-soft); }
.chk-step .chk-ico { font-weight: 700; }
.chk-done { color: #16794a; background: #eafaf1; border-color: #bce8d1; }
.chk-todo { color: var(--muted); background: var(--white); }

/* Mini-barra de progresso (lista/board/pendências) */
.prog-mini { display: inline-flex; align-items: center; gap: 6px; }
.prog-mini-track { width: 54px; height: 6px; border-radius: 20px; background: var(--off-white, #eef1f6); overflow: hidden; }
.prog-mini-bar { display: block; height: 100%; border-radius: 20px; }
.prog-mini-n { font-size: 11px; font-weight: 600; color: var(--muted); min-width: 30px; }

/* Central de Pendências */
.pend-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-soft); }
.pend-name { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--navy); text-decoration: none; }
.pend-name:hover { color: var(--cyan); }
.pend-head-right { display: inline-flex; align-items: center; gap: 12px; }
.pend-items { display: flex; flex-direction: column; gap: 4px; }
.pend-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: inherit; transition: background .12s ease; }
.pend-item:hover { background: var(--off-white, #f5f7fb); }
.pend-item-label { font-size: 13.5px; color: var(--charcoal, #334155); }
.pend-item-go { margin-left: auto; color: var(--muted); font-size: 14px; }

/* (Badge de navegação reusa .nav-badge já existente — "selo de notificação".) */

/* Anexos de chamado */
.att-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.7); border: 1px solid var(--gray-soft); border-radius: 8px; padding: 3px 6px 3px 8px; max-width: 240px; }
.chat-me .att-chip { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); }
.att-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-btn { border: none; background: transparent; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 5px; line-height: 1; }
.att-btn:hover { background: rgba(0,0,0,.08); }
.chat-me .att-btn:hover { background: rgba(255,255,255,.25); }
.reply-bar { display: flex; align-items: center; gap: 10px; }

/* Chamado ainda não atendido: destaque sutil na linha */
.ticket-unhandled td:first-child { box-shadow: inset 3px 0 0 var(--danger); font-weight: 600; }

/* Timeline / auditoria do expositor */
.timeline { position: relative; padding-left: 6px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: -2px; width: 2px; background: var(--gray-soft); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--off-white, #eef1f6);
  border: 1px solid var(--gray-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; z-index: 1; }
.tl-body { padding-top: 4px; }
.tl-title { font-size: 14px; color: var(--charcoal, #334155); font-weight: 500; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Central de Notificações (página dedicada do promotor) */
.notif-grp-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 10px; }
.notif-grp-n { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--off-white,#eef1f6); border-radius: 20px; padding: 1px 8px; }
.notif-feed { display: flex; flex-direction: column; }
.notif-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 9px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--gray-soft); transition: background .12s ease; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--off-white,#f5f7fb); }
.notif-row-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: none; }
.notif-row-unread { background: rgba(0,194,184,.06); }
.notif-row-unread .notif-row-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(0,194,184,.16); }
.notif-row-unread .notif-row-title { font-weight: 600; }
.notif-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-row-title { font-size: 14px; color: var(--charcoal,#334155); }
.notif-row-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── Fase 9: Catálogo de Serviços & Energia ─────────────────────────────────── */
/* Link-card (event-config → catálogo de serviços) */
.cfg-link-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.cfg-link-card:hover { border-color: rgba(0,194,184,.5); box-shadow: 0 10px 26px -16px rgba(14,27,61,.25); transform: translateY(-1px); }
.cfg-link-ico { font-size: 22px; }
.cfg-link-body { display: flex; flex-direction: column; gap: 2px; }
.cfg-link-body .muted { font-size: 12.5px; }
.cfg-link-go { margin-left: auto; color: var(--cyan); font-weight: 600; font-size: 13px; white-space: nowrap; }

/* Agrupamento do catálogo por categoria */
.cfg-group { margin-bottom: 20px; }
.cfg-group-head { font-family: var(--display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin: 0 2px 8px; }
.svc-cat-card.svc-inactive { opacity: .62; }
.svc-cat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.svc-packages { margin-top: 12px; border-top: 1px dashed var(--gray-soft); padding-top: 10px; }
.svc-packages-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.svc-pkg-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; border-bottom: 1px solid var(--gray-soft); }
.svc-pkg-row:last-child { border-bottom: none; }
.svc-pkg-row > span:first-child { flex: 1; }
.svc-pkg-price { font-weight: 600; color: var(--navy); }

/* Prévia de custo (portal e admin) + barra de total */
.svc-cost-preview { background: var(--off-white,#f5f7fb); border: 1px solid var(--gray-soft); border-radius: 10px; padding: 10px 12px; min-height: 22px; }
.svc-cost-line { display: flex; align-items: center; justify-content: space-between; }
.svc-cost-line strong { font-size: 17px; color: var(--navy); }
.svc-total { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; margin-bottom: 16px; }
.svc-total strong { font-size: 22px; color: var(--navy); }

/* ---- Aviso de documento/comprovante recusado (callout visível) ---- */
.reject-note { margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  background: #fdecec; border: 1px solid #f6c9c9; color: #a12626;
  font-size: 12.5px; line-height: 1.35; }
.reject-note strong { color: #8a1f1f; }

/* ---- Barra de progresso de upload (dentro de modais) ---- */
.upload-progress { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.upload-progress.hidden { display: none; }
.upload-progress-track { flex: 1; min-width: 0; height: 8px; background: var(--gray-soft);
  border-radius: 100px; overflow: hidden; }
.upload-progress-bar { height: 100%; width: 2%; background: var(--cyan);
  border-radius: 100px; transition: width .2s ease; }
.upload-progress-pct { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }

/* ---- Esqueleto de carregamento (shimmer) ---- */
.skel-wrap { padding: 4px 0; }
.skel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.skel { background: linear-gradient(90deg, var(--gray-soft) 25%, #e9eef5 37%, var(--gray-soft) 63%);
  background-size: 400% 100%; border-radius: 8px; animation: skel-shimmer 1.3s ease infinite; }
.skel-title { height: 26px; width: 38%; margin-bottom: 10px; }
.skel-card { height: 84px; }
.skel-line { height: 14px; margin: 10px 0; }
.skel-line.short { width: 55%; }
@keyframes skel-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (max-width: 767px) { .skel-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ============================================================
   White-label (branding) + PWA + módulos novos
   (Central do Evento, Onboarding, Montagem, Reservas, Marketplace)
   ============================================================ */
/* Logo da organização (substitui o wordmark quando há white-label) */
.brand-logo-img { max-height: 32px; max-width: 168px; vertical-align: middle; display: inline-block; }

/* Botão flutuante de instalação do PWA (só no portal) */
.pwa-install {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 11px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-lg); font-family: var(--body);
}
.pwa-install:hover { background: var(--navy-deep); }
.pwa-install-x { background: rgba(255,255,255,.22); color: #fff; border: none; border-radius: 50%;
  width: 20px; height: 20px; line-height: 1; font-size: 11px; cursor: pointer; padding: 0; }
@media (max-width: 767px) { .pwa-install { bottom: 76px; } }

/* Onboarding — assistente de boas-vindas */
.ob-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(14,27,61,.55);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.ob-card { background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 92vh; }
.ob-head { background: var(--grad-principal); color: #fff; padding: 22px 24px; }
.ob-head .eyebrow { color: var(--cyan); }
.ob-head h2 { color: #fff; font-size: 20px; margin-top: 4px; }
.ob-steps-dots { display: flex; gap: 6px; margin-top: 14px; }
.ob-dot { height: 5px; flex: 1; border-radius: 3px; background: rgba(255,255,255,.25); }
.ob-dot.on { background: var(--cyan); }
.ob-body { padding: 24px; overflow-y: auto; }
.ob-body h3 { font-size: 17px; margin-bottom: 8px; }
.ob-foot { display: flex; justify-content: space-between; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--gray-soft); }
.ob-check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-soft); }
.ob-check:last-child { border-bottom: none; }
.ob-check-ico { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center;
  justify-content: center; font-size: 14px; background: var(--off-white); }
.ob-check.done .ob-check-ico { background: var(--cyan-soft); color: #0a8f88; }
.ob-reopen { background: none; border: none; color: var(--navy); font-size: 13px; cursor: pointer; text-decoration: underline; }

/* Feed unificado (Central do Evento) */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-soft); text-decoration: none; color: inherit; }
.feed-item:last-child { border-bottom: none; }
.feed-ico { width: 36px; height: 36px; border-radius: 10px; flex: none; display: flex; align-items: center;
  justify-content: center; font-size: 17px; background: var(--off-white); }
.feed-item.sev-high .feed-ico { background: #fde8e8; }
.feed-item.sev-medium .feed-ico { background: var(--cyan-soft); }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-weight: 600; color: var(--navy); font-size: 14px; }
.feed-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.feed-when { color: var(--muted); font-size: 12px; white-space: nowrap; flex: none; }

/* Cartões de catálogo (vitrine / reservas / montagem) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--gray); border-radius: var(--radius-sm); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.tile-img { height: 150px; background: var(--off-white) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 30px; }
.tile-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tile-body h3 { font-size: 15px; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--gray-soft); }
.slot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--gray); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.slot-row.full { opacity: .6; }
.slot-cap { font-size: 12px; color: var(--muted); }

/* Vitrine pública */
.vitrine-top { background: var(--navy); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.vitrine-wrap { max-width: 1040px; margin: 0 auto; padding: 22px 18px 60px; }

/* ============================================================
   Lixeira — resumo, prazos e ações
   ============================================================ */
.trash-summary { display: flex; align-items: center; gap: 12px;
  background: var(--off-white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  padding: 14px 18px; font-size: 14.5px; }
.trash-summary-ico { font-size: 22px; flex: none; }
.trash-summary strong { color: var(--navy); }
.trash-days { display: inline-block; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  padding: 2px 9px; border-radius: 99px; background: var(--gray-soft); color: var(--muted); }
.trash-days-soon { background: #fbf0d8; color: #8a5a00; }

/* ── Textarea auto-expand ─────────────────────────────────────────────────── */
textarea {
  field-sizing: content;
  min-height: 80px;
  max-height: 300px;
  overflow-y: auto;
  resize: none;
}

/* Acessibilidade / iOS: em telas de toque, campo com fonte < 16px provoca zoom
   automatico ao focar (a tela "pula"). 16px no mobile elimina esse salto; no
   desktop a densidade de 15px e preservada. (Auditoria UX — pre-lancamento) */
@media (max-width: 767px) {
  input[type=text], input[type=email], input[type=tel], input[type=password],
  input[type=date], input[type=time], input[type=number], input[type=search],
  input[type=url], textarea, select { font-size: 16px; }
}
/* ============================================================
   Dark mode — ativado por html[data-dark="1"]
   ============================================================ */
html[data-dark="1"] {
  --navy: #7b9fe0;
  --navy-deep: #1a2d5a;
  --off-white: #0f1420;
  --gray: #2a3a50;
  --gray-soft: #253548;
  --charcoal: #dde3ee;
  --ink: #c8d0e0;
  --muted: #7a8a9e;
  --white: #182030;
  --cyan-soft: #0c2522;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 22px -10px rgba(0,0,0,.5);
  --shadow-lg: 0 18px 48px -12px rgba(0,0,0,.6);
}

html[data-dark="1"] body { background: #0f1420; color: var(--charcoal); }
html[data-dark="1"] .main { background: #0f1420; }

html[data-dark="1"] h1, html[data-dark="1"] h2, html[data-dark="1"] h3,
html[data-dark="1"] h4, html[data-dark="1"] .page-head h1 { color: var(--charcoal); }

html[data-dark="1"] thead tr { background: #1a2535 !important; }
html[data-dark="1"] thead th { color: var(--muted); }
html[data-dark="1"] tbody tr:hover { background: #1e2e45 !important; }
html[data-dark="1"] table.cards tbody tr:hover { background: #1e2e45 !important; }

html[data-dark="1"] .bulk-decline { background: #1e2a3a; border-color: #2a3a50; }
html[data-dark="1"] .session-warn .btn { background: #1e2a3a; border-color: #2a3a50; }
html[data-dark="1"] .slot-row { background: #182030; border-color: #2a3a50; }

.dark-toggle {
  background: transparent; border: none; cursor: pointer;
  font-size: 18px; padding: 6px 8px; border-radius: 8px;
  line-height: 1; flex-shrink: 0; transition: background .15s;
}
.dark-toggle:hover { background: rgba(255,255,255,.12); }
/* Botão de modo escuro na barra lateral (visível no desktop) */
.side-dark {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 8px;
  padding: 9px 12px; background: none; border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; color: #c2cde6; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s, border-color .12s, color .12s; text-align: left;
}
.side-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); color: #fff; }
.side-dark .dm-ico { font-size: 15px; line-height: 1; }
