/* ============================================================
   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; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  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: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #c2cde6; padding: 24px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
  background-image:
    radial-gradient(115% 50% at -10% -5%, rgba(0,194,184,.13) 0%, rgba(0,194,184,0) 55%),
    radial-gradient(120% 55% at 0% 100%, rgba(0,194,184,.10) 0%, rgba(0,194,184,0) 60%),
    linear-gradient(180deg, #0E1B3D 0%, #0A1228 100%); }
.sidebar .brand { padding: 4px 6px 0; margin-bottom: 22px; }

/* ---- Wordmark "moura one" ---- */
.logo-mo { font-family: var(--display-soft); font-weight: 800; font-size: 26px; line-height: 1;
  letter-spacing: -.02em; display: inline-flex; align-items: baseline; }
.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); }
/* Só a lista de navegação rola (internamente); marca, busca e rodapé ficam fixos.
   Barra de rolagem fina e discreta, exibida apenas quando os itens não cabem. */
.sidebar nav { display: flex; flex-direction: column; gap: 2px;
  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: 6px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.30); }
/* Com a nav ocupando o espaço flexível, o spacer antigo deixa de ser necessário. */
.sidebar .spacer { display: none; }
.sidebar nav a { position: relative; color: #c2cde6; text-decoration: none; padding: 10px 13px; border-radius: 9px;
  font-weight: 500; font-size: 14px; transition: background .14s, color .14s; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
/* Item ativo = "canal ao vivo": fundo turquesa translúcido + barra à esquerda */
.sidebar nav a.active { color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(0,194,184,.20) 0%, rgba(0,194,184,.05) 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 { flex: 1; }
.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: 34px 44px; max-width: 1200px; min-width: 0; animation: pageRise .32s ease both; }
@keyframes pageRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 27px; letter-spacing: -.025em; }
/* Eyebrow — sobrescreve a seção; o ponto turquesa marca o módulo atual */
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display);
  text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 600;
  color: var(--cyan); margin-bottom: 7px; }
.eyebrow::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px rgba(0,194,184,.8); }

/* 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 18px 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow-xs);
  transition: transform .16s ease, box-shadow .16s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.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); }
.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: 34px; font-weight: 700; color: var(--navy); line-height: 1; letter-spacing: -.03em; }
.stat .l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 9px;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Tabela */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-soft); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-xs); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; font-family: var(--display); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); padding: 14px 16px; background: #fbfcfe;
  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 { transition: background .12s ease; }
tbody tr:hover { background: var(--off-white); }
.row-name { font-weight: 600; color: var(--charcoal); }

