/* Painel Pastoral — mesmo sistema visual do painel da plataforma de vagas
   (Poppins, fundo branco, azul #2E5AAC, ícones de traço, cards com sombra leve). */

:root {
  --font-main: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
  --bg: #FFFFFF;
  --page-bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-tint: #F5F8FF;
  --surface-alt: #EEF3FC;
  --ink: #16213D;
  --ink-soft: #5B6B85;
  --ink-faint: #93A1B8;
  --border: #DCE4F2;
  --accent: #2E5AAC;
  --accent-dark: #24468A;
  --accent-soft: #E4ECFB;
  --danger: #DC2626;
  --danger-soft: #FDE8E8;
  --success: #17945A;
  --success-soft: #E1F7EC;
  --amber: #C6860A;
  --amber-soft: #FBF0D9;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(22, 33, 61, 0.04), 0 6px 16px rgba(22, 33, 61, 0.05);
  --shadow-hover: 0 4px 10px rgba(22, 33, 61, 0.08), 0 12px 26px rgba(22, 33, 61, 0.08);
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.95rem;
  -webkit-font-smoothing: antialiased;
}
.icon { flex-shrink: 0; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3 { font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; line-height: 1.3; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 12px; }
small { font-size: 0.8rem; color: var(--ink-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 60; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.muted { color: var(--ink-soft); }
.mt { margin-top: 28px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.warn { color: var(--danger); }
.code { font-variant-numeric: tabular-nums; font-weight: 500; }
.lede { color: var(--ink-soft); max-width: 70ch; }
.help { font-size: 0.82rem; color: var(--ink-soft); margin: 4px 0 0; line-height: 1.45; }
template { display: none; }

/* ---------- Estrutura: menu lateral ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 248px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 22px 14px;
  animation: sidebarIn 0.4s ease both;
}
@keyframes sidebarIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 12px 22px; color: var(--ink); }
.sidebar-brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; }
.brand-text small { font-weight: 400; font-size: 0.75rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius); color: var(--ink-soft); font-size: 0.9rem; font-weight: 500;
  animation: navItemIn 0.35s ease both; animation-delay: calc(var(--stagger, 0) * 40ms);
  transition: background 0.15s ease, color 0.15s ease;
}
@keyframes navItemIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.nav-item:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.nav-item.is-active .icon { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 0.72rem; font-weight: 600; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; font-size: 0.82rem; color: var(--ink-soft); }
.sidebar-user .icon { color: var(--accent); }
.admin-content { flex: 1; min-width: 0; background: var(--bg); display: flex; flex-direction: column; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; width: 100%; }
.admin-content > .container { padding-top: 32px; padding-bottom: 48px; flex: 1; }

.sidebar-toggle { display: none; position: fixed; top: 14px; left: 14px; z-index: 40; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--ink); box-shadow: 0 2px 6px rgba(22,33,61,.08); cursor: pointer; }
.admin-overlay { display: none; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--ink-soft); font-size: 0.85rem; }
.dev-credit { display: block; margin-top: 4px; font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- Cabeçalho de página ---------- */
.page-head, .admin-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1, .admin-heading h1 { margin-bottom: 4px; }
.page-head .lede { margin: 0; }
.crumb { margin-bottom: 4px; font-size: 0.88rem; }
.crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-weight: 500; }
.crumb a::before { content: "←"; }
.crumb a:hover { color: var(--accent); text-decoration: none; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 12px; }
.section-title .icon { color: var(--accent); }

/* ---------- Flash ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.92rem; border: 1px solid transparent; animation: flashIn 0.35s ease both; max-width: 860px; }
.flash-success { background: var(--success-soft); color: #0F6B40; border-color: #C3EAD5; }
.flash-error { background: var(--danger-soft); color: #A61B1B; border-color: #F5C9C9; }
.flash-amber { background: var(--amber-soft); color: #8A5D06; border-color: #F1DDB0; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-main); font-weight: 600; font-size: 0.9rem;
  padding: 10px 20px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-align: center; white-space: nowrap; line-height: 1.3;
  background: var(--surface); color: var(--ink-soft); border-color: var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { border-color: var(--ink-faint); color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-small { padding: 7px 12px; font-size: 0.82rem; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); }
.btn-danger { background: transparent; border-color: transparent; color: var(--danger); padding-left: 10px; }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-approve { background: var(--success); border-color: var(--success); color: #fff; }
.btn-approve:hover { background: #127A4A; color: #fff; border-color: #127A4A; }
.btn-reject { background: var(--surface); border-color: #F2B8B8; color: var(--danger); }
.btn-reject:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.danger-zone { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.linklike { font-family: var(--font-main); font-size: 0.88rem; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.linklike:hover { color: var(--accent-dark); text-decoration: underline; }

/* Ação em ícone com dica (tabelas) */
.action-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: var(--radius);
  color: var(--ink-soft); background: none; border: none; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.action-link:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.action-link.danger:hover { background: var(--danger-soft); color: var(--danger); }
.action-link::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%) translateY(4px); background: var(--ink); color: #fff;
  font-size: 0.74rem; font-weight: 500; padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.12s ease, transform 0.12s ease; z-index: 20;
}
.action-link:hover::after, .action-link:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.actions { display: flex; gap: 2px; align-items: center; }
td.actions { display: table-cell; }
td.actions > * { vertical-align: middle; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
th { background: var(--surface-alt); font-weight: 600; color: var(--ink-soft); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { animation: rowIn 0.4s ease both; transition: background 0.15s ease; }
tbody tr:nth-child(2) { animation-delay: 45ms; } tbody tr:nth-child(3) { animation-delay: 90ms; }
tbody tr:nth-child(4) { animation-delay: 135ms; } tbody tr:nth-child(5) { animation-delay: 180ms; }
tbody tr:nth-child(6) { animation-delay: 225ms; } tbody tr:nth-child(7) { animation-delay: 270ms; }
tbody tr:nth-child(8) { animation-delay: 315ms; } tbody tr:nth-child(9) { animation-delay: 360ms; }
tbody tr:nth-child(10) { animation-delay: 405ms; }
tbody tr:hover { background: var(--surface-tint); }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
td a { font-weight: 500; color: var(--ink); }
td a:hover { color: var(--accent); }
td small { display: inline-block; margin-top: 2px; }
.muted-row td { color: var(--ink-soft); }
.row-on td { background: var(--accent-soft); }
.below-table { font-size: 0.85rem; color: var(--ink-soft); margin-top: 12px; }
.table-sheet th { background: transparent; }

/* ---------- Badges ---------- */
.badge, .tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-muted, .tag { background: var(--surface-alt); color: var(--ink-soft); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Estado vazio ---------- */
.empty-state, .empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 40px 24px; text-align: center; color: var(--ink-soft); }
.empty-state .icon { color: var(--ink-faint); margin-bottom: 10px; }
.empty-state p { margin: 0 auto; max-width: 52ch; }

/* ---------- Abas e filtros ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border); transition: background .15s, color .15s, border-color .15s; }
.tabs a:hover { background: var(--surface-alt); color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs .n { font-size: 0.72rem; font-weight: 600; background: rgba(0,0,0,.06); padding: 0 7px; border-radius: 999px; }
.tabs a[aria-current="page"] .n { background: rgba(255,255,255,.22); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-bottom: 4px; }
.toolbar .tabs { margin-bottom: 14px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.search input[type="search"] { flex: 1; min-width: 200px; }
.search select, .search input { width: auto; }

/* ---------- Layout de cadastro: lista + painel ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); position: sticky; top: 20px; animation: rowIn .4s ease both; }
.panel h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow); }

/* ---------- Formulários ---------- */
.stack { display: grid; gap: 14px; }
.wide-form { max-width: 760px; }
.narrow-form { max-width: 380px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-weight: 500; font-size: 0.88rem; margin-bottom: 5px; }
.opt { font-weight: 400; color: var(--ink-faint); font-size: 0.78rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; font-family: var(--font-main); font-size: 0.92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; line-height: 1.4; transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="file"] { width: 100%; font-family: var(--font-main); font-size: 0.88rem; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-tint); color: var(--ink-soft); cursor: pointer; }
input[type="file"]::file-selector-button { font-family: inherit; font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--accent); cursor: pointer; margin-right: 10px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { color: var(--ink-soft); background: var(--surface-tint); }
input[type="date"], input[type="time"] { color-scheme: light; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.9rem; cursor: pointer; line-height: 1.4; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.field-check { display: flex; align-items: end; padding-bottom: 10px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 1rem; margin-bottom: 8px; padding: 0; }
.code-input input { font-size: 1.6rem !important; letter-spacing: .25em; text-transform: uppercase; text-align: center; font-weight: 700; }

/* ---------- Visão geral ---------- */
.dashboard-greeting { font-size: 1.4rem; margin: 0 0 4px; }
.dashboard-greeting strong { color: var(--accent); }
.dashboard-sub { color: var(--ink-soft); margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.season-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface-alt); color: var(--ink); }
.season-dot { width: 9px; height: 9px; border-radius: 50%; }

.stat-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 24px; }
.stat-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow); color: var(--ink);
  animation: statTileIn 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: calc(var(--stagger, 0) * 70ms);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--ink); text-decoration: none; }
