/* ============================================================
   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; }
/* Evita rolagem horizontal acidental (tooltips/cards que vazam alguns px da
   viewport no mobile). overflow-x:hidden no <html> tem suporte universal
   (inclusive Safari iOS antigo) e mantém a topbar position:sticky funcionando,
   pois o <html> continua sendo o container de rolagem. NÃO aplicar no <body>
   para não transformar o body em scroll container e quebrar o sticky. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
/* Comporta como app nativo: sem zoom por toque-duplo (o viewport já bloqueia pinça/+/-). */
html, body { touch-action: manipulation; }
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%); }
.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; text-decoration: none; }
.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; }
.sidebar .brand { padding: 4px 6px 0; margin-bottom: 22px; }
.sidebar .logo-mo { font-size: 21px; }
.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); }
.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; }
.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); }
.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 { 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; 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; }

/* 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%); }
.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 { height: 32px; width: auto; filter: brightness(0) invert(1); display: block; margin-bottom: 0; }
.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; }
.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; }
@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); } }
.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; }
.rsvp-footer .footer-links { margin: 10px 0; font-size: 12px; line-height: 1.8; }
.rsvp-footer .footer-links a { color: var(--navy); text-decoration: none; }
.rsvp-footer .footer-links a:hover { text-decoration: underline; }

/* Consentimento LGPD no formulário de inscrição */
.consent-box { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 2px; }
.consent-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--charcoal); cursor: pointer; }
.consent-item input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--cyan); }
.consent-item a { color: var(--navy); font-weight: 600; }

/* ============================================================
   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-mo { font-size: 20px; }
  .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); }
  .sidebar .brand { margin-bottom: 24px; max-width: 180px; }
  .sidebar nav { flex-direction: column; }
  .sidebar nav a { padding: 14px 14px; font-size: 15px; } /* alvo de toque */
  .sidebar .spacer { display: block; flex: 1; }
  .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; }

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

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

/* ---- 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: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  vertical-align: middle; }
.nav-badge.hidden { display: none; }

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

/* ---- Separador no nav do sidebar (acesso rápido a outras plataformas) ---- */
.nav-sep { border-top: 1px solid rgba(255,255,255,.1); margin: 6px 0; }

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

/* ---- Lixeira (soft-delete) ---- */
.trash-summary { display: flex; align-items: center; gap: 12px; background: var(--white);
  border: 1px solid var(--gray); border-radius: var(--radius-sm); padding: 14px 18px; }
.trash-summary-ico { font-size: 22px; line-height: 1; }
.trash-days { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--cyan-soft); color: #0f8a93; white-space: nowrap; }
.trash-days-soon { background: #f7ebe7; color: var(--danger); }

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

/* ════════════════════════════════════════════════════════════════════════════
   MAPA VISUAL DE MESAS (admin event-detail)
   Visão gráfica das mesas: cartões coloridos por ocupação.
   ════════════════════════════════════════════════════════════════════════════ */
/* Selo de origem (Moura One) + código de referência no cabeçalho do evento */
.origin-selo { display: inline-block; font-size: 10px; font-weight: 800; background: var(--navy);
  color: #fff; padding: 2px 8px; border-radius: 6px; letter-spacing: .03em; vertical-align: middle; }
.origin-ref { display: inline-block; font-size: 11px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef0f4; color: #4a5673; padding: 2px 7px; border-radius: 6px; letter-spacing: .04em; vertical-align: middle; }

.mesa-map { margin-bottom: 28px; }
.mesa-map.hidden { display: none; }
.mesa-map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mesa-map-head h2 { font-size: 18px; margin: 0; }
.mesa-kpis { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mesa-kpis .mk { font-size: 13px; color: var(--muted); }
.mesa-kpis .mk b { color: var(--navy); font-variant-numeric: tabular-nums; }
.mesa-kpis .mk.over b { color: var(--danger); }

.mesa-warn { background: #fcecea; color: var(--danger); border: 1px solid #f0c7bf;
  border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }

.mesa-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.mesa-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mesa-legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.mesa-legend .lg.free { background: #2bb673; }
.mesa-legend .lg.near { background: #e6a700; }
.mesa-legend .lg.over { background: var(--danger); }

.mesa-drag-hint { font-size: 11.5px; color: #127a83; font-style: italic; }

.mesa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* Zona de drop — div que envolve o cartão */
.mesa-drop { border-radius: 14px; transition: outline .1s; }
.mesa-drop.mesa-drop-over { outline: 2px dashed var(--cyan); outline-offset: 2px; }

/* Cartão visual (agora é um <div>, o botão fica dentro) */
.mesa-card { border: 1px solid var(--gray); border-radius: 14px; background: #fff;
  transition: transform .12s, box-shadow .12s, border-color .12s; overflow: hidden; }
.mesa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow, 0 6px 18px rgba(0,0,0,.08)); }
.mesa-card.tone-free { border-left: 5px solid #2bb673; }
.mesa-card.tone-near { border-left: 5px solid #e6a700; background: #fdfaf0; }
.mesa-card.tone-over { border-left: 5px solid var(--danger); background: #fcecea; }
.mesa-card.tone-na   { border-style: dashed; }
/* Botão interno (clicável) — herda tamanho do cartão */
.mesa-card .mc-inner { display: block; width: 100%; text-align: left; padding: 13px;
  background: none; border: none; cursor: pointer; font: inherit; }
.mesa-card .mc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.mesa-card .mc-name { font-weight: 700; font-size: 14px; color: var(--navy); }
.mesa-card .mc-flag { font-size: 9px; font-weight: 800; background: var(--danger); color: #fff;
  padding: 2px 6px; border-radius: 5px; letter-spacing: .04em; }
.mesa-card .mc-count { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--charcoal, #28282A); }
.mesa-card .mc-count span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mesa-card .mc-count.over { color: var(--danger); }
.mesa-card .mc-seats { display: flex; flex-wrap: wrap; gap: 3px; margin: 9px 0 7px; }
.mesa-card .mseat { width: 9px; height: 9px; border-radius: 50%; background: #d9e6df; display: inline-block; }
.mesa-card .mseat.occ { background: #2bb673; }
.mesa-card .mseat.over { background: var(--danger); }
.mesa-card .mseat-more { font-size: 10px; color: var(--muted); font-weight: 700; align-self: center; }
.mesa-card .mc-na { font-size: 11px; color: var(--muted); font-style: italic; margin: 9px 0 7px; }
.mesa-card .mc-foot { font-size: 11.5px; color: #127a83; font-weight: 600; }

/* Detalhe de uma mesa (modal) */
.mesa-guest-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.mesa-guest { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--gray); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.mesa-guest.present { border-color: #bfe6cf; background: #f3fbf6; }
.mesa-guest.draggable-guest { cursor: grab; }
.mesa-guest.draggable-guest:active { cursor: grabbing; opacity: .7; }
.mesa-guest .mg-name { font-weight: 600; color: var(--charcoal, #28282A); }
.mesa-guest .mg-co { color: var(--muted); font-weight: 400; }
.mesa-guest .mg-tag { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mesa-guest.present .mg-tag { color: #1f9d63; }
.mesa-guest .mg-mv { padding: 4px 8px; font-size: 11.5px; }

/* Configuração de mesas (modal) */
.mc-gen-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 4px; }
.mc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--gray-soft); border-radius: 10px; background: var(--off-white); }
.mc-row-name { font-weight: 600; font-size: 14px; color: var(--navy); }
.mc-add-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.mc-add-row input { flex: 1; min-width: 100px; }

@media (max-width: 560px) {
  .mesa-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