/* 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; box-shadow: var(--shadow-xs); }
.seg button { border: none; background: none; padding: 9px 15px; font-family: var(--body); font-weight: 600;
  font-size: 13px; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.seg button:hover { color: var(--navy); background: var(--off-white); }
.seg button.active { background: var(--navy); color: #fff; }
.seg button.active:hover { background: var(--navy-deep); 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-xs); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gray); }
.event-card .cover { height: 132px; background: var(--navy) center/cover no-repeat; position: relative; }
.event-card .cover::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,18,40,0) 40%, rgba(10,18,40,.45) 100%); }
.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(10,18,40,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; animation: fadeIn .16s ease both; }
.modal { background: var(--white); border-radius: var(--radius); padding: 26px; max-width: 360px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg); animation: modalPop .2s cubic-bezier(.16,1,.3,1) both; }
.modal img { margin: 16px auto; width: 220px; height: 220px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* 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.05fr 1fr; }
.login-aside { position: relative; overflow: hidden; color: #fff; padding: 56px 52px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(0,194,184,.22) 0%, rgba(0,194,184,0) 55%),
    linear-gradient(155deg, #0E1B3D 0%, #0A1228 100%); }
/* Textura de "painel de operação" — grade fina turquesa atrás do conteúdo */
.login-aside::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(120% 80% at 100% 0%, #000 30%, transparent 80%); }
.login-aside > * { position: relative; }
.login-aside .logo-mo { font-size: 34px; }
.login-aside .accent-rule { width: 56px; height: 4px; border-radius: 4px; background: var(--cyan); margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(0,194,184,.7); }
.login-aside h2 { font-size: 34px; line-height: 1.18; margin-top: 40px; max-width: 420px; letter-spacing: -.03em; }
.login-aside p { color: #aab8d6; max-width: 380px; font-size: 15px; }
/* Linha de status — ancora a tela no mundo do produto (operação ao vivo) */
.login-status { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  font-size: 12.5px; color: #cdd8f0; font-family: var(--display); letter-spacing: .04em; }
.login-status .live { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0,194,184,.6); animation: livePulse 2.4s ease-in-out infinite; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form { width: 100%; max-width: 348px; }
.login-form .eyebrow { margin-bottom: 10px; }
.login-form h1 { font-size: 24px; margin-bottom: 4px; letter-spacing: -.02em; }
.login-form .sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.error-msg { background: #fdecec; color: #b42318; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px; border: 1px solid #f7c9c4; }

/* ============================================================
   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; }
  .btn-sm { min-height: 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; }

  /* No card mobile o e-mail aparece por inteiro (sem truncar). */
  .cell-email { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  /* Menu de ações ocupa a largura do card no mobile. */
  table.cards tbody td.cell-actions .row-menu-btn { width: 100%; }

  /* 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: uma coluna, oculta o painel lateral */
  .login-page { display: block; }
  .login-aside { display: none; }
  .login-form-wrap { padding: 32px 20px; min-height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: 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 — um convite à ação, não um beco sem saída ---- */
.empty-state { text-align: center; padding: 52px 24px; color: var(--muted); }
.empty-state .ico { font-size: 38px; margin-bottom: 12px; opacity: .9;
  display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px;
  border-radius: 50%; background: var(--gray-soft); }
.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 ---- */
#timelineList .tl-day { font-family:var(--display); font-weight:600; font-size:13px; color:var(--navy); margin:18px 0 8px; }
#timelineList .tl-item { display:flex; gap:12px; padding:8px 0; position:relative; }
#timelineList .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; }
#timelineList .tl-body { flex:1; min-width:0; }
#timelineList .tl-text { font-size:14px; }
#timelineList .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: background .14s, border-color .14s, transform .14s; padding: 0; }
.icon-btn:hover { background: var(--off-white); border-color: var(--navy); transform: translateY(-1px); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.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; }

/* ── Menu de ações por linha (⋯) — evita estourar a tabela com muitos botões ── */
.row-menu-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--gray-soft);
  background: var(--white); color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: background .12s, color .12s, border-color .12s; }
.row-menu-btn:hover { background: var(--off-white); color: var(--navy); border-color: var(--gray); }
.row-menu { position: fixed; z-index: 80; min-width: 184px; background: var(--white);
  border: 1px solid var(--gray-soft); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; }
.row-menu.hidden { display: none; }
.row-menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: none; padding: 9px 11px; border-radius: 7px; font-size: 13.5px;
  color: var(--charcoal); cursor: pointer; font-family: var(--body); white-space: nowrap; }
.row-menu button:hover { background: var(--off-white); }
.row-menu button.danger { color: var(--danger); }
.row-menu button.warn { color: #b07f00; }
.row-menu-sep { height: 1px; background: var(--gray-soft); margin: 5px 6px; }

/* E-mail em tabela: trunca com elipse em vez de quebrar caractere a caractere. */
.cell-email { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════ Atividades / Auditoria ════════ */
.act-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.act-card { background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow-xs); }
.act-card .n { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; }
.act-card .l { font-size: 12px; color: var(--muted); margin-top: 5px; }

.act-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.act-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.act-chip { border: 1px solid var(--gray-soft); background: var(--white); color: var(--muted); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; transition: background .12s, color .12s, border-color .12s; }
.act-chip:hover { border-color: var(--gray); color: var(--navy); }
.act-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.act-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.act-filterbar .search { flex: 1; min-width: 220px; }
.act-dates { display: flex; gap: 8px; align-items: center; }
.act-dates input { width: 150px; }

.timeline { position: relative; }
.tl-day { font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--navy); text-transform: capitalize;
  margin: 24px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--gray-soft); }
.tl-day:first-child { margin-top: 4px; }
.tl-item { display: grid; grid-template-columns: 50px 16px 1fr; gap: 10px; align-items: stretch; }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 11px; text-align: right; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gray-soft); }
.tl-item:last-child .tl-rail::before { bottom: auto; height: 16px; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06); margin-top: 11px; z-index: 1; }
.tl-card { background: var(--white); border: 1px solid var(--gray-soft); border-left-width: 3px; border-radius: 10px;
  padding: 10px 13px; margin-bottom: 8px; cursor: pointer; transition: background .12s, box-shadow .12s; }