@keyframes statTileIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.stat-tile-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 11px; }
.stat-tile-icon-accent { background: var(--accent-soft); color: var(--accent); }
.stat-tile-icon-success { background: var(--success-soft); color: var(--success); }
.stat-tile-icon-danger { background: var(--danger-soft); color: var(--danger); }
.stat-tile-icon-amber { background: var(--amber-soft); color: var(--amber); }
.stat-tile-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-tile-label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow); animation: rowIn 0.4s ease both; min-width: 0; }
.chart-card h2 { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.chart-card h2 .icon { color: var(--accent); }
.chart-card h2 a { margin-left: auto; font-size: 0.8rem; font-weight: 500; }
.chart-card .empty-state { padding: 24px 16px; }

/* Sparkline */
.sparkline { width: 100%; height: 130px; overflow: visible; display: block; }
.sparkline-area { fill: var(--accent-soft); opacity: 0.7; }
.sparkline-baseline { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.sparkline-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: drawLine 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.sparkline-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; opacity: 0; animation: dotIn 0.3s ease calc(0.2s + var(--stagger) * 0.04s) forwards; }
.sparkline-dot:hover { fill: var(--accent); }
@keyframes dotIn { to { opacity: 1; } }
.sparkline-labels { position: relative; height: 16px; font-size: 0.74rem; color: var(--ink-faint); margin-top: 8px; }
.sparkline-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.sparkline-labels span:first-child { transform: none; }
.sparkline-labels span:last-child { transform: translateX(-100%); }

/* Donut */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; animation: donutIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes donutIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.donut-hole { position: absolute; inset: 20px; background: var(--surface); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-hole strong { font-size: 1.4rem; line-height: 1.1; }
.donut-hole span { font-size: 0.75rem; color: var(--ink-soft); }
.donut-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--ink-soft); }
.donut-legend li { display: flex; align-items: center; gap: 8px; }
.donut-legend strong { margin-left: auto; color: var(--ink); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Barras */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 28px; align-items: center; gap: 12px; animation: rowIn 0.35s ease both; animation-delay: calc(var(--stagger, 0) * 60ms); }
.bar-label { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--surface-alt); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; width: 0; animation: barGrow 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards; }
@keyframes barGrow { to { width: var(--target); } }
.bar-value { font-size: 0.85rem; font-weight: 600; text-align: right; }

