/* =====================================================================
   Anfitriãs | Gestão de Equipe
   Identidade: azul-marinho + dourado sobre marfim. Mobile first.
   ===================================================================== */
:root {
  --navy: #0D1B3D;
  --navy-2: #1B2B55;
  --gold: #C4973D;
  --gold-2: #E2C68E;
  --gold-soft: #F6EEDC;
  --ivory: #FAF7F2;
  --paper: #FFFFFF;
  --blush: #F5E9E4;
  --ink: #1C2235;
  --muted: #6B7185;
  --line: #ECE6DC;
  --ok: #2F7D5B;      --ok-bg: #E6F3EC;
  --warn: #B7791F;    --warn-bg: #FBF1DE;
  --danger: #B5434B;  --danger-bg: #FBE8E9;
  --info: #2E5AAC;    --info-bg: #E7EEFA;
  --draft: #7A6FA8;   --draft-bg: #EEEBF7;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(13,27,61,.04), 0 8px 24px rgba(13,27,61,.06);
  --shadow-lg: 0 12px 40px rgba(13,27,61,.14);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--ivory); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--navy); }
h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.2px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 23px; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 .6em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.script { font-family: var(--script); font-weight: 400; }
.ico { width: 20px; height: 20px; flex: none; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 26px; height: 26px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mt-l { margin-top: 28px; }
.mb { margin-bottom: 16px; } .mb-s { margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------------
   Estrutura
   --------------------------------------------------------------------- */
.app { min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(250,247,242,.92); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--navy); }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand-text { line-height: 1.05; min-width: 0; }
.brand-text b { font-family: var(--script); font-weight: 400; font-size: 25px; color: var(--navy); display: block; }
.brand-text span { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--navy); box-shadow: var(--shadow); cursor: pointer;
}
.icon-btn:hover { color: var(--gold); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--gold); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }

.main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px 16px 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 18px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Navegação inferior (celular) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(13,27,61,.06);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: #8C90A0; letter-spacing: .02em; position: relative;
}
.bottom-nav a .ico { width: 23px; height: 23px; }
.bottom-nav a.on { color: var(--navy); }
.bottom-nav a.on::before {
  content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold);
}

/* Barra lateral (desktop) */
.sidebar { display: none; }

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 252px 1fr; padding-bottom: 0; }
  .bottom-nav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--navy); color: #fff; padding: 22px 14px;
  }
  .sidebar .brand { color: #fff; padding: 0 8px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
  .sidebar .brand-text b { color: #fff; }
  .sidebar .brand img { width: 46px; height: 46px; }
  .side-group { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.4); margin: 16px 10px 6px; }
  .sidebar a.side-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.78);
    font-size: 14px; font-weight: 500;
  }
  .sidebar a.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
  .sidebar a.side-link.on { background: rgba(196,151,61,.16); color: var(--gold-2); }
  .sidebar .side-foot { margin-top: auto; padding-top: 16px; }
  .topbar .brand { display: none; }
  .topbar { padding: 14px 28px; }
  .main { padding: 8px 28px 40px; }
  .hide-desk { display: none !important; }
}
@media (max-width: 1023px) { .hide-mobile { display: none !important; } }

/* ---------------------------------------------------------------------
   Componentes
   --------------------------------------------------------------------- */
.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  border: 1px solid rgba(236,230,220,.6);
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-link { display: block; color: inherit; transition: transform .15s, box-shadow .15s; }
.card-link:hover { color: inherit; transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
  .lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Hero (próximo evento) */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #24386E 0%, var(--navy) 55%);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1.5px solid rgba(196,151,61,.45);
}
.hero::before {
  content: ''; position: absolute; right: -20px; top: -90px; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
}
.hero.has-cover { background-size: cover; background-position: center; }
.hero.has-cover .hero-in { position: relative; z-index: 1; }
.hero .eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; }
.hero h2 { color: #fff; font-size: 27px; margin: 6px 0 4px; position: relative; z-index: 1; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: rgba(255,255,255,.78); position: relative; z-index: 1; }
.hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px 14px; }
.hero-stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; color: #fff; }
.hero-stat span { font-size: 11.5px; color: rgba(255,255,255,.72); }
.hero-stat.warn b { color: var(--gold-2); }
.hero .row { position: relative; z-index: 1; }