.tl-card:hover { background: var(--off-white); box-shadow: var(--shadow-xs); }
.tl-line { font-size: 14px; color: var(--charcoal); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.4; }
.tl-cat-ico { font-size: 14px; }
.tl-ev { display: inline-flex; align-items: center; gap: 4px; background: var(--cyan-soft); color: #0a7c84;
  border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; text-decoration: none; }
.tl-ev:hover { text-decoration: underline; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tl-badge { background: var(--gray-soft); border-radius: 5px; padding: 1px 7px; font-weight: 600; }
.tl-arrow { color: var(--navy); font-weight: 700; padding: 0 3px; }
.audit-line .tl-arrow { color: var(--navy); }

@media (max-width: 767px) {
  .tl-item { grid-template-columns: 42px 14px 1fr; gap: 7px; }
  .act-dates input { width: 130px; }
}
.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: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  vertical-align: middle; }
.nav-badge.hidden { display: none; }

/* ---- Grupo colapsável tipo nav-item (ex.: Sistema/Admin) ---- */
.sidebar nav details.nav-admin { border: none; display: block; }
.sidebar nav details.nav-admin > summary {
  list-style: none; position: relative;
  color: #c2cde6; font-size: 14px; font-weight: 500;
  padding: 10px 13px; border-radius: 9px;
  cursor: pointer; user-select: none;
  display: flex; align-items: center;
  transition: background .14s, color .14s;
}
.sidebar nav details.nav-admin > summary::-webkit-details-marker { display: none; }
.sidebar nav details.nav-admin > summary::marker { content: ''; }
.sidebar nav details.nav-admin > summary::after {
  content: '›'; margin-left: auto; font-size: 16px; font-weight: 300;
  transition: transform .2s; color: rgba(255,255,255,.35);
}
.sidebar nav details.nav-admin[open] > summary::after { transform: rotate(90deg); }
.sidebar nav details.nav-admin > summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav details.nav-admin > summary.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(0,194,184,.20) 0%, rgba(0,194,184,.05) 100%);
}
.sidebar nav details.nav-admin > summary.active::before {
  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 nav details.nav-admin > a { display: block; padding: 8px 13px 8px 26px; font-size: 13px; }
@media (max-width: 768px) { .sidebar nav details.nav-admin > a { font-size: 14px; padding: 12px 14px 12px 30px; } }

/* ---- Grupo colapsável na sidebar (Portal do Expositor) ---- */
.sidebar nav details.nav-group { border: none; }
.sidebar nav details.nav-group > summary {
  list-style: none;
  color: rgba(255,255,255,.35);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 18px 13px 5px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  transition: color .14s;
}
.sidebar nav details.nav-group > summary::-webkit-details-marker { display: none; }
.sidebar nav details.nav-group > summary::marker { content: ''; }
.sidebar nav details.nav-group > summary::after {
  content: '›';
  margin-left: auto;
  font-size: 15px;
  font-weight: 300;
  transition: transform .2s;
  color: rgba(255,255,255,.2);
}
.sidebar nav details.nav-group[open] > summary::after { transform: rotate(90deg); }
.sidebar nav details.nav-group > summary:hover { color: rgba(255,255,255,.6); }
.sidebar nav details.nav-group > a { padding-left: 22px; }

/* ---- 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;
  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;
  font-size: 20px; line-height: 1; padding: 6px; border-radius: 8px; color: var(--navy);
  transition: background .15s; }
.notif-bell:hover { background: var(--off-white); }
/* 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); }
.topbar .notif-bell { margin-left: 6px; }
/* 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: var(--danger); 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); }

/* Seletor rápido de responsáveis (tarefas e prazos): chips clicáveis. */
.resp-picker { display: flex; flex-wrap: wrap; gap: 7px; max-height: 132px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--gray-soft); border-radius: 10px; background: var(--off-white); }
.resp-pick { border: 1px solid var(--gray-soft); background: var(--white); color: var(--muted);
  border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--body);
  transition: background .12s, color .12s, border-color .12s; }