/* Roda do ano litúrgico */
.wheel { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wheel svg { width: 170px; height: 170px; overflow: visible; }
.wheel-track { fill: none; stroke: var(--surface-alt); stroke-width: 16; }
.wheel-seg { fill: none; stroke: var(--c); stroke-width: 16; stroke-dasharray: var(--len) 100; stroke-dashoffset: var(--off); transform: rotate(-90deg); transform-origin: 110px 110px; opacity: .35; animation: wheel-draw .55s cubic-bezier(.3,.6,.2,1) both; animation-delay: calc(var(--i) * 120ms + 300ms); }
.wheel-seg.is-now { opacity: 1; stroke-width: 22; }
@keyframes wheel-draw { from { stroke-dasharray: 0 100; } }
.wheel-marker { fill: var(--surface); stroke: var(--ink); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: marker-in .5s cubic-bezier(.2,1.6,.4,1) 1.2s both; }
@keyframes marker-in { from { transform: scale(0); opacity: 0; } }
.wheel-cycle { font: 700 28px var(--font-main); fill: var(--ink); text-anchor: middle; }
.wheel-note { font: 500 12px var(--font-main); fill: var(--ink-soft); text-anchor: middle; }
.wheel figcaption { text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.wheel figcaption strong { display: block; color: var(--ink); font-size: 0.9rem; }

/* Listas da visão geral */
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.queue li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); transition: background .15s; animation: rowIn .35s ease both; animation-delay: calc(var(--stagger, 0) * 50ms); }
.queue li:hover { background: var(--surface-tint); }
.queue-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--amber-soft); color: var(--amber); flex-shrink: 0; }
.queue li.is-late .queue-icon { background: var(--danger-soft); color: var(--danger); }
.queue a { flex: 1; min-width: 0; color: var(--ink); }
.queue a:hover { text-decoration: none; color: var(--accent); }
.queue-subject { display: block; font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.queue li.is-late .queue-meta { color: var(--danger); }
.agenda { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.agenda li { display: flex; gap: 12px; align-items: center; line-height: 1.35; animation: rowIn .35s ease both; animation-delay: calc(var(--stagger, 0) * 60ms); }
.agenda-date { flex: none; width: 46px; height: 50px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; line-height: 1.1; }
.agenda-date b { font-size: 1.15rem; }
.agenda a { font-weight: 500; font-size: 0.9rem; color: var(--ink); }
.agenda a:hover { color: var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--surface-alt); border-radius: 2px; }
.timeline li { position: relative; padding: 7px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; line-height: 1.4; font-size: 0.88rem; animation: rowIn .35s ease both; animation-delay: calc(var(--stagger, 0) * 50ms); }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-faint); }
.timeline .tl-recebida::before { border-color: var(--amber); }
.timeline .tl-aprovada::before { border-color: var(--success); background: var(--success); }
.timeline .tl-recusada::before { border-color: var(--danger); background: var(--danger); }
.timeline .tl-resposta::before { border-color: var(--accent); background: var(--accent); }
.timeline time { font-size: 0.78rem; color: var(--ink-faint); white-space: nowrap; }
.link-box { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.link-box .icon { color: var(--ink-faint); }
.link-box-label { font-size: 0.78rem; color: var(--ink-soft); display: block; }
.link-box-text { font-size: 0.82rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.link-box .btn { flex-shrink: 0; }
.stock-alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--danger-soft); color: #A61B1B; font-size: 0.85rem; }

/* ---------- Detalhe de solicitação ---------- */
.req-head { margin-bottom: 22px; }
.req-head h1 { margin-bottom: 6px; }
.req-head p { color: var(--ink-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.req-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.req-body h2 { margin-top: 20px; font-size: 1rem; }
.req-tools { margin: 20px 0 0; }
.facts { margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.facts div { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.facts dt { font-size: 0.78rem; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.prose { max-width: 72ch; color: var(--ink); margin-bottom: 12px; }
blockquote { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-tint); border-radius: 0 var(--radius) var(--radius) 0; }
.answers { margin: 0 0 12px; }
.answers div { padding: 10px 0; border-top: 1px dashed var(--border); }
.answers div:first-child { border-top: 0; }
.answers dt { font-size: 0.78rem; color: var(--ink-soft); }
.answers dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.answers-sec { font-size: 0.95rem; margin: 16px 0 2px; color: var(--accent); }
.file-link { display: inline-flex; align-items: center; gap: 6px; }

/* Materiais / paróquias / configurações */
.access-code { font-weight: 700; letter-spacing: .14em; color: var(--accent-dark); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; font-size: 0.85rem; }
.access-code.big { display: inline-block; font-size: 1.7rem; padding: 6px 14px; margin: 4px 0 10px; }
.code-card { background: var(--surface-alt); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.code-card p:first-child { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.field-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: q; }
.field-list li { counter-increment: q; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.field-list li::before { content: counter(q); font-size: 0.78rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.field-list small { margin-left: auto; }
.mail-log { list-style: none; padding: 0; margin: 14px 0 0; font-size: 0.85rem; }
.mail-log li { padding: 8px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.people { list-style: none; padding: 0; margin: 0 0 14px; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); line-height: 1.3; font-size: 0.9rem; }
.disclose { border-top: 1px solid var(--border); padding: 12px 0 4px; }
.disclose summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.disclose[open] summary { margin-bottom: 14px; }
.toggle { font-family: var(--font-main); font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 4px 12px 4px 24px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--ink-soft); cursor: pointer; position: relative; }
.toggle::before { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ink-faint); }
.toggle.on { color: var(--success); background: var(--success-soft); border-color: transparent; }
.toggle.on::before { background: var(--success); }

/* ---------- QR Code ---------- */
.qr-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.qr-layout .panel { position: static; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.choices legend { font-size: 0.88rem; font-weight: 500; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.88rem; transition: border-color .15s, background .15s; }
.choice:hover { background: var(--surface-tint); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.choice input { accent-color: var(--accent); margin: 0; }
[data-for][hidden] { display: none; }
[data-for] { display: grid; gap: 14px; }
.qr-preview { position: sticky; top: 20px; }
.qr-sheet { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: grid; justify-items: center; max-width: 440px; box-shadow: var(--shadow); }
.qr-sheet canvas { width: 100%; max-width: 360px; height: auto; image-rendering: pixelated; transition: opacity .2s; }
.qr-caption { font-weight: 600; font-size: 1.15rem; text-align: center; margin: 14px 0 0; }
.qr-caption:empty { display: none; }
.qr-content { font-size: 0.8rem; color: var(--ink-soft); word-break: break-all; margin: 12px 0 16px; max-width: 440px; }

/* ---------- Construtor de formulários ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.builder-main { max-width: 780px; }
.builder-side { display: grid; gap: 14px; }
.builder-side h2 { margin: 0; }
.builder-meta { font-size: 0.85rem; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.builder-meta a { display: inline-flex; align-items: center; gap: 6px; }
.builder-foot { display: flex; gap: 8px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); max-width: 780px; }
.form-cover { background: var(--surface); border: 1px solid var(--border); border-top: 6px solid var(--accent); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 12px; box-shadow: var(--shadow); }
.form-cover input.cover-title, .form-cover textarea.cover-desc { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 6px 0; min-height: 0; box-shadow: none; }
.form-cover input.cover-title { font-size: 1.5rem; font-weight: 600; }
.form-cover textarea.cover-desc { margin-top: 8px; color: var(--ink-soft); }
.form-cover input.cover-title:focus, .form-cover textarea.cover-desc:focus { border-bottom: 2px solid var(--accent); box-shadow: none; }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--radius); padding: 16px 18px 10px; box-shadow: var(--shadow); transition: border-color .15s; }
.q-card:focus-within { border-left-color: var(--accent); }
.q-card.is-new { animation: blockEnter .3s ease both; }
@keyframes blockEnter { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.q-card.is-section { background: var(--surface-tint); border-left-color: var(--accent); }
.q-card.is-section input.q-label { font-size: 1.1rem; font-weight: 600; }
.q-top { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 10px; }
.q-card input.q-label { font-weight: 500; background: var(--surface-tint); }
.q-card .q-type { font-size: 0.85rem; }
.q-card input.q-help { margin-top: 8px; font-size: 0.82rem; border: 0; border-bottom: 1px dashed var(--border); border-radius: 0; background: transparent; padding: 6px 0; box-shadow: none; color: var(--ink-soft); }
.q-body { margin-top: 12px; }
.q-preview { color: var(--ink-faint); font-size: 0.85rem; border-bottom: 1px dotted var(--border); padding: 8px 0; max-width: 60%; }
.q-preview.long { max-width: 100%; }
.q-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.q-opts li { display: flex; align-items: center; gap: 10px; }
.q-opts .mark { flex: none; width: 16px; height: 16px; border: 2px solid var(--ink-faint); border-radius: 50%; }
.q-opts .mark.sq { border-radius: 4px; }
.q-opts .mark.num { border: 0; width: auto; min-width: 16px; font-size: 0.8rem; color: var(--ink-soft); }
.q-opts input.q-opt { border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; padding: 6px 0; box-shadow: none; }
.q-opts input.q-opt:hover, .q-opts input.q-opt:focus { border-bottom-color: var(--border); box-shadow: none; }
.q-opt-add { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 6px 0 0 26px; font-size: 0.85rem; }
.q-file { display: grid; gap: 12px; }
.q-file .kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.q-file .kinds label { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.82rem; cursor: pointer; }
.q-file .kinds label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.q-file .kinds input { accent-color: var(--accent); margin: 0; }
.q-file .row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 0.85rem; }
.q-file .row select { width: auto; padding: 6px 10px; }
.q-foot { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.q-move { display: inline-flex; gap: 2px; margin-right: auto; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--radius); border: none; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-alt); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.q-del { color: var(--danger); }
.switch { display: inline-flex; align-items: center; gap: 8px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); font-size: 0.85rem; cursor: pointer; color: var(--ink-soft); }
.switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.q-card.is-section .switch { display: none; }
.q-add { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Páginas públicas (mesmo estilo da área pública de vagas) ---------- */
body.public { background: var(--page-bg); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); border-top: 3px solid var(--accent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 820px; margin: 0 auto; padding: 16px 24px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; color: var(--ink); }
.logo .icon { color: var(--accent); }
.header-org { color: var(--ink-soft); font-size: 0.85rem; }
.public-wrap { max-width: 820px; margin: 0 auto; padding: 36px 24px 56px; min-height: 60vh; }
.public-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); animation: cardIn .5s cubic-bezier(0.22, 0.68, 0.32, 1) both; }
.public-card.narrow { max-width: 480px; margin: 0 auto; }
.public-card h1 { font-size: 1.55rem; }
.public-footer .container { max-width: 820px; }
.event-when { color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.order-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.order-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.order-list label { line-height: 1.35; }
.order-name { display: block; font-weight: 500; }
.order-list small { display: block; }
.qty { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; }
.qty input { width: 84px !important; text-align: right; }
.gform-body { gap: 0; margin-top: 8px; }
.gq { padding: 16px 0; border-top: 1px solid var(--border); }
.gq.has-error { border-left: 3px solid var(--danger); padding-left: 14px; background: linear-gradient(90deg, var(--danger-soft), transparent 40%); }
.gq-label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 8px; line-height: 1.4; }
.gq .help { margin: -4px 0 10px; }
.req { color: var(--danger); }
.gq-error { color: var(--danger); font-size: 0.85rem; margin: 8px 0 0; }
.gopt { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 0.92rem; }
.gopt input[type="radio"], .gopt input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }
.gopt-other input[type="text"] { flex: 1; padding: 6px 10px; }
.gsec { padding: 22px 0 6px; border-top: 1px solid var(--border); }
.gsec h2 { margin-bottom: 4px; color: var(--accent); }
.gsec p { color: var(--ink-soft); margin: 0; }
.gfile-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.85rem; }
.gfile-list li { padding: 3px 0; }
.gfile-list .bad { color: var(--danger); }
.gform-body > .form-actions { margin-top: 20px; }

/* ---------- Login ---------- */
body.login-page {
  position: relative; overflow: hidden; min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(135deg, #1b3b78, #2E5AAC 45%, #4d7bd6 75%, #7aa0e6);
  background-size: 220% 220%, 220% 220%, 260% 260%;
  animation: loginBgMove 16s ease-in-out infinite;
}
@keyframes loginBgMove { 0%, 100% { background-position: 0% 30%, 100% 70%, 0% 50%; } 50% { background-position: 100% 70%, 0% 30%, 100% 50%; } }
body.login-page::before, body.login-page::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); filter: blur(2px); animation: loginOrbFloat 12s ease-in-out infinite; }
body.login-page::before { width: 260px; height: 260px; top: -60px; left: 8%; }
body.login-page::after { width: 340px; height: 340px; bottom: -100px; right: 6%; animation-delay: -6s; animation-direction: reverse; }
@keyframes loginOrbFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-24px) scale(1.06); } }
.login-container { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 36px; border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.97); box-shadow: 0 8px 24px rgba(16, 24, 44, 0.14), 0 30px 60px rgba(16, 24, 44, 0.22); animation: cardIn 0.6s cubic-bezier(0.22, 0.68, 0.32, 1) both; text-align: center; }
.login-card h1 { font-size: 1.35rem; margin: 4px 0 4px; }
.login-card .subtitle { color: var(--ink-soft); margin-bottom: 18px; font-size: 0.9rem; }
.login-card form { text-align: left; }
.login-card .btn-primary { width: 100%; margin-top: 8px; }
.login-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), #dbe6fb); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; animation: loginIconPulse 2.6s ease-in-out infinite; }
@keyframes loginIconPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 90, 172, 0.25); } 50% { box-shadow: 0 0 0 10px rgba(46, 90, 172, 0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.input-with-icon { position: relative; }
.input-with-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.input-with-icon input { padding-left: 38px !important; }
.login-credit { position: relative; z-index: 1; color: rgba(255, 255, 255, 0.85); }

/* ---------- Paginação ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-weight: 600; font-size: 0.9rem; transition: background .15s, border-color .15s, color .15s; }
.page-btn:hover { background: var(--accent-soft); text-decoration: none; }
.page-btn.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.is-disabled { opacity: 0.35; pointer-events: none; }
.page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 38px; color: var(--ink-faint); }
.pagination-info { text-align: center; font-size: 0.8rem; color: var(--ink-faint); margin: 8px 0 0; }

/* ---------- Documento A4 ---------- */
body.doc-body { background: #E6EBF3; }
.doc-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.doc-bar span { display: flex; gap: 8px; }
.doc-bar > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.sheet { width: 210mm; min-height: 296mm; margin: 28px auto; background: #fff; color: #16213D; padding: 20mm 20mm 18mm; display: flex; flex-direction: column; box-shadow: 0 12px 30px -12px rgba(22,33,61,.35); font-family: var(--font-main); font-size: 10.5pt; line-height: 1.5; }
.sheet-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 8mm; border-bottom: 2pt solid #2E5AAC; }
.sheet-head p { margin: 0; }
.sheet-diocese { font-weight: 700; font-size: 14pt; }
.sheet-org { font-size: 11pt; color: #2E5AAC; font-weight: 500; }
.sheet-addr { font-size: 9pt; color: #5B6B85; margin-top: 2px !important; }
.sheet-no { text-align: right; font-size: 9.5pt; color: #5B6B85; }
.sheet-no p:first-child { font-weight: 700; color: #16213D; }
.sheet-title { font-size: 19pt; font-weight: 600; margin: 9mm 0 6mm; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10mm; margin: 0 0 5mm; }
.sheet-grid div { padding: 2.2mm 0; border-bottom: .5pt solid #DCE4F2; }
.sheet-grid .full { grid-column: 1 / -1; }
.sheet-grid dt { font-size: 8pt; color: #5B6B85; }
.sheet-grid dd { margin: 0; font-weight: 500; }
.sheet-h { font-size: 11.5pt; font-weight: 600; margin: 6mm 0 2mm; color: #2E5AAC; }
.sheet-text { margin: 0 0 3mm; }
.sheet-table { font-size: 10pt; }
.sheet-table th { background: #EEF3FC; color: #5B6B85; padding: 2mm 3mm; font-size: 8pt; }
.sheet-table td { border-bottom: .5pt solid #DCE4F2; padding: 2mm 3mm; }
.sheet-table tbody tr { animation: none; }
.sheet-foot { margin-top: auto; padding-top: 16mm; display: flex; justify-content: space-between; align-items: flex-end; gap: 12mm; }
.sheet-sign { flex: 1; max-width: 95mm; }
.sheet-sign p { margin: 0; }
.sheet-place { margin-bottom: 18mm !important; }
.sign-line { border-top: .75pt solid #16213D; margin-bottom: 2mm; }
.sheet-sign .muted { color: #5B6B85; font-size: 9.5pt; }
.sheet-qr { width: 32mm; text-align: center; font-size: 7pt; color: #5B6B85; line-height: 1.3; }
.sheet-qr canvas { width: 30mm; height: 30mm; display: block; margin: 0 auto 1.5mm; }
.pdf-mode .sheet { margin: 0; box-shadow: none; }
@page { size: A4; margin: 0; }
@media print {
  body.doc-body { background: #fff; }
  .doc-bar { display: none; }
  .sheet { margin: 0; box-shadow: none; zoom: 1 !important; }
}

/* ---------- Janelas (modais) ---------- */
dialog.modal { border: none; border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow-y: auto; box-shadow: 0 20px 60px rgba(22, 33, 61, 0.25); background: var(--surface); color: var(--ink); font-family: var(--font-main); }
dialog.modal::backdrop { background: rgba(16, 24, 44, 0.55); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modalIn 0.25s cubic-bezier(0.22, 0.68, 0.32, 1) both; }
dialog.modal[open]::backdrop { animation: modalBackdropIn 0.25s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-header h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; margin: 0; }
.modal-header h2 .icon { color: var(--accent); }
.modal-close-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border: none; background: transparent; color: var(--ink-soft); border-radius: var(--radius); cursor: pointer; }
.modal-close-btn:hover { background: var(--surface-alt); color: var(--ink); }
.modal-actions { justify-content: flex-end; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-toolbar p { margin: 0; }
.inline-form { display: inline; }
.empty-state .btn { margin-top: 14px; }
@media (max-width: 560px) {
  dialog.modal { max-width: calc(100vw - 24px); padding: 20px; }
  .modal-actions .btn { flex: 1; }
}

/* ---------- Solicitação manual ---------- */
.approval-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 24px; align-items: center; padding: 18px 20px; margin-bottom: 20px; background: var(--accent-soft); border: 1px solid #C9D8F5; border-radius: var(--radius-lg); animation: rowIn .4s ease both; }
.approval-link .help { margin: 2px 0 0; }
.approval-link-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; color: var(--accent-dark); }
.approval-link .link-box { margin: 0; background: var(--surface); }
.audit { margin: 0 0 8px; }
.audit div { padding: 9px 0; border-bottom: 1px dashed var(--border); }
.audit dt { font-size: 0.76rem; color: var(--ink-soft); }
.audit dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.signature { font-family: 'Segoe Script', 'Brush Script MT', cursive; font-size: 1.35rem; font-weight: 400; color: var(--accent-dark); }
.signature-inline { font-weight: 600; color: var(--accent-dark); }

/* Página pública de aprovação */
.approve-card { border-top-color: var(--accent); }
.approve-code { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink-soft); background: var(--surface-alt); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.approve-text { background: var(--surface-tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.approve-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.signature-field input { font-size: 1.1rem !important; font-weight: 500; }
.approve-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.approve-actions .btn { padding: 14px; font-size: 1rem; }
.approve-result { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 18px; border-radius: var(--radius-lg); animation: cardIn .45s ease both; }
.approve-result p { margin: 0 0 6px; }
.approve-result-title { font-weight: 600; font-size: 1.05rem; }
.approve-aprovada { background: var(--success-soft); color: #0F6B40; }
.approve-recusada { background: var(--danger-soft); color: #A61B1B; }

/* Comprovante (folha A4) */
.esign { border: 1pt solid #DCE4F2; border-left: 3pt solid #2E5AAC; border-radius: 2mm; padding: 5mm 6mm; }
.esign-name { font-family: 'Segoe Script', 'Brush Script MT', cursive; font-size: 20pt; color: #24468A; margin: 0 !important; line-height: 1.2; }
.esign-line { font-size: 9.5pt; color: #5B6B85; margin: 0 0 3mm !important; }
.esign-table th { width: 32mm; text-align: left; background: transparent; }
.esign-note { font-size: 8pt; color: #5B6B85; margin: 3mm 0 0 !important; }

/* ---------- Campos de solicitações ---------- */
.fixed-fields { background: var(--surface-tint); border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px 18px; }
.fixed-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.85rem; margin: 0 0 6px; color: var(--ink-soft); }
.fixed-fields ul { margin: 0; padding-left: 18px; font-size: 0.88rem; columns: 2; }
.fixed-fields li { padding: 2px 0; }

/* Campos padrão editáveis */
.field-table-intro { margin: -6px 0 10px; }
.std-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: sf; }
.std-field { counter-increment: sf; display: grid; grid-template-columns: 28px minmax(0, 1fr) 170px; gap: 12px; align-items: start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); transition: opacity .15s, border-color .15s; }
.std-field::before { content: counter(sf); width: 24px; height: 24px; margin-top: 7px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.std-field.is-hidden { opacity: .55; border-left-color: var(--border); background: var(--surface-tint); }
.std-field.is-hidden .std-label { text-decoration: line-through; }
.std-main { display: grid; gap: 4px; min-width: 0; }
.std-field input.std-label { font-weight: 600; padding: 7px 10px; }
.std-field input.std-help { font-size: 0.82rem; padding: 6px 10px; color: var(--ink-soft); border-style: dashed; }
.std-why { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-faint); font-size: 0.76rem; }
.std-mode { padding-top: 3px; }
.std-mode select { padding: 7px 10px; font-size: 0.85rem; }
.std-mode .badge { margin-top: 6px; }
@media (max-width: 640px) { .std-field { grid-template-columns: 24px minmax(0, 1fr); } .std-mode { grid-column: 2; } }

/* ---------- Links de pedido ---------- */
dialog.modal.modal-wide { max-width: 640px; }
.pick-materials { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 12px; }
.pick-materials legend { font-size: 0.88rem; font-weight: 500; padding: 0 4px; }
.pick-materials { max-height: 260px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; }
.pick:hover { background: var(--surface-tint); }
.pick:has(input:checked) { background: var(--accent-soft); }
.pick input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.pick span { flex: 1; }
.url-chip { display: inline-block; font-size: 0.78rem; color: var(--ink-soft); background: var(--surface-alt); padding: 3px 10px; border-radius: 999px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.order-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius); background: var(--amber-soft); color: #8A5D06; }
.order-note p { margin: 0; }

/* ---------- Relatórios ---------- */
.group-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }

@media (max-width: 760px) {
  .approval-link { grid-template-columns: 1fr; }
  .fixed-fields ul { columns: 1; }
  .approve-actions { grid-template-columns: 1fr; }
}

/* ---------- Configurações: e-mail ---------- */
.dot-warn { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }
.tabs a[aria-current="page"] .dot-warn { background: #FFD27A; }
.smtp-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.smtp-layout .card { animation: rowIn .4s ease both; }
.smtp-layout .flash { margin: 0; }
.test-send { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.smtp-help ol { margin: 0; padding-left: 20px; font-size: 0.86rem; color: var(--ink-soft); display: grid; gap: 6px; }
.smtp-help b { color: var(--ink); font-weight: 600; }

/* ---------- Administradores ---------- */
.pass-row { display: flex; gap: 8px; align-items: center; }
.pass-row input { flex: 1; }
.admin-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; flex-shrink: 0; }

@media (max-width: 960px) { .smtp-layout { grid-template-columns: 1fr; } }

/* ---------- Inscrições em eventos ---------- */
.cover-kicker { margin: 0 0 6px; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.capacity { display: grid; gap: 5px; min-width: 150px; font-size: 0.85rem; }
.capacity .bar-track { height: 8px; }
.bar-fill.is-full { background: var(--amber); }
.event-where { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); margin: -4px 0 12px; }
.vagas-note { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--success); background: var(--success-soft); padding: 6px 14px; border-radius: 999px; }
.vagas-note.is-full { color: #8A5D06; background: var(--amber-soft); }
.approve-espera { background: var(--amber-soft); color: #8A5D06; }
.report-event { margin: -3mm 0 2mm; font-size: 11pt; }
.sign-blank { display: block; min-width: 45mm; height: 7mm; border-bottom: .75pt solid #93A1B8; }

/* ---------- Logotipo ---------- */
.brand-logo { height: 38px; width: auto; max-width: 56px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.site-logo { height: 30px; width: auto; max-width: 120px; object-fit: contain; }
.login-logo { height: 64px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 14px; display: block; }
.logo-setting { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); max-width: 760px; }
.logo-preview { width: 150px; height: 150px; flex-shrink: 0; border-radius: var(--radius); background: var(--surface-alt); display: flex; align-items: center; justify-content: center; padding: 14px; background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%), linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-faint); }
.logo-actions { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Relatório de solicitações ---------- */
.report-filters { margin-bottom: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.report-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.quick-periods { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; background: var(--surface-alt); color: var(--ink-soft); }
.chip:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.chip.is-on { background: var(--accent); color: #fff; }
.stats-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.stat-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px 8px 12px; font-size: 0.86rem; color: var(--ink-soft); animation: statTileIn .4s ease both; }
.stat-chip .icon { color: var(--accent); }
.stat-chip strong { color: var(--ink); font-weight: 600; }
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.report-layout > aside { order: -1; }
.report-layout .bar-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 32px; }
.bar-row-compact { grid-template-columns: 170px 1fr 28px; }

/* Folha do relatório / documento */
.sheet-brand { display: flex; align-items: center; gap: 4mm; }
.sheet-logo { height: 18mm; width: auto; max-width: 30mm; object-fit: contain; }
.sheet-report { min-height: 296mm; }
.report-period { margin: -3mm 0 6mm; color: #5B6B85; font-size: 10pt; }
.report-period span { font-size: 9pt; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-bottom: 6mm; }
.report-kpis div { border: .75pt solid #DCE4F2; border-top: 2.5pt solid #2E5AAC; border-radius: 2mm; padding: 3mm 4mm; }
.report-kpis .k-amber { border-top-color: #C6860A; }
.report-kpis .k-success { border-top-color: #17945A; }
.report-kpis .k-danger { border-top-color: #DC2626; }
.report-kpis strong { display: block; font-size: 18pt; line-height: 1.1; }
.report-kpis span { font-size: 8.5pt; color: #5B6B85; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6mm; }
.sheet-table th { white-space: normal; }
.report-cols .sheet-table td:first-child { width: 55%; }
.sheet-list td { font-size: 9pt; vertical-align: top; }
.sheet-list small { font-size: 7.5pt; color: #5B6B85; }
.sheet-table tr { page-break-inside: avoid; break-inside: avoid; }
.sheet-table .num { text-align: right; }
.st { font-weight: 600; font-size: 8.5pt; }
.st-pendente { color: #C6860A; }
.st-aprovada { color: #17945A; }
.st-recusada { color: #DC2626; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .report-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .split, .qr-layout, .builder { grid-template-columns: 1fr; }
  .panel, .qr-preview { position: static; }
  .split > .panel, .builder-side { order: -1; }
}
@media (max-width: 900px) {
  .stat-tile-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar-toggle { display: inline-flex; }
  .admin-sidebar { position: fixed; z-index: 41; left: 0; top: 0; transform: translateX(-100%); transition: transform 0.25s ease; animation: none; }
  .admin-sidebar.is-open { transform: none; box-shadow: 4px 0 24px rgba(22, 33, 61, 0.15); }
  .admin-overlay.is-open { display: block; position: fixed; inset: 0; background: rgba(22, 33, 61, 0.35); z-index: 39; }
  .admin-content > .container { padding-top: 68px; }
  .container { padding: 0 16px; }
  .bar-row { grid-template-columns: 96px 1fr 24px; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .row2, .facts, .choices, .q-top { grid-template-columns: 1fr; }
  .stat-tile-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-tile { padding: 14px; }
  .stat-tile-value { font-size: 1.5rem; }
  .public-card { padding: 22px; }
  .public-wrap { padding: 20px 16px 40px; }
  .login-card { padding: 26px 22px; }
  .switch { border-left: 0; padding-left: 0; }
  .search input[type="search"] { min-width: 100%; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