/* Indicadores */
.stat { display: flex; align-items: center; gap: 12px; }
.stat-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--navy); font-weight: 600; }
.stat span { font-size: 12px; color: var(--muted); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font: 600 14px var(--font); letter-spacing: .01em;
  cursor: pointer; background: var(--navy); color: #fff; transition: transform .1s, background .15s, box-shadow .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #AE8331; color: #fff; }
.btn-ghost { background: var(--paper); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--gold-soft); color: var(--navy); border-color: var(--gold-2); }
.btn-soft { background: var(--gold-soft); color: var(--navy); }
.btn-soft:hover { background: #EFE2C6; color: var(--navy); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #276A4D; color: #fff; }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #178C46; color: #fff; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 12.5px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 11.5px; gap: 5px; }
.btn-xs .ico { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 15px; padding: 0 24px; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; border-radius: 50%; }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 45; width: 56px; height: 56px;
  border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.fab:hover { color: #fff; background: #AE8331; }
.fab .ico { width: 26px; height: 26px; }
@media (min-width: 1024px) { .fab { bottom: 28px; right: 28px; } }

/* Formulários */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 13px; border: 1.5px solid var(--line);
  background: #fff; font: 15px var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7185' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(196,151,61,.15); }
.input-sm { min-height: 38px; padding: 7px 12px; font-size: 14px; border-radius: 11px; }
.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 719px) { .form-actions .btn { flex: 1; } }

/* Checkbox / opções em cartão */
.choice {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s; user-select: none;
}
.choice + .choice { margin-top: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box {
  width: 24px; height: 24px; border-radius: 8px; border: 1.8px solid #CFC6B6; display: grid; place-items: center; flex: none;
  color: transparent; transition: all .15s;
}
.choice .box .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.choice:has(input:checked) { border-color: var(--gold); background: #FFFBF3; }
.choice:has(input:checked) .box { background: var(--gold); border-color: var(--gold); color: #fff; }
.choice .ctext { flex: 1; min-width: 0; }
.choice .ctext b { display: block; font-weight: 600; color: var(--navy); }
.choice .ctext small { color: var(--muted); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(196,151,61,.2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 500; cursor: pointer;
}
.chip-check input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(196,151,61,.3); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 44px; height: 26px; border-radius: 13px; background: #D8D2C6; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }

/* Badges / status */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: #F1EEE8; color: var(--muted); white-space: nowrap;
}
.badge .ico { width: 13px; height: 13px; }
.b-ok, .b-confirmada, .b-presente, .b-disponivel, .b-ativa, .b-ativo { background: var(--ok-bg); color: var(--ok); }
.b-warn, .b-aguardando, .b-atrasada, .b-planejamento { background: var(--warn-bg); color: var(--warn); }
.b-danger, .b-recusada, .b-ausente, .b-cancelado, .b-urgente { background: var(--danger-bg); color: var(--danger); }
.b-info, .b-escalada { background: var(--info-bg); color: var(--info); }
.b-rascunho, .b-sugerida { background: var(--draft-bg); color: var(--draft); }
.b-gold, .b-atencao { background: var(--gold-soft); color: #8E6A22; }
.b-inativa, .b-encerrado, .b-indisponivel, .b-sem_resposta { background: #F1EEE8; color: var(--muted); }
.b-navy { background: var(--navy); color: #fff; }

/* Avatares */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-soft), #EFDDB8); color: #8E6A22; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 2px #fff;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 4px #fff, var(--shadow); }
.avatar-xl { width: 108px; height: 108px; font-size: 34px; box-shadow: 0 0 0 4px #fff, var(--shadow); }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow b { display: block; font-weight: 600; color: var(--navy); }
.list-item .grow small { color: var(--muted); }
a.list-item { color: inherit; }
a.list-item:hover { color: inherit; background: #FFFCF6; }
.card.pad-0 .list-item { padding: 13px 18px; }

/* Abas e segmentos */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--muted); background: var(--paper); border: 1px solid var(--line);
}
.tab:hover { color: var(--navy); }
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab .count { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 9px; padding: 0 6px; }
.tab.on .count { background: rgba(255,255,255,.2); }

/* Alertas */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; }
.alert + .alert { margin-top: 8px; }
.alert .ico { margin-top: 1px; }
.alert-warn { background: var(--warn-bg); color: #7A5214; }
.alert-danger { background: var(--danger-bg); color: #8A2E35; }
.alert-ok { background: var(--ok-bg); color: #1F5A40; }
.alert-info { background: var(--info-bg); color: #24477F; }

/* Toasts */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); top: 14px; width: min(92vw, 420px); display: grid; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--navy);
  color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn .25s ease-out;
}
.toast.error { background: #8A2E35; }
.toast.success .ico { color: #9FE0BF; }
.toast.out { animation: toastOut .25s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* Modal / folha inferior */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(13,27,61,.45); display: none; align-items: flex-end; justify-content: center; }
.modal-back.open { display: flex; animation: fade .2s; }
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--paper); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b)); animation: sheetUp .25s ease-out;
}
.modal::before { content: ''; display: block; width: 42px; height: 4px; border-radius: 2px; background: #DDD6CA; margin: 0 auto 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
@media (min-width: 720px) {
  .modal-back { align-items: center; }
  .modal { border-radius: 24px; padding: 24px; }
  .modal::before { display: none; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } }
@keyframes fade { from { opacity: 0; } }

/* Tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* Matriz da visão geral */
.matrix { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.matrix th, .matrix td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th { position: sticky; top: 0; background: var(--paper); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); font-weight: 700; line-height: 1.25; z-index: 2; }
.matrix .name { position: sticky; left: 0; background: var(--paper); text-align: left; z-index: 1; min-width: 132px; max-width: 160px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); }
.matrix thead .name { z-index: 3; }
.cell { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 700; }
.c-disponivel { background: var(--ok-bg); color: var(--ok); }
.c-indisponivel { background: #F4F1EC; color: #B3AC9F; }
.c-sem_resposta { background: transparent; color: #C9C2B5; }
.c-rascunho { background: var(--draft-bg); color: var(--draft); }
.c-aguardando { background: var(--warn-bg); color: var(--warn); }
.c-confirmada { background: var(--ok); color: #fff; }
.c-recusada { background: var(--danger-bg); color: var(--danger); text-decoration: line-through; }
.c-presente { background: var(--navy); color: #fff; }
.c-atrasada { background: var(--gold); color: #fff; }
.c-ausente { background: var(--danger); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .cell { min-width: 22px; height: 18px; border-radius: 6px; font-size: 9px; }

/* Montagem da escala */
.shift-picker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.shift-picker::-webkit-scrollbar { display: none; }
.shift-pill {
  flex: none; min-width: 108px; padding: 10px 14px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line);
  color: var(--ink); text-align: left; line-height: 1.25;
}
.shift-pill small { display: block; color: var(--muted); font-size: 11px; }
.shift-pill b { display: block; font-size: 13.5px; color: var(--navy); }
.shift-pill .bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.shift-pill .bar i { display: block; height: 100%; background: var(--gold); }
.shift-pill.full .bar i { background: var(--ok); }
.shift-pill.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.shift-pill.on b, .shift-pill.on small { color: #fff; }
.shift-pill.on .bar { background: rgba(255,255,255,.2); }

.fn-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid rgba(236,230,220,.6); }
.fn-head { display: flex; align-items: center; gap: 12px; }
.fn-ico { width: 40px; height: 40px; border-radius: 13px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; }
.fn-head .grow b { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.fn-head .grow small { color: var(--muted); }
.fn-count { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--navy); }
.fn-count.short { color: var(--danger); }
.fn-count.ok { color: var(--ok); }
.people { margin-top: 12px; display: grid; gap: 8px; }
.person {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; background: #FBF9F5; border: 1px solid var(--line);
}
.person .grow b { display: block; font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.2; }
.person .grow small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.person.suggested { border-style: dashed; border-color: #C9BFE6; background: #FAF8FE; }
.person.declined { opacity: .6; }
.person .note { color: var(--warn); }
.slot-empty {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 13px; border: 1.5px dashed #DCD3C3;
  color: var(--muted); font-size: 13px; font-weight: 500; background: transparent; cursor: pointer; width: 100%; font-family: var(--font);
}
.slot-empty:hover { border-color: var(--gold); color: var(--navy); background: #FFFCF6; }

.pick-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pick {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; border: 1px solid var(--line); background: #fff;
  text-align: left; width: 100%; cursor: pointer; font-family: var(--font); color: var(--ink);
}
.pick:hover { border-color: var(--gold); background: #FFFCF6; }
.pick .grow b { display: block; font-size: 14px; color: var(--navy); }
.pick .grow small { display: block; font-size: 11.5px; color: var(--muted); }
.pick.unavailable { opacity: .65; }
.pick .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

.publish-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 30; box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .publish-bar { bottom: 16px; } }

/* Check-in */
.checkin-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checkin-row:last-child { border-bottom: 0; }
.checkin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ck-btn {
  min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 600 12px var(--font);
  color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.ck-btn.on.presente { background: var(--ok); border-color: var(--ok); color: #fff; }
.ck-btn.on.atrasada { background: var(--gold); border-color: var(--gold); color: #fff; }
.ck-btn.on.ausente { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Painel do evento */
.panel-fn { border-left: 4px solid var(--ok); }
.panel-fn.short { border-left-color: var(--danger); }
.panel-fn.partial { border-left-color: var(--gold); }
.meter { height: 8px; border-radius: 4px; background: #F1ECE3; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--ok); transition: width .3s; }
.meter.short i { background: var(--danger); }
.meter.partial i { background: var(--gold); }

/* Área da voluntária */
.greet { margin: 8px 0 18px; }
.greet h1 { font-family: var(--script); font-weight: 400; font-size: 44px; line-height: 1.1; }
.greet p { color: var(--muted); margin: 0; }
.serve-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px; background: var(--paper); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.serve-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--navy), var(--gold)); }
.serve-card .ev { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.serve-card .when { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.1; margin: 8px 0 2px; }
.serve-card .time { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.serve-card .fn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--navy); font-weight: 600; font-size: 14px; }
.menu-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow);
  color: var(--navy); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid rgba(236,230,220,.6);
}
.tile .fn-ico { width: 44px; height: 44px; }
.tile:hover { color: var(--navy); box-shadow: var(--shadow-lg); }

/* Eventos */
.event-card { display: flex; gap: 14px; align-items: stretch; }
.event-date {
  flex: none; width: 62px; border-radius: 16px; background: var(--navy); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 8px 4px; text-align: center;
}
.event-date b { font-family: var(--serif); font-size: 28px; line-height: 1; font-weight: 600; }
.event-date span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.event-cover { height: 150px; border-radius: 18px; background: var(--navy) center/cover; margin-bottom: 14px; }

.day-block { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #FDFBF8; }
.day-block + .day-block { margin-top: 10px; }
.shift-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin-top: 8px; }

.steps { counter-reset: s; display: grid; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.step::before {
  counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-soft); color: #8E6A22; font-weight: 700; font-size: 13px; flex: none;
}
.step.done::before { content: '✓'; background: var(--ok); color: #fff; }
.step .grow b { display: block; font-size: 14px; color: var(--navy); }
.step .grow small { color: var(--muted); }
.step:hover { color: var(--ink); border-color: var(--gold-2); }

/* Tarefas */
.task { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-check {
  width: 26px; height: 26px; border-radius: 9px; border: 1.8px solid #CFC6B6; background: #fff; display: grid; place-items: center;
  color: transparent; cursor: pointer; flex: none; padding: 0;
}
.task-check .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.task.done .task-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.progress-ring { font-family: var(--serif); font-size: 22px; color: var(--navy); font-weight: 600; }

/* Busca */
.search-box { position: relative; }
.search-box .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 42px; border-radius: 999px; }

/* Vazio */
.empty { text-align: center; padding: 36px 18px; color: var(--muted); }
.empty .fn-ico { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 18px; }
.empty .fn-ico .ico { width: 28px; height: 28px; }
.empty b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 4px; }

/* Página pública / login */
.public { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(196,151,61,.14), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(13,27,61,.08), transparent 70%),
    var(--ivory);
}
.public-card { width: 100%; max-width: 420px; }
.public-logo { width: 156px; height: 156px; border-radius: 50%; margin: 0 auto 6px; object-fit: cover; box-shadow: var(--shadow-lg); }
.public .tagline { text-align: center; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 14px 0 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }

/* Notificações */
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.notif:hover { color: inherit; background: #FFFCF6; }
.notif.unread { background: #FFFBF2; }
.notif.unread .grow b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }
.notif .fn-ico { width: 38px; height: 38px; border-radius: 12px; }

/* Mensagem de WhatsApp */
.wa-preview {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; background: #E7F8EC; border-radius: 14px 14px 14px 4px; padding: 12px 14px;
  color: #1B3A26; border: 1px solid #CDEBD6; word-break: break-word;
}

/* Relatório de culto */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.photo-grid:empty { display: none; }
.photo-thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--line); cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(13,27,61,.75); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.photo-rm { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(13,27,61,.7); color: #fff; font-size: 11px; display: flex; gap: 4px; align-items: center; }
.photo-thumb:has(input:checked) img { opacity: .35; }
.report-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.report-line:last-child { border-bottom: 0; }
.issue { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: #FFF8F3; border: 1px solid #F2DCCF; }
.issue + .issue { margin-top: 8px; }
.issue.resolved { background: #F6F9F7; border-color: #DCEAE2; opacity: .8; }
.issue img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; cursor: zoom-in; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--muted); }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(13,27,61,.9); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 90vh; border-radius: 12px; }

.skeleton { background: linear-gradient(90deg, #F2EEE7 25%, #FAF7F2 50%, #F2EEE7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* =====================================================================
   Impressão (A4)
   ===================================================================== */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11pt; }
  .sidebar, .bottom-nav, .topbar, .no-print, .fab, .toasts { display: none !important; }
  .app { display: block; padding: 0; }
  .main { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  a { color: inherit; }
}