.resp-pick:hover { border-color: var(--cyan); color: var(--navy); }
.resp-pick.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.resp-pick.on::before { content: '✓'; font-size: 11px; }
.resp-picker-empty { font-size: 12.5px; color: var(--muted); padding: 6px 4px; }
/* Chip de responsável dentro dos boxes de tarefa/prazo. */
.resp-chip { display: inline-flex; align-items: center; gap: 3px; background: var(--cyan-soft); color: #0a7c84;
  border-radius: 99px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; }

/* 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; }
.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); }
/* 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; } }

/* ============================================================
   Lista de Eventos — modo cards (boxes) + toggle de visualização
   ============================================================ */
.view-toggle { display: flex; border: 1px solid var(--gray); border-radius: 7px; overflow: hidden; }
.view-btn { background: none; border: none; padding: 5px 10px; cursor: pointer; font-size: 16px;
  color: var(--muted); transition: background .12s, color .12s; }
.view-btn.active { background: var(--navy); color: #fff; }
.view-btn:hover:not(.active) { background: var(--gray-soft); }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.event-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px;
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius);
  border-left: 4px solid var(--cyan); text-decoration: none; color: inherit;
  transition: box-shadow .15s, transform .12s; }
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.event-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.event-card-name { font-size: 15px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.event-card-sub  { font-size: 12.5px; color: var(--muted); }
.event-card-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.event-card-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--gray-soft); font-size: 12.5px; color: var(--muted); }
.event-card-cta { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--cyan); white-space: nowrap; }
@media (max-width: 767px) { .events-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Prazos — widget compacto + aba completa
   ============================================================ */
.pz-widget { border-radius: var(--radius); overflow: hidden; }
.pz-widget-head { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--navy); color: #fff; }
.pz-widget-title { font-size: 14px; font-weight: 700; }
.pz-widget-link { font-size: 12px; color: rgba(255,255,255,.75); text-decoration: none;
  cursor: pointer; background: none; border: none; padding: 0; }
.pz-widget-link:hover { color: #fff; text-decoration: underline; }
.pz-widget-body { background: #fff; border: 1px solid var(--gray-soft);
  border-top: none; }
.pz-widget-empty { padding: 18px 16px; color: var(--muted); font-size: 13px; text-align: center; }
/* Botão de adicionar — largura total, na base do widget, bem visível */
.pz-widget-add { display: block; width: 100%; padding: 12px 16px; border: 1px solid var(--gray-soft);
  border-top: none; border-radius: 0 0 var(--radius) var(--radius); background: var(--off-white);
  color: var(--navy); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .14s ease, color .14s ease; }
.pz-widget-add:hover { background: var(--navy); color: #fff; }

/* Item de prazo (widget e aba) */
.pz-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--gray-soft); transition: background .1s; }
.pz-item:last-child { border-bottom: none; }
.pz-item:hover { background: var(--off-white); }
.pz-item.pz-done { opacity: .52; }
.pz-item.pz-done .pz-title { text-decoration: line-through; color: var(--muted); }
.pz-urgency { width: 5px; align-self: stretch; min-height: 32px; border-radius: 99px; flex: none; }
.pz-urgency.urg-overdue { background: var(--danger); }
.pz-urgency.urg-today   { background: #f97316; }
.pz-urgency.urg-soon    { background: #eab308; }
.pz-urgency.urg-week    { background: var(--cyan); }
.pz-urgency.urg-future  { background: #22c55e; }
.pz-urgency.urg-done    { background: var(--gray); }
.pz-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--cyan); flex: none; }
.pz-body { flex: 1; min-width: 0; }
.pz-title { font-size: 14px; font-weight: 600; color: var(--charcoal); line-height: 1.3; }
.pz-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.pz-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px;
  font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.pz-chip.urg-overdue { background: #fee2e2; color: #b91c1c; }
.pz-chip.urg-today   { background: #ffedd5; color: #c2410c; }
.pz-chip.urg-soon    { background: #fef9c3; color: #854d0e; }
.pz-chip.urg-week    { background: #cffafe; color: #0e7490; }
.pz-chip.urg-future  { background: #dcfce7; color: #15803d; }
.pz-chip.urg-done    { background: var(--gray-soft); color: var(--muted); }
.pz-desc { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 400px; }
.pz-actions { display: flex; gap: 4px; flex: none; }
.pz-btn { background: none; border: none; cursor: pointer; padding: 4px 7px;
  border-radius: 7px; font-size: 14px; color: var(--muted); line-height: 1;
  transition: background .1s, color .1s; }
.pz-btn:hover { background: var(--gray-soft); color: var(--navy); }
.pz-btn.danger:hover { background: #fee2e2; color: var(--danger); }

/* Separador de grupo (Pendentes / Concluídos) */
.pz-group-sep { padding: 8px 14px; background: var(--off-white); font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--gray-soft); }
.pz-group-sep:first-child { border-top: none; }
.pz-group-toggle { font-size: 10px; transition: transform .2s; }
.pz-group-toggle.open { transform: rotate(90deg); }

/* ============================================================
   Visão Geral — layout duas colunas (card + widget de prazos)
   ============================================================ */
.ov-layout { display: grid; grid-template-columns: minmax(0, 680px) 300px; gap: 20px; align-items: start; }
.ov-main { min-width: 0; }
@media (max-width: 1080px) { .ov-layout { grid-template-columns: 1fr; } }

/* Transição suave ao marcar prazo como concluído */
.pz-item.pz-fading { transition: opacity 4s ease; opacity: .35; }

/* ============================================================
   Portal do Expositor — sub-nav horizontal
   ============================================================ */
.portal-subnav {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--gray-soft);
  margin-bottom: 24px;
}
.portal-subnav a {
  font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 6px 14px; border-radius: 20px; transition: background .14s, color .14s;
}
.portal-subnav a:hover { background: var(--gray-soft); color: var(--charcoal); }
.portal-subnav a.active {
  background: var(--navy); color: #fff;
}

/* ============================================================
   Responsáveis — cards interativos
   ============================================================ */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.team-card { background: var(--white); border: 1px solid var(--gray-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.team-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.team-avatar { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-destaque); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 16px; flex: none; }
.team-name { font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--charcoal); }
.team-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.team-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--gray-soft); }
.team-stat {
  background: none; border: none; border-right: 1px solid var(--gray-soft);
  padding: 11px 8px; cursor: pointer; text-align: center;
  transition: background .14s, color .14s; line-height: 1;
}
.team-stat:last-child { border-right: none; }
.team-stat:hover { background: var(--off-white); }
.team-stat.open { background: var(--navy); }
.ts-n { font-size: 16px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.ts-n.sm { font-size: 11px; }
.ts-n.red { color: var(--danger); }
.team-stat.open .ts-n { color: #fff; }
.team-stat.open .ts-n.red { color: #fca5a5; }
.ts-l { font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.team-stat.open .ts-l { color: rgba(255,255,255,.65); }
.team-detail { border-top: 1px solid var(--gray-soft); }
.td-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; background: var(--off-white);
  border-bottom: 1px solid var(--gray-soft);
  font-size: 12.5px; font-weight: 600; color: var(--navy);
}
.td-close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.td-close:hover { background: var(--gray-soft); color: var(--charcoal); }
.td-list { max-height: 260px; overflow-y: auto; }
.td-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--gray-soft); text-decoration: none; color: inherit;
  transition: background .12s;
}
.td-row:last-child { border-bottom: none; }
.td-row:hover { background: var(--off-white); }
.td-row.overdue { border-left: 3px solid var(--danger); padding-left: 11px; }
.td-row-main { min-width: 0; flex: 1; }
.td-row-title { font-size: 13px; font-weight: 500; color: var(--charcoal); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.td-row-warn { color: var(--danger); font-weight: 600; }
.td-empty { padding: 16px 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* ============================================================
   Clientes — tabs de filtro
   ============================================================ */
.cf-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.cf-tab {
  background: none; border: 1px solid var(--gray-soft); border-radius: 20px;
  padding: 6px 16px; font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all .14s;
}
.cf-tab:hover { border-color: var(--navy); color: var(--navy); }
.cf-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cd-section { padding: 10px 18px 6px; }
.cd-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.cd-ev {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--gray-soft); text-decoration: none; color: inherit;
}
.cd-ev:last-child { border-bottom: none; }
.cd-ev:hover .cd-ev-name { color: var(--navy); text-decoration: underline; }
.cd-ev-name { font-size: 13.5px; font-weight: 500; flex: 1; }
.cd-ev-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.client-stats { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.cs-active { color: #15803d; font-weight: 600; }

/* ============================================================
   Fornecedores — category pills + sort
   ============================================================ */
.cat-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-pill {
  background: var(--white); border: 1px solid var(--gray-soft); border-radius: 20px;
  padding: 5px 14px; font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all .14s; white-space: nowrap;
}
.cat-pill:hover { border-color: var(--navy); color: var(--navy); }
.cat-pill.active { border-color: transparent; color: #fff; }
.sup-count { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--navy); }
th.sortable .sort-ico { font-size: 10px; margin-left: 4px; color: var(--muted); }
th.sortable.asc .sort-ico::after { content: '▲'; }
th.sortable.desc .sort-ico::after { content: '▼'; }
th.sortable:not(.asc):not(.desc) .sort-ico::after { content: '⇅'; }

/* ============================================================
   Recursos de IA (análise do evento, riscos, fornecedores)
   ============================================================ */
.ai-card { border-left: 4px solid var(--cyan); }
.ai-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-card-title { font-size: 16px; font-weight: 600; color: var(--navy); }
.ai-sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 16px 0 8px; }
.ai-sub:first-child { margin-top: 0; }
.ai-risk { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.5;
  padding: 8px 11px; border-radius: 9px; margin-bottom: 6px; background: var(--off-white); }
.ai-risk-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.ai-risk-alto  { background: #fef2f2; } .ai-risk-alto  .ai-risk-dot { background: var(--danger); }
.ai-risk-medio { background: #fffbeb; } .ai-risk-medio .ai-risk-dot { background: var(--warn); }
.ai-risk-baixo { background: var(--off-white); } .ai-risk-baixo .ai-risk-dot { background: var(--muted); }
.ai-recs { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--charcoal); }
.ai-recs li { margin-bottom: 4px; }
.ai-gaps { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-gap { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 5px 12px;
  border-radius: 99px; background: var(--cyan-soft); color: #0a7d77; cursor: default; }
