/* =========================================================
   Painel de gestão e revisão · Sonorização ICM Pernambuco
   Mesma identidade do formulário do pastor (portal.css):
   azul #2147C6, âmbar #E09A12 (a "falha" na onda sonora),
   fundo #F3F5F9, Manrope, cards brancos arredondados.
   ========================================================= */

:root {
  --brand: #2147C6;
  --brand-600: #1A3AA6;
  --brand-50: #EEF2FE;
  --brand-100: #DCE4FD;
  --amber: #E09A12;
  --amber-50: #FDF4E3;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --ink: #0E1630;
  --text: #2A3350;
  --muted: #667090;
  --faint: #98A0BA;
  --line: #E4E8F1;
  --line-2: #EEF1F6;
  --green: #0F9D6B;
  --green-50: #E6F6EF;
  --red: #D93A3A;
  --red-50: #FCEBEB;
  --violet: #6D3FD8;
  --violet-50: #F1ECFD;
  --teal: #0E8BAF;
  --teal-50: #E5F5FA;
  --slate-50: #F1F3F8;
  --r-lg: 22px;
  --r: 14px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 22, 48, 0.04), 0 6px 20px rgba(14, 22, 48, 0.06);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

body.ui { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.ui h1, .ui h2, .ui h3 { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }
:where(.ui) a { color: var(--brand); }
.ui :focus-visible { outline: 3px solid rgba(33, 71, 198, 0.35); outline-offset: 2px; }
.ui-code { font-family: var(--mono); font-size: 0.86em; }

/* ---------- Estrutura ---------- */
.ui-shell { display: flex; min-height: 100vh; }
.ui-sidebar {
  position: sticky; top: 0; width: 250px; height: 100vh; flex: none;
  display: flex; flex-direction: column; gap: 4px; padding: 24px 14px 16px;
  background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40;
}
.ui-logo { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; text-decoration: none; color: var(--ink) !important; }
.ui-logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); flex: none; }
.ui-logo-mark svg { width: 19px; height: 19px; fill: #fff; }
.ui-logo-mark svg rect:nth-child(3) { fill: var(--amber); }
.ui-logo strong { display: block; font-size: 0.98rem; font-weight: 800; letter-spacing: -0.01em; }
.ui-logo small { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.ui-nav { display: grid; gap: 2px; }
.ui-nav-label { padding: 18px 12px 6px; font-size: 0.75rem; font-weight: 700; color: var(--faint); }
.ui-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 999px;
  color: var(--text) !important; text-decoration: none; font-weight: 600; font-size: 0.93rem;
  border: 0; background: none; width: 100%; text-align: left; font-family: inherit;
}
.ui-nav-link svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.ui-nav-link:hover { background: var(--surface); }
.ui-nav-link.is-active { background: var(--surface); color: var(--brand) !important; box-shadow: var(--shadow); }
.ui-nav-link.is-active svg { color: var(--brand); }
.ui-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--amber); color: #fff; font-size: 0.75rem; font-weight: 800; display: grid; place-items: center; }
.ui-side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.ui-side-foot form { margin: 0; }
.ui-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; text-decoration: none; color: var(--text) !important; }
.ui-me:hover, .ui-me.is-active { background: var(--surface); }
.ui-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; flex: none; }
.ui-me-text { display: grid; line-height: 1.2; min-width: 0; }
.ui-me-text strong { font-size: 0.88rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-me-text small { font-size: 0.76rem; color: var(--muted); }

.ui-scrim, .ui-topbar, .ui-tabbar { display: none; }
.ui-main { flex: 1; min-width: 0; }
.ui-content { padding: 32px 36px 56px; max-width: 1220px; margin: 0 auto; width: 100%; }
.ui-bleed { margin: 0; }
.ui-content > .alert { border-radius: var(--r); border: 0; font-weight: 600; padding: 14px 18px; box-shadow: var(--shadow); }
.ui .alert-success { background: var(--green-50); color: #075E40; }
.ui .alert-danger { background: var(--red-50); color: #8E1F1F; }

/* ---------- Início: cabeçalho igual ao do formulário ---------- */
.bk-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; align-items: end;
  padding: 30px 34px 64px; margin-bottom: 22px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow);
}
/* onda sonora do formulário: barras azuis com a "falha" em âmbar */
.bk-hero::after {
  content: ''; position: absolute; left: 34px; right: 34px; bottom: 18px; height: 28px;
  background:
    linear-gradient(90deg, transparent 58%, var(--amber) 58%, var(--amber) 61%, transparent 61%),
    repeating-linear-gradient(90deg, var(--brand) 0 4px, transparent 4px 9px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 9px);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  opacity: 0.85; clip-path: polygon(0 60%, 10% 30%, 20% 55%, 30% 10%, 40% 45%, 50% 20%, 58% 50%, 61% 50%, 70% 0, 80% 40%, 90% 25%, 100% 60%, 100% 100%, 0 100%);
}
.bk-hero-main { display: grid; }
.bk-hero-label { justify-self: start; padding: 5px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: 0.8rem; font-weight: 700; }
.bk-hero-number { font-size: clamp(3.2rem, 7vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--ink); margin: 14px 0 2px; }
.bk-hero-sub { font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.bk-hero-side { display: grid; grid-template-columns: repeat(3, auto); gap: 12px; }
.bk-hero-side div { display: grid; padding: 12px 16px; border-radius: var(--r); background: var(--bg); }
.bk-hero-side strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.bk-hero-side span { font-size: 0.8rem; color: var(--muted); font-weight: 600; max-width: 13ch; }
.bk-hero-btn {
  grid-column: 1 / -1; justify-self: start; padding: 14px 22px; border-radius: 14px;
  background: var(--brand); color: #fff !important; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 20px rgba(33, 71, 198, 0.25); transition: transform 0.15s, background 0.15s;
}
.bk-hero-btn:hover { background: var(--brand-600); transform: translateY(-1px); }

.bk-shortcuts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.bk-shortcuts a {
  display: grid; justify-items: center; gap: 10px; padding: 18px 8px 16px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--text) !important;
  font-weight: 700; font-size: 0.84rem; text-align: center; line-height: 1.25; transition: transform 0.15s;
}
.bk-shortcuts a:hover { transform: translateY(-2px); }
.bk-round { position: relative; display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--slate-50); color: var(--muted); }
.bk-round svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-round b {
  position: absolute; top: -4px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--amber); color: #fff; border: 2px solid #fff; font-size: 0.72rem; font-weight: 800; display: grid; place-items: center;
}
.t-new.bk-round { background: var(--brand-50); color: var(--brand); }
.t-progress.bk-round { background: var(--teal-50); color: var(--teal); }
.t-waiting.bk-round { background: var(--amber-50); color: var(--amber); }
.t-approved.bk-round { background: var(--green-50); color: var(--green); }
.t-combens.bk-round { background: var(--violet-50); color: var(--violet); }

.bk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.bk-stack { display: grid; gap: 22px; }

/* ---------- Cards e listas ---------- */
.bk-card, .ui-card, .ui .card, .ui .section-card { background: var(--surface); border: 0 !important; border-radius: var(--r-lg) !important; box-shadow: var(--shadow) !important; }
.bk-card { overflow: hidden; }
.bk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px 8px; }
.bk-card-head h2 { font-size: 1.1rem; margin: 0; }
.bk-card-head a { font-weight: 700; font-size: 0.88rem; text-decoration: none; }
.bk-list { list-style: none; margin: 0; padding: 4px 12px 12px; }
.bk-list a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r); text-decoration: none; color: var(--text) !important; transition: background 0.15s; }
.bk-list a:hover { background: var(--bg); }
.bk-avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 0.9rem; }
.bk-avatar.sev-critical { background: var(--red-50); color: var(--red); }
.bk-avatar.sev-high { background: var(--amber-50); color: var(--amber); }
.bk-avatar.t-approved { background: var(--green-50); color: var(--green); }
.bk-list-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bk-list-main strong { color: var(--ink); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-list-main small { color: var(--muted); font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-preview { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.bk-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bk-list-side { display: grid; justify-items: end; gap: 6px; flex: none; }
.bk-list-side small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.bk-list-side small.is-late { color: var(--red); font-weight: 800; }
.bk-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--slate-50); color: var(--muted); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.bk-chip.s-critical { background: var(--red-50); color: var(--red); }
.bk-chip.s-high, .bk-chip.s-warn { background: var(--amber-50); color: #A86C00; }
.bk-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 24px 40px; text-align: center; color: var(--muted); }
.bk-empty strong { color: var(--ink); font-size: 1.02rem; }
.bk-month { padding: 22px 24px; display: grid; gap: 14px; }
.bk-month h2 { font-size: 1.1rem; margin: 0; }
.bk-month-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bk-month-grid div { display: grid; padding: 14px 16px; border-radius: var(--r); background: var(--bg); }
.bk-month-grid strong { font-size: 1.8rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.bk-month-grid span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.bk-link-btn { display: block; text-align: center; padding: 12px; border-radius: 14px; background: var(--brand-50); font-weight: 800; text-decoration: none; }
.bk-link-btn:hover { background: var(--brand-100); }

.ui-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; white-space: nowrap; background: var(--slate-50); color: var(--muted); }
.ui-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ui-status.t-new { background: var(--brand-50); color: var(--brand); }
.ui-status.t-progress { background: var(--teal-50); color: var(--teal); }
.ui-status.t-waiting { background: var(--amber-50); color: #A86C00; }
.ui-status.t-approved { background: var(--green-50); color: var(--green); }
.ui-status.t-combens { background: var(--violet-50); color: var(--violet); }
.ui-status.t-rejected { background: var(--red-50); color: var(--red); }
.ui-sev { font-weight: 800; }
.ui-sev i { display: none; }
.ui-sev.s-critical { color: var(--red); }
.ui-sev.s-high { color: var(--amber); }
.ui-evi svg { display: none; }
.ui-days.is-late { color: var(--red); font-weight: 800; }

/* ---------- Pedidos ---------- */
.bk-page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bk-page-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -0.04em; margin: 0; }
.bk-search { position: relative; flex: 1 1 280px; max-width: 420px; margin: 0; }
.bk-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.bk-search input { width: 100%; height: 48px; padding: 0 18px 0 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 600; color: var(--ink); }
.bk-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33, 71, 198, 0.15); }
.bk-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 2px 2px 10px; margin-bottom: 6px; scrollbar-width: none; }
.bk-chips::-webkit-scrollbar { display: none; }
.bk-chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text) !important; text-decoration: none; font-weight: 700; font-size: 0.88rem; }
.bk-chips a b { font-weight: 800; color: var(--muted); }
.bk-chips a:hover { border-color: var(--brand-100); }
.bk-chips a.is-active { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.bk-chips a.is-active b { color: rgba(255, 255, 255, 0.75); }
.bk-filters { margin-bottom: 16px; }
.bk-filters summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 0.88rem; padding: 4px 2px; width: max-content; }
.bk-filters form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.bk-filters label { display: grid; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }

/* ---------- Bootstrap ---------- */
.ui .btn { font-weight: 800; border-radius: 12px; font-size: 0.92rem; padding: 10px 18px; box-shadow: none !important; }
.ui .btn-sm { font-size: 0.82rem; padding: 6px 12px; border-radius: 10px; }
.ui .btn-lg { padding: 14px 22px; font-size: 1rem; }
.ui .btn-primary { background: var(--brand); border-color: var(--brand); }
.ui .btn-primary:hover, .ui .btn-primary:focus { background: var(--brand-600); border-color: var(--brand-600); }
.ui .btn-light, .ui .btn-outline-secondary { background: var(--slate-50); border: 0; color: var(--ink); }
.ui .btn-light:hover, .ui .btn-outline-secondary:hover { background: #E3E7F0; color: var(--ink); }
.ui .btn-outline-primary { border: 0; background: var(--brand-50); color: var(--brand); }
.ui .btn-outline-primary:hover { background: var(--brand-100); color: var(--brand); }
.ui .btn-success { background: var(--green); border-color: var(--green); }
.ui .btn-success:hover { background: #0B7F56; border-color: #0B7F56; }
.ui .btn-outline-danger { background: var(--red-50); border: 0; color: var(--red); }
.ui .btn-outline-danger:hover { background: #F8D6D6; color: #B32626; }
.ui .btn-warning { background: var(--amber); border-color: var(--amber); color: #fff; }
.ui .btn:disabled { opacity: 0.4; }
.ui .form-label { font-weight: 700; font-size: 0.86rem; color: var(--ink); margin-bottom: 6px; }
.ui .form-control, .ui .form-select { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.93rem; color: var(--ink); background-color: #FBFCFE; }
.ui .form-control:focus, .ui .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33, 71, 198, 0.15); background-color: #fff; }
.ui .form-text { color: var(--muted); font-size: 0.8rem; }
.ui .dropdown-menu { border: 0; border-radius: var(--r); box-shadow: 0 12px 32px rgba(14, 22, 48, 0.14); padding: 6px; }
.ui .dropdown-item { border-radius: 10px; padding: 8px 12px; }
.ui .table { --bs-table-bg: transparent; margin: 0; }
.ui .table > thead th { font-size: 0.78rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); padding: 12px 16px; white-space: nowrap; }
.ui .table > tbody td { padding: 14px 16px; border-color: var(--line-2); vertical-align: middle; }
.ui .badge { border-radius: 999px; font-weight: 700; padding: 5px 10px; }
.ui .text-muted { color: var(--muted) !important; }
.ui .card-body { padding: 20px 24px; }
.ui-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px 8px; }
.ui-card-head h2 { font-size: 1.1rem; margin: 0; }
.ui-card-head p { font-size: 0.85rem; color: var(--muted); margin: 2px 0 0; }
.ui-card-body { padding: 16px 24px 24px; }
.ui-grid { display: grid; gap: 22px; }
.ui-grid-main { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
.ui-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ui-page-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -0.04em; margin: 0; }
.ui-page-head p { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.ui-empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.ui-empty strong { display: block; color: var(--ink); }
.ui .page-title, .ui .page-sub, .ui .admin-hero, .ui .simple-status-guide { display: none; }

/* ---------- Revisão do pedido ---------- */
.tri { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 22px; align-items: start; }
.tri-left { display: grid; gap: 22px; min-width: 0; }
.tri-head { padding: 24px 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.tri-back { font-weight: 700; font-size: 0.86rem; text-decoration: none; }
.tri-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; margin: 10px 0 8px; }
.tri-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.tri-meta .ui-code { color: var(--ink); background: var(--bg); padding: 3px 9px; border-radius: 8px; }
.tri-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; list-style: none; margin: 18px 0 0; padding: 5px; border-radius: 14px; background: var(--bg); }
.tri-steps li { padding: 8px 6px; border-radius: 10px; color: var(--faint); font-size: 0.76rem; font-weight: 700; text-align: center; }
.tri-steps li.is-done { color: var(--brand); }
.tri-steps li.is-current { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.tri-steps li.is-rejected { background: var(--surface); color: var(--red); }
.tri-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.tri-section { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px; }
.tri-section > h2 { font-size: 1.1rem; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tri-section > h2 small { font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tri-video { border-radius: var(--r); overflow: hidden; background: #000; }
.tri-video video, .tri-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.tri-video-cap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 2px 4px; font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.tri-video-cap a { font-weight: 800; text-decoration: none; }
.tri-novideo { padding: 16px 18px; border-radius: var(--r); background: var(--amber-50); color: #8A5800; font-weight: 600; font-size: 0.9rem; }
.tri-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tri-photo { display: block; text-decoration: none; cursor: zoom-in; }
.tri-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: var(--bg); transition: transform 0.2s; }
.tri-photo:hover img { transform: scale(1.02); }
.tri-photo span { display: block; padding-top: 8px; font-size: 0.84rem; font-weight: 700; color: var(--text); }
.tri-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tri-files a { padding: 8px 14px; border-radius: 12px; background: var(--bg); font-weight: 700; font-size: 0.85rem; text-decoration: none; }
.tri-quote { margin: 0; padding: 16px 18px; border-left: 4px solid var(--amber); border-radius: 0 var(--r) var(--r) 0; background: var(--bg); font-size: 1rem; line-height: 1.7; color: var(--ink); white-space: pre-line; }
.tri-sub { margin: 16px 0 4px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.tri-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.tri-facts dt { display: none; }
.tri-facts dd { margin: 0; }
.tri-fact { padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); }
.tri-fact span { display: block; font-size: 0.76rem; font-weight: 700; color: var(--muted); }
.tri-fact b { display: block; font-size: 0.9rem; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.tri-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tri-timeline li { display: flex; gap: 12px; padding: 10px 0; }
.tri-timeline li::before { content: ''; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--brand-100); flex: none; }
.tri-timeline li.is-pastor::before { background: var(--amber); }
.tri-timeline .tl-who { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.tri-timeline .tl-who b { color: var(--ink); font-weight: 800; margin-right: 6px; }
.tri-timeline .tl-msg { font-size: 0.92rem; white-space: pre-line; }
.tri-timeline li > div { display: grid; }

.tri-right { position: sticky; top: 24px; }
.tri-decide { display: grid; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.tri-decide > h2 { font-size: 1.15rem; margin: 0; }
.tri-block { display: grid; gap: 12px; }
.tri-block + .tri-block, .tri-actions { padding-top: 14px; border-top: 1px solid var(--line-2); }
.tri-checks { display: grid; gap: 8px; }
.tri-check { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); cursor: pointer; margin: 0; font-weight: 700; font-size: 0.88rem; color: var(--text); transition: background 0.15s; }
.tri-check input { width: 20px; height: 20px; flex: none; accent-color: var(--green); }
.tri-check:has(input:checked) { background: var(--green-50); color: #075E40; }
.tri-block .btn-success, .tri-block .btn-primary { padding: 14px 18px; font-size: 1rem; }
.tri-actions { display: grid; gap: 8px; }
.tri-actions > .btn { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; }
.tri-actions small { opacity: 0.6; }
.tri-panel { padding: 14px; border-radius: var(--r); background: var(--bg); }
.tri-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tri-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; font-weight: 700; color: var(--text); }
.tri-chips button:hover { color: var(--brand); border-color: var(--brand-100); }
.tri-result { padding: 16px; border-radius: var(--r); font-size: 0.9rem; font-weight: 600; }
.tri-result strong { display: block; font-size: 1rem; font-weight: 800; margin-bottom: 2px; }
.tri-result.r-approved { background: var(--green-50); color: #075E40; }
.tri-result.r-combens { background: var(--violet-50); color: #4C25A8; }
.tri-result.r-rejected { background: var(--red-50); color: #8E1F1F; }
.tri-result.r-waiting { background: var(--amber-50); color: #8A5800; }
.tri-result.r-done { background: var(--bg); color: var(--text); }
.tri-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tri-note-list li { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--bg); font-size: 0.86rem; font-weight: 600; }

/* ---------- Login ---------- */
.ui-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.ui-auth-box { width: 100%; max-width: 400px; }
.ui-auth-box .ui-logo { justify-content: center; padding-bottom: 24px; }
.ui-auth-box form { background: #fff; border-radius: var(--r-lg); padding: 32px 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.ui-auth-box h1 { font-size: 1.6rem; letter-spacing: -0.03em; margin: 0 0 4px; }
.ui-auth-box .btn { padding: 14px; font-size: 1rem; }
.ui-auth-box .note { text-align: center; color: var(--muted); font-size: 0.86rem; margin-top: 18px; font-weight: 600; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .bk-cols, .tri, .ui-grid-main { grid-template-columns: minmax(0, 1fr); }
  .tri-right { position: static; }
  .bk-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tri-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ui-sidebar { display: none; }
  .ui-topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 12px 18px; background: rgba(243, 245, 249, 0.92); backdrop-filter: blur(10px); }
  .ui-topbar .ui-logo-mark { width: 32px; height: 32px; }
  .ui-topbar strong { color: var(--ink); font-weight: 800; font-size: 1.05rem; }
  .ui-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 24px rgba(14, 22, 48, 0.08); }
  .ui-tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--muted) !important; text-decoration: none; font-size: 0.72rem; font-weight: 700; }
  .ui-tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .ui-tabbar a.is-active { color: var(--brand) !important; }
  .ui-tabbar b { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--amber); color: #fff; font-size: 0.66rem; display: grid; place-items: center; }
  .ui-content { padding: 6px 16px 110px; }
  .bk-hero { grid-template-columns: 1fr; padding: 24px 20px 60px; }
  .bk-hero::after { left: 20px; right: 20px; }
  .bk-hero-side { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .bk-hero-side div { padding: 10px 12px; }
  .bk-hero-side strong { font-size: 1.3rem; }
  .bk-hero-btn { justify-self: stretch; text-align: center; }
  .bk-shortcuts { display: flex; overflow-x: auto; gap: 10px; scrollbar-width: none; margin: 0 -16px 22px; padding: 2px 16px 6px; }
  .bk-shortcuts a { flex: 0 0 104px; }
  .bk-list { padding: 4px 6px 10px; }
  .bk-list a { padding: 12px 10px; gap: 12px; }
  .bk-avatar { width: 42px; height: 42px; }
  .bk-preview { display: none; }
  .tri-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tri-steps { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .tri-head, .tri-section, .tri-decide { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { .ui *, .ui *::before { transition: none !important; } }

/* ---------- Igrejas, avisos, relatórios e histórico ---------- */
.ui .dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.ui .stat-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; border: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden;
}
.ui .stat-card::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.ui .stat-card.status-amber::before { background: var(--amber); }
.ui .stat-card.status-green::before { background: var(--green); }
.ui .stat-card.status-red::before { background: var(--red); }
.ui .stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand); flex: none; font-size: 1.1rem; }
.ui .status-amber .stat-icon { background: var(--amber-50); color: var(--amber); }
.ui .status-green .stat-icon { background: var(--green-50); color: var(--green); }
.ui .status-red .stat-icon { background: var(--red-50); color: var(--red); }
.ui .stat-meta { display: grid; gap: 2px; min-width: 0; }
.ui .stat-label { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0; }
.ui .stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--ink); }
.ui .stat-trend { font-size: 0.78rem; font-weight: 700; color: var(--muted); background: none; padding: 0; }
.ui .trend-amber { color: #A86C00; }
.ui .trend-green { color: var(--green); }
.ui .trend-red { color: var(--red); }
.ui .trend-blue { color: var(--brand); }

.ui .filter-card .card-body { padding: 18px 22px; }
.ui .section-card h5, .ui .table-card-header h5 { font-size: 1.08rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.ui .table-card { background: var(--surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.ui .table-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px 24px 12px; border: 0; background: none; }
.ui .table-card-header p { font-size: 0.85rem; }
.ui .table-count { padding: 4px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: 0.8rem; font-weight: 800; }
.ui .table-wrap { overflow-x: auto; padding: 0 8px 10px; }
.ui .table-premium > tbody tr { transition: background 0.15s; }
.ui .table-premium > tbody tr:hover > td { background: var(--bg); }
.ui .table-premium > tbody tr > td:first-child { border-radius: 12px 0 0 12px; }
.ui .table-premium > tbody tr > td:last-child { border-radius: 0 12px 12px 0; }
.ui .table-premium > tbody tr:last-child > td { border-bottom: 0; }
.ui .link-dark { color: var(--ink) !important; font-weight: 800; text-decoration: none; }
.ui .link-dark:hover { color: var(--brand) !important; }
.ui .bg-primary-subtle { background: var(--brand-50) !important; color: var(--brand) !important; }
.ui .bg-success-subtle { background: var(--green-50) !important; color: var(--green) !important; }
.ui .bg-secondary-subtle { background: var(--slate-50) !important; color: var(--muted) !important; }
.ui .bg-warning-subtle { background: var(--amber-50) !important; color: #A86C00 !important; }
.ui .bg-danger-subtle { background: var(--red-50) !important; color: var(--red) !important; }
.ui .notification-message { max-width: 46ch; font-size: 0.86rem; color: var(--text); white-space: pre-line; }
.ui .audit-json { max-width: 40ch; font-family: var(--mono); font-size: 0.76rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ui .check-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); font-weight: 700; }
.ui .progress { height: 8px; border-radius: 999px; background: var(--slate-50); }
.ui .progress-bar { background: var(--brand); border-radius: 999px; }

/* Alerta de pedidos parados */
.bk-alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 22px; border-radius: var(--r-lg); background: var(--amber-50); border: 1px solid #F6DDA8; text-decoration: none; color: var(--ink) !important; }
.bk-alert:hover { border-color: var(--amber); }
.bk-alert .bk-round { background: #fff; }
.bk-alert-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.bk-alert-text strong { font-weight: 800; }
.bk-alert-text small { color: #8A5800; font-weight: 600; font-size: 0.84rem; }
.bk-alert-go { flex: none; font-weight: 800; font-size: 0.88rem; color: #8A5800; }
@media (max-width: 600px) { .bk-alert-go { display: none; } }

.tri-quote.tri-needs { border-left-color: var(--brand); background: var(--brand-50); }

/* Aviso único ao pastor */
.tri-note { padding: 14px; border-radius: var(--r-sm); background: var(--bg); }
.tri-note p { margin: 0 0 10px; font-size: 0.88rem; font-weight: 600; color: var(--text); white-space: pre-line; }
.tri-note-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tri-note-actions .btn-sm { padding: 7px 12px; }
.tri-linkbtn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 0.8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.tri-linkbtn:hover { color: var(--brand); }

.bk-alert.is-violet { background: var(--violet-50); border-color: #DCD0FB; }
.bk-alert.is-violet .bk-alert-text small, .bk-alert.is-violet .bk-alert-go { color: #5B2FC0; }
.tri-days { display: block; margin-top: 6px; font-size: 0.82rem; font-weight: 700; }
.tri-days.is-late { color: var(--red); }

/* Histórico por igreja */
.tri-history-link { display: inline-block; margin: -2px 0 10px; font-size: 0.86rem; font-weight: 700; text-decoration: none; }
.ch-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.ch-stats div { display: grid; padding: 16px 18px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.ch-stats strong { font-size: 1.8rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.ch-stats span { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.ch-timeline { list-style: none; margin: 0; padding: 4px 12px 14px; }
.ch-timeline li { position: relative; padding-left: 22px; }
.ch-timeline li::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.ch-timeline li::after { content: ''; position: absolute; left: 1px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.ch-timeline li:first-child::before { top: 22px; }
.ch-timeline li:last-child::before { bottom: auto; height: 22px; }
.ch-timeline a { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--r); text-decoration: none; color: var(--text) !important; }
.ch-timeline a:hover { background: var(--bg); }
.ch-date { flex: none; width: 84px; font-size: 0.82rem; font-weight: 700; color: var(--muted); padding-top: 2px; }
.ch-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ch-main strong { color: var(--ink); font-weight: 800; }
.ch-side { flex: none; }
@media (max-width: 860px) {
  .ch-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-timeline a { flex-wrap: wrap; }
  .ch-date { width: auto; }
}

/* Mapa de pedidos em PE */
.pe-map-wrap { padding: 0 18px 8px; overflow-x: auto; }
.pe-map { display: block; width: 100%; min-width: 620px; height: auto; }
.pe-map-bg { fill: var(--bg); }
.pe-map-region { fill: var(--faint); font: 700 11px var(--font); letter-spacing: 0.02em; }
.pe-map-point circle { fill: var(--brand); fill-opacity: 0.22; stroke: var(--brand); stroke-width: 1.5; transition: fill-opacity 0.15s; }
.pe-map-point:hover circle { fill-opacity: 0.45; }
.pe-map-n { fill: var(--brand); font: 800 11px var(--font); pointer-events: none; }
.pe-map-label { fill: var(--ink); font: 700 11px var(--font); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; pointer-events: none; }
.pe-map-extra { padding: 0 24px 18px; margin: 0; font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* ===== Urgente ===== */
.urgent-tag { display: inline-block; background: var(--red); color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .08em; padding: .28rem .6rem; border-radius: 6px; vertical-align: middle; }
.urgent-tag.is-sm { font-size: .62rem; padding: .16rem .42rem; margin-right: .25rem; }
.urgent-card { background: #fff; border: 2px solid var(--red); border-radius: 18px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 10px 30px -16px rgba(217,58,58,.55); }
.urgent-card header { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.urgent-card h2 { font-size: 1.1rem; font-weight: 800; margin: 0; color: var(--red); flex: 1; }
.urgent-card header a { color: var(--red); font-weight: 700; text-decoration: none; }
.urgent-card ul { list-style: none; margin: 0; padding: 0; }
.urgent-card li a { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .65rem .75rem; border-radius: 12px; text-decoration: none; color: var(--ink); background: #FFF4F4; margin-top: .4rem; }
.urgent-card li a:hover { background: #FFE6E6; }
.urgent-card li strong { font-weight: 800; }
.urgent-card li span { grid-column: 1; color: #6b7280; font-size: .85rem; }
.urgent-card li .ui-status { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.bk-list a.is-urgent { background: #FFF4F4; box-shadow: inset 4px 0 0 var(--red); }
.bk-chips a.is-urgent { color: var(--red); border-color: rgba(217,58,58,.35); }
.bk-chips a.is-urgent.is-active { background: var(--red); color: #fff; border-color: var(--red); }
.urgent-banner { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: #FFF4F4; border: 2px solid var(--red); border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; color: var(--ink); }
.urgent-banner .urgent-since { color: #6b7280; font-size: .85rem; margin-left: auto; }

/* ===== Avaliar fila ===== */
.fila-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 14px; padding: .7rem 1rem; margin-bottom: 1rem; }
.fila-bar strong { font-size: 1.05rem; }
.fila-bar a { color: #fff; font-weight: 700; text-decoration: none; opacity: .85; }
.fila-bar a:hover { opacity: 1; }
.fila-bar .fila-skip { margin-left: auto; background: rgba(255,255,255,.12); padding: .35rem .8rem; border-radius: 999px; }
.bk-hero-actions { grid-column: 1 / -1; display: flex; gap: .6rem; flex-wrap: wrap; position: relative; z-index: 1; }
.bk-hero-btn.is-ghost { background: transparent; color: var(--brand) !important; box-shadow: inset 0 0 0 2px var(--brand); }
.bk-hero-btn.is-ghost:hover { background: var(--brand-50); }
.bk-fila-btn { margin-left: auto; }

/* ===== Painel TV ===== */
body.tv { margin: 0; min-height: 100vh; background: var(--ink); color: #fff; font-family: Manrope, system-ui, sans-serif; padding: 2.2vw 2.6vw; box-sizing: border-box; }
.tv h1, .tv h2 { margin: 0; }
.tv-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.6vw; }
.tv-eyebrow { color: var(--amber); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 1vw; }
.tv-head h1 { font-size: 2.6vw; font-weight: 800; }
.tv-clock { text-align: right; }
.tv-clock strong { display: block; font-size: 3.2vw; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-clock span { color: #9AA6C8; font-size: .9vw; }
.tv-stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1vw; margin-bottom: 1.2vw; }
.tv-stage { background: #18224A; border-radius: 1vw; padding: 1.2vw; border-top: .35vw solid var(--brand); }
.tv-stage strong { display: block; font-size: 4vw; font-weight: 800; line-height: 1; }
.tv-stage span { color: #C9D2EE; font-size: 1.05vw; font-weight: 600; }
.tv-stage.is-waiting { border-color: var(--amber); }
.tv-stage.is-approved, .tv-stage.is-combens { border-color: var(--violet); }
.tv-stage.is-done { border-color: var(--green); }
.tv-week { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 1vw; align-items: center; background: #18224A; border-radius: 1vw; padding: 1vw 1.4vw; margin-bottom: 1.2vw; }
.tv-week h2 { font-size: 1.1vw; color: var(--amber); text-transform: uppercase; letter-spacing: .1em; padding-right: 1vw; }
.tv-week strong { font-size: 2.4vw; font-weight: 800; margin-right: .5vw; }
.tv-week span { color: #C9D2EE; font-size: 1vw; }
.tv-week .is-alert strong { color: #FF7A7A; }
.tv-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.2vw; }
.tv-panel { background: #18224A; border-radius: 1vw; padding: 1.4vw; }
.tv-panel h2 { font-size: 1.3vw; font-weight: 800; margin-bottom: .8vw; }
.tv-urgent-title { display: flex; align-items: center; gap: .6vw; color: #FF7A7A; }
.tv-list { list-style: none; margin: 0 0 1.2vw; padding: 0; }
.tv-list li { padding: .7vw .9vw; border-radius: .7vw; background: rgba(255,255,255,.05); margin-bottom: .5vw; }
.tv-list li strong { display: block; font-size: 1.25vw; }
.tv-list li span { color: #9AA6C8; font-size: .95vw; }
.tv-list.is-urgent li, .tv-list li.is-urgent { background: rgba(217,58,58,.22); box-shadow: inset .3vw 0 0 var(--red); }
.tv-empty { color: #9AA6C8; font-size: 1.1vw; }
.tv .pe-map-svg { width: 100%; height: auto; }
.tv .pe-map-region { fill: #6E7BA6; font-size: 13px; font-weight: 700; }
.tv .pe-map-point circle { fill: rgba(224,154,18,.55); stroke: var(--amber); stroke-width: 1.5; }
.tv .pe-map-n { fill: #fff; font-size: 12px; font-weight: 800; }
@media (max-width: 900px) { .tv-stages { grid-template-columns: repeat(3, 1fr); } .tv-grid, .tv-week { grid-template-columns: 1fr; } }
.fila-bar .fila-actions { margin-left: auto; display: flex; gap: .5rem; }

/* ===== Lista de pedidos (v2) ===== */
.rq-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.rq-head h1 { margin: 0; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.rq-head p { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.rq-head-actions { display: flex; gap: 10px; align-items: center; flex: 1; justify-content: flex-end; min-width: 300px; }
.rq-head-actions .bk-search { flex: 1; max-width: 380px; margin: 0; }
.rq-head-actions .btn { padding: 11px 18px; border-radius: 12px; font-weight: 800; white-space: nowrap; }

.rq-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px; margin-bottom: 14px; flex-wrap: wrap; position: relative; z-index: 5; }
.rq-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.rq-tabs a, .rq-more summary { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 11px; color: var(--text) !important; font-weight: 700; font-size: .88rem; text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.rq-more summary::-webkit-details-marker { display: none; }
.rq-tabs a:hover, .rq-more summary:hover { background: var(--bg); }
.rq-tabs a b, .rq-more a b { font-weight: 800; font-size: .75rem; background: var(--bg); color: var(--muted); padding: 1px 7px; border-radius: 999px; }
.rq-tabs a.is-active, .rq-more.is-active > summary { background: var(--brand); color: #fff !important; }
.rq-tabs a.is-active b { background: rgba(255,255,255,.22); color: #fff; }
.rq-tabs a.is-urgent { color: var(--red) !important; }
.rq-tabs a.is-urgent.is-active { background: var(--red); color: #fff !important; }
.rq-more { position: relative; }
.rq-more > div, .rq-more > form { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgba(14,22,48,.25); padding: 8px; min-width: 220px; display: grid; gap: 2px; }
.rq-more > div a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 9px; color: var(--text) !important; text-decoration: none; font-weight: 700; font-size: .88rem; }
.rq-more > div a:hover, .rq-more > div a.is-active { background: var(--brand-50); color: var(--brand) !important; }
.rq-more.is-filter > form { min-width: 280px; padding: 14px; gap: 10px; }
.rq-more.is-filter label { display: grid; gap: 4px; font-weight: 700; font-size: .82rem; color: var(--muted); }

.rq-card { background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(14,22,48,.04), 0 10px 30px -18px rgba(14,22,48,.18); overflow: hidden; }
.rq-list { list-style: none; margin: 0; padding: 0; }
.rq-list li + li { border-top: 1px solid var(--line); }
.rq-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 16px 22px 16px 24px; text-decoration: none; color: var(--ink); position: relative; transition: background .15s; }
.rq-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line); }
.rq-row.sev-critical::before { background: var(--red); }
.rq-row.sev-high::before { background: var(--amber); }
.rq-row:hover { background: #F8FAFE; }
.rq-row.is-urgent { background: #FFF6F6; }
.rq-row.is-urgent:hover { background: #FFEEEE; }
.rq-main { display: grid; gap: 5px; min-width: 0; }
.rq-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rq-title strong { font-size: 1.02rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-sev { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; flex: none; }
.rq-sev.s-critical { background: #FDE8E8; color: var(--red); }
.rq-sev.s-high { background: #FDF3E1; color: #A86A00; }
.rq-meta { display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--muted); font-size: .82rem; font-weight: 600; }
.rq-meta > span + span::before { content: "·"; margin: 0 8px; opacity: .6; }
.rq-meta .ui-code { color: var(--brand); font-weight: 700; }
.rq-desc { color: #4B5675; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-side { display: grid; justify-items: end; gap: 6px; }
.rq-side small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.rq-side small.is-late { color: var(--red); }
@media (max-width: 720px) {
  .rq-row { grid-template-columns: 1fr; gap: 10px; }
  .rq-side { justify-items: start; grid-auto-flow: column; align-items: center; }
  .rq-head-actions { min-width: 0; width: 100%; }
}

/* ===== Início: painel do dia ===== */
.hd-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.hd-date { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: capitalize; }
.hd-hello h1 { margin: 2px 0 6px; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.hd-summary { margin: 0; display: flex; flex-wrap: wrap; color: var(--text); font-weight: 700; }
.hd-summary span + span::before { content: "·"; margin: 0 9px; color: var(--muted); }
.hd-summary .is-urgent { color: var(--red); }
.hd-hello-actions { display: flex; gap: 10px; }
.hd-hello-actions .btn { padding: 11px 18px; border-radius: 12px; font-weight: 800; }

.hd-flow { display: grid; grid-template-columns: repeat(6, 1fr); background: #fff; border-radius: 18px; padding: 8px; gap: 0; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(14,22,48,.04), 0 10px 30px -20px rgba(14,22,48,.2); }
.hd-step { position: relative; display: grid; gap: 2px; padding: 14px 18px 14px 22px; border-radius: 12px; text-decoration: none; color: var(--muted) !important; }
.hd-step + .hd-step::before { content: ""; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: translateY(-50%) rotate(45deg); background: #fff; }
.hd-step strong { font-size: 1.8rem; font-weight: 800; line-height: 1; color: #C3CADB; }
.hd-step span { font-weight: 700; font-size: .82rem; }
.hd-step:hover { background: var(--bg); }
.hd-step.has-items strong { color: var(--ink); }
.hd-step.has-items span { color: var(--text); }
.hd-step.has-items::after { content: ""; position: absolute; left: 10px; top: 16px; width: 4px; height: 26px; border-radius: 4px; background: var(--brand); }
.hd-step.is-waiting.has-items::after { background: var(--amber); }
.hd-step.is-approved.has-items::after, .hd-step.is-combens.has-items::after { background: var(--violet); }
.hd-step.is-done.has-items::after { background: var(--green); }

.hd-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.hd-side { display: grid; gap: 18px; }
.hd-card { background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(14,22,48,.04), 0 10px 30px -20px rgba(14,22,48,.2); }
.hd-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hd-card h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--ink); flex: 1; }
.hd-card > header a { color: var(--brand); font-weight: 700; font-size: .85rem; text-decoration: none; }
.hd-count { background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.hd-muted { color: var(--muted); margin: 0; }

.hd-todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hd-todo li a { display: grid; grid-template-columns: 128px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg); text-decoration: none; color: var(--ink); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.hd-todo li a:hover { background: #fff; border-color: var(--line); }
.hd-kind { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 5px 9px; border-radius: 8px; text-align: center; background: var(--brand-50); color: var(--brand); }
.hd-todo li.is-urgent a { background: #FFF4F4; }
.hd-todo li.is-urgent .hd-kind { background: var(--red); color: #fff; }
.hd-todo li.is-combens .hd-kind { background: #EFE9FC; color: var(--violet); }
.hd-todo li.is-pastor .hd-kind { background: #FDF3E1; color: #A86A00; }
.hd-todo-main { display: grid; min-width: 0; }
.hd-todo-main strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-todo-main small { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-open { color: var(--brand); font-weight: 800; font-size: .85rem; }
.hd-more { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 800; text-decoration: none; }
.hd-done { display: grid; gap: 4px; padding: 26px; text-align: center; background: #EAF7F1; border-radius: 14px; }
.hd-done strong { color: var(--green); font-size: 1.1rem; }
.hd-done span { color: var(--muted); }

.hd-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.hd-nums div { display: grid; }
.hd-nums strong { font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.hd-nums span { color: var(--muted); font-weight: 700; font-size: .8rem; }
.hd-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 64px; }
.hd-bars span { height: max(var(--h), 6%); background: var(--brand); border-radius: 4px 4px 2px 2px; }
.hd-bars span.is-zero { background: var(--line); height: 6%; }
.hd-bars span:last-child { background: var(--amber); }
.hd-bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; font-weight: 700; margin-top: 6px; }
.hd-avg { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .88rem; }
.hd-avg strong { color: var(--ink); }
.hd-map svg { width: 100%; height: auto; background: var(--bg); border-radius: 12px; }
.hd-map circle { fill: rgba(33,71,198,.28); stroke: var(--brand); stroke-width: 1.5; }

.hd-activity ol { list-style: none; margin: 0; padding: 0; }
.hd-activity li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.hd-activity li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.hd-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--brand); box-shadow: 0 0 0 3px #fff; position: relative; }
.hd-dot.is-pastor { background: var(--amber); }
.hd-dot.is-sistema { background: #A9B2C8; }
.hd-activity a { display: grid; gap: 2px; text-decoration: none; color: var(--text); }
.hd-activity a:hover .hd-act-msg { color: var(--brand); }
.hd-activity strong { color: var(--ink); font-weight: 800; font-size: .9rem; }
.hd-act-msg { font-size: .9rem; }
.hd-activity small { color: var(--muted); font-weight: 600; font-size: .78rem; }

@media (max-width: 1100px) { .hd-flow { grid-template-columns: repeat(3, 1fr); } .hd-step + .hd-step::before { display: none; } .hd-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .hd-flow { grid-template-columns: repeat(2, 1fr); } .hd-todo li a { grid-template-columns: 1fr auto; } .hd-kind { grid-column: 1 / -1; justify-self: start; } }

/* Início: gráfico mensal e cidades */
.hd-date { text-transform: none; }
.hd-date::first-letter { text-transform: uppercase; }
.hd-left { display: grid; gap: 18px; }
.hd-legend { margin: 0; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; font-weight: 700; }
.hd-legend span { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.hd-legend .is-rec, .hd-legend .is-open { background: var(--brand); }
.hd-legend .is-app { background: var(--violet); }
.hd-legend .is-done { background: var(--green); }
.hd-legend .is-all { background: #C9D3EF; }
.hd-chart > header { flex-wrap: wrap; }
.hd-months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; height: 210px; padding-top: 18px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 51px, var(--line) 51px 52px); }
.hd-month { display: grid; grid-template-rows: 1fr auto; gap: 8px; min-height: 0; }
.hd-month-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 100%; }
.hd-month-bars span { position: relative; width: 26%; max-width: 22px; height: max(var(--h), 3px); border-radius: 6px 6px 2px 2px; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.hd-month-bars .is-rec { background: var(--brand); }
.hd-month-bars .is-app { background: var(--violet); }
.hd-month-bars .is-done { background: var(--green); }
.hd-month-bars b { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: .72rem; font-weight: 800; color: var(--ink); }
.hd-month small { text-align: center; color: var(--muted); font-weight: 700; text-transform: capitalize; padding-bottom: 2px; transform: translateY(26px); }
.hd-chart { padding-bottom: 38px; }
.hd-cities ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.hd-cities a { display: grid; grid-template-columns: 118px 1fr 28px; gap: 10px; align-items: center; text-decoration: none; color: var(--text); padding: 5px 6px; border-radius: 8px; }
.hd-cities a:hover { background: var(--bg); }
.hd-city-name { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-city-bar { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.hd-city-bar > span { display: block; height: 100%; width: var(--w); background: #C9D3EF; border-radius: 999px; overflow: hidden; }
.hd-city-bar i { display: block; height: 100%; width: var(--o); background: var(--brand); }
.hd-city-n { font-weight: 800; color: var(--ink); text-align: right; }

/* Início: hero, indicadores e composição */
.hd-hello { background: var(--ink); color: #fff; border-radius: 22px; padding: 26px 30px; position: relative; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(14,22,48,.6); }
.hd-hello::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(33,71,198,.55), transparent 70%); pointer-events: none; }
.hd-hello::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--amber); }
.hd-hello > * { position: relative; z-index: 1; }
.hd-hello h1 { color: #fff; }
.hd-hello .hd-date { color: #9AA6C8; }
.hd-hello .hd-summary { color: #DCE2F3; }
.hd-hello .hd-summary span + span::before { color: #6E7BA6; }
.hd-hello .hd-summary .is-urgent { color: #FF8A8A; }
.hd-hello .btn-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.hd-hello .btn-light:hover { background: rgba(255,255,255,.18); color: #fff; }
.hd-hello .btn-primary { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.hd-hello .btn-primary:hover { background: #F0AA22; border-color: #F0AA22; color: var(--ink); }

.hd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.hd-kpi { background: #fff; border-radius: 18px; padding: 16px 18px 14px; display: grid; gap: 6px; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(14,22,48,.04), 0 10px 30px -20px rgba(14,22,48,.2); }
.hd-kpi-label { color: var(--muted); font-weight: 700; font-size: .8rem; }
.hd-kpi-row { display: flex; align-items: baseline; gap: 10px; }
.hd-kpi-row strong { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.hd-delta { font-size: .75rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.hd-delta.is-up, .hd-delta.is-good { background: #E6F6EF; color: var(--green); }
.hd-delta.is-down, .hd-delta.is-bad { background: #FDE8E8; color: var(--red); }
.hd-kpi-foot { color: #A9B2C8; font-size: .72rem; font-weight: 600; }
.hd-spark { width: 100%; height: 34px; display: block; }
.hd-spark .line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hd-spark .fill { fill: rgba(33,71,198,.1); }
.hd-ring { position: absolute; right: 16px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line) 0); }
.hd-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.hd-kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--brand); }
.hd-kpi.is-violet::before { background: var(--violet); }
.hd-kpi.is-amber::before { background: var(--amber); }
.hd-kpi.is-green::before { background: var(--green); }

.hd-mix-body { display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: center; }
.hd-donut { width: 128px; height: 128px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.hd-donut::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.hd-donut span { position: relative; display: grid; text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; }
.hd-donut strong { font-size: 1.7rem; color: var(--ink); font-weight: 800; line-height: 1; }
.hd-mix-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hd-mix-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; font-weight: 700; font-size: .88rem; }
.hd-mix-legend i { width: 12px; height: 12px; border-radius: 4px; }
.hd-mix-legend b { color: var(--ink); }
.hd-sev { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hd-sev-title { display: block; color: var(--muted); font-weight: 700; font-size: .8rem; margin-bottom: 8px; }
.hd-sev-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }
.hd-sev-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.hd-sev-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.hd-sev-legend b { color: var(--ink); }
@media (max-width: 1100px) { .hd-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hd-kpis { grid-template-columns: 1fr; } .hd-mix-body { grid-template-columns: 1fr; justify-items: center; } }

/* ===== Igrejas (v2) ===== */
.ch-form-card { background: #fff; border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; border: 2px solid var(--brand-50); box-shadow: 0 16px 40px -24px rgba(33,71,198,.45); }
.ch-form-card > header { display: flex; align-items: center; margin-bottom: 14px; }
.ch-form-card h2 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--ink); flex: 1; }
.ch-close { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--muted); text-decoration: none; font-weight: 800; }
.ch-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 14px; }
.ch-form > label { grid-column: span 2; display: grid; gap: 5px; font-weight: 700; font-size: .82rem; color: var(--muted); }
.ch-form > label.is-sm { grid-column: span 1; }
.ch-form > label.is-lg { grid-column: span 3; }
.ch-form > label:nth-of-type(2) { grid-column: span 5; }
.ch-form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.ch-check { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-right: auto; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-list li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 22px; }
.ch-list li + li { border-top: 1px solid var(--line); }
.ch-list li:hover { background: #F8FAFE; }
.ch-list li.is-off { opacity: .6; }
.ch-avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: var(--brand); background: var(--brand-50); }
.ch-main { display: grid; gap: 3px; min-width: 0; text-decoration: none; color: var(--ink); }
.ch-main strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-main:hover strong { color: var(--brand); }
.ch-pastor { color: var(--text); font-size: .86rem; font-weight: 600; }
.ch-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ch-tag { font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.ch-tag.is-open { background: var(--brand-50); color: var(--brand); }
.ch-tag.is-warn { background: #FDF3E1; color: #A86A00; }
.ch-tag.is-off { background: #EEF0F5; color: var(--muted); }
.ch-total { color: var(--muted); font-weight: 700; font-size: .8rem; min-width: 70px; text-align: right; }
.ch-actions { display: flex; gap: 6px; }
.ch-actions form { margin: 0; }
.ch-actions .btn { border-radius: 10px; font-weight: 700; }
.ch-toggle { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.ch-toggle:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 900px) {
  .ch-list li { grid-template-columns: 44px 1fr; }
  .ch-tags, .ch-actions { grid-column: 2; justify-content: flex-start; }
  .ch-form { grid-template-columns: 1fr 1fr; }
  .ch-form > label, .ch-form > label.is-sm, .ch-form > label.is-lg, .ch-form > label:nth-of-type(2) { grid-column: span 2; }
}

/* ===== Relatórios: pedidos por região ===== */
.rg-card { background: #fff; border-radius: 20px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(14,22,48,.04), 0 10px 30px -20px rgba(14,22,48,.2); }
.rg-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.rg-head > div { flex: 1; }
.rg-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.rg-head p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.rg-total { color: var(--muted); font-weight: 700; white-space: nowrap; }
.rg-total strong { font-size: 1.6rem; color: var(--ink); }
.rg-strip { display: flex; height: 34px; border-radius: 12px; overflow: hidden; gap: 3px; margin-bottom: 18px; }
.rg-strip span { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; min-width: 6px; }
.rg-c0 { background: #2147C6; } .rg-c1 { background: #0F9D6B; } .rg-c2 { background: #E09A12; }
.rg-c3 { background: #C2552B; } .rg-c4 { background: #6D3FD8; } .rg-c5 { background: #A9B2C8; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.rg-region { background: var(--bg); border-radius: 16px; padding: 14px 16px; }
.rg-region > header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rg-region > header i { width: 10px; height: 10px; border-radius: 3px; }
.rg-region h3 { margin: 0; font-size: .95rem; font-weight: 800; color: var(--ink); flex: 1; }
.rg-region > header span { color: var(--muted); font-weight: 700; font-size: .82rem; }
.rg-region > header strong { color: var(--ink); }
.rg-region ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rg-region li { display: grid; grid-template-columns: 1fr 70px 22px; gap: 8px; align-items: center; font-size: .84rem; }
.rg-city { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-bar { height: 7px; background: #fff; border-radius: 999px; overflow: hidden; }
.rg-bar span { display: block; height: 100%; border-radius: 999px; }
.rg-region li b { text-align: right; color: var(--ink); }
.rg-region small { display: block; margin-top: 8px; color: var(--muted); font-weight: 600; }

/* ===== Anotações internas ===== */
.nt-private { font-weight: 700; font-size: .7rem; color: #A86A00; background: #FDF3E1; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.nt-off { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.nt-form { display: grid; gap: 8px; margin-top: 8px; }
.nt-form .btn { justify-self: end; border-radius: 10px; font-weight: 800; }
.nt-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.nt-list li { position: relative; background: #FFFAEF; border: 1px solid #F5E3BC; border-radius: 12px; padding: 10px 34px 10px 12px; }
.nt-list p { margin: 0 0 4px; white-space: pre-line; color: var(--ink); font-size: .9rem; }
.nt-list small { color: var(--muted); font-weight: 600; font-size: .76rem; }
.nt-list form { position: absolute; top: 6px; right: 6px; }
.nt-del { border: 0; background: transparent; color: #A9B2C8; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; cursor: pointer; }
.nt-del:hover { background: #FDE8E8; color: var(--red); }
.nt-maint { list-style: none; margin: 8px 0; padding: 0; font-size: .85rem; color: var(--text); display: grid; gap: 4px; }

/* ===== Manutenção da igreja ===== */
.mt-mb { margin-bottom: 18px; }
.mt-head { display: flex; align-items: center; }
.mt-head h2 { flex: 1; }
.mt-head .btn { border-radius: 10px; font-weight: 800; }
.mt-alert { display: grid; gap: 2px; background: #FDF3E1; border-left: 4px solid var(--amber); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; color: #6B4600; font-size: .9rem; }
.mt-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.mt-sum strong { color: var(--ink); }
.mt-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--bg); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.mt-form > label { display: grid; gap: 5px; font-weight: 700; font-size: .82rem; color: var(--muted); }
.mt-form > label.is-wide { grid-column: span 2; }
.mt-form > label.is-full, .mt-from, .mt-form-foot { grid-column: 1 / -1; }
.mt-from { margin: 0; color: var(--brand); font-weight: 700; }
.mt-form-foot { display: flex; justify-content: flex-end; gap: 8px; }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-list li { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; padding: 12px 0; align-items: start; }
.mt-list li + li { border-top: 1px solid var(--line); }
.mt-date { color: var(--muted); font-weight: 700; font-size: .85rem; padding-top: 2px; }
.mt-main { display: grid; gap: 3px; }
.mt-kind { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--brand-50); color: var(--brand); padding: 2px 7px; border-radius: 6px; margin-right: 4px; }
.mt-desc { color: var(--text); font-size: .88rem; white-space: pre-line; }
.mt-main small { color: var(--muted); font-weight: 600; }
@media (max-width: 720px) { .mt-form { grid-template-columns: 1fr 1fr; } .mt-list li { grid-template-columns: 1fr auto; } .mt-date { grid-column: 1 / -1; } }

/* ===== Relatório mensal ===== */
.mo-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 20px; padding: 20px 24px; border-left: 6px solid var(--amber); }
.mo-card > div { flex: 1; min-width: 240px; }
.ui .mo-card h2 { margin: 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.mo-card p { margin: 4px 0 0; color: #B8C2E0; font-size: .9rem; }
.mo-form { display: flex; gap: 10px; flex-wrap: wrap; }
.mo-form .form-control { width: auto; min-width: 170px; }
.mo-form .btn { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 800; }
.mo-ready { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px dashed var(--amber); border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; text-decoration: none; color: var(--ink); }
.mo-ready:hover { background: #FFFAEF; }
.mo-ready-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--amber); color: var(--ink); font-weight: 800; font-size: .75rem; display: grid; place-items: center; }
.mo-ready > span:nth-child(2) { flex: 1; display: grid; }
.mo-ready small { color: var(--muted); font-weight: 600; }
.mo-ready-go { color: #A86A00; font-weight: 800; }
