/* =====================================================================
   Olitech — design system
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ot-navy-900: #0b1b36;
  --ot-navy-800: #11264a;
  --ot-navy-700: #1a3561;
  --ot-blue-600: #1f6feb;
  --ot-blue-500: #3b82f6;
  --ot-blue-50: #eaf2ff;
  --ot-green-400: #38d6ac;
  --ot-gray-900: #111827;
  --ot-gray-700: #374151;
  --ot-gray-500: #6b7280;
  --ot-gray-300: #d1d5db;
  --ot-gray-200: #e5e7eb;
  --ot-gray-100: #f1f3f7;
  --ot-bg: #f4f6fa;
  --ot-surface: #ffffff;
  --ot-surface-2: #fafbfc;      /* rodapés de formulário, áreas de upload */
  --ot-hover: #f8faff;          /* linha sob o mouse */
  --ot-topbar-bg: rgba(255, 255, 255, .92);
  --ot-bottombar-bg: rgba(255, 255, 255, .97);
  --ot-radius: 12px;
  --ot-radius-sm: 8px;
  --ot-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --ot-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .04);
  --ot-shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-bg: var(--ot-surface);  /* usado pelo Bootstrap em cards e inputs */
  --bs-body-color: var(--ot-gray-900);
  --bs-primary: var(--ot-blue-600);
  --bs-primary-rgb: 31, 111, 235;
  --bs-link-color: var(--ot-blue-600);
  --bs-link-color-rgb: 31, 111, 235;
  --bs-link-hover-color: #1858c4;
  --bs-border-color: var(--ot-gray-200);
  --bs-border-radius: var(--ot-radius-sm);
  --bs-secondary-color: var(--ot-gray-500);
  --bs-focus-ring-color: rgba(31, 111, 235, .25);
}

body { background: var(--ot-bg); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }

/* ---------- Botões ---------- */
.btn { font-weight: 500; border-radius: var(--ot-radius-sm); }
.btn-primary {
  --bs-btn-bg: var(--ot-blue-600); --bs-btn-border-color: var(--ot-blue-600);
  --bs-btn-hover-bg: #1858c4; --bs-btn-hover-border-color: #1858c4;
  --bs-btn-active-bg: #144aa6; --bs-btn-active-border-color: #144aa6;
  --bs-btn-disabled-bg: var(--ot-blue-600); --bs-btn-disabled-border-color: var(--ot-blue-600);
}
.btn-light { --bs-btn-bg: var(--ot-gray-100); --bs-btn-border-color: var(--ot-gray-100); }
.btn-lg { padding-block: .7rem; font-size: 1rem; }
.btn-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }

/* ---------- Estrutura ---------- */
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; background: var(--ot-surface); padding: .5rem 1rem;
  border-radius: var(--ot-radius-sm); box-shadow: var(--ot-shadow); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1030;
  flex-direction: column; background: linear-gradient(180deg, var(--ot-navy-800) 0%, var(--ot-navy-900) 100%);
  color: #fff; padding: 1.25rem .9rem;
}
.sidebar-brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; padding: .25rem .6rem 1.25rem; }
.sidebar-brand img { border-radius: 9px; }
.sidebar-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255, 255, 255, .45); padding: 1.1rem .75rem .4rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 9px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 500; font-size: .925rem;
  transition: background-color .15s, color .15s; }
.sidebar-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-link.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--ot-green-400); }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1rem .75rem 0; }
.sidebar-org { font-size: .8rem; color: rgba(255, 255, 255, .6); line-height: 1.3; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .shell { margin-left: var(--sidebar-w); } }

.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 1rem;
  height: calc(var(--topbar-h) + var(--safe-top)); padding: var(--safe-top) 1rem 0;
  background: var(--ot-topbar-bg); backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--ot-gray-200);
}
@media (min-width: 992px) { .topbar { padding-inline: 2rem; } }
.topbar-brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ot-navy-800);
  font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.topbar-brand img { border-radius: 7px; }
.topbar-title { font-weight: 600; color: var(--ot-gray-700); }
.user-chip { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .25rem .4rem;
  border-radius: 999px; color: var(--ot-gray-700); }
.user-chip:hover { background: var(--ot-gray-100); }
.user-chip-text { flex-direction: column; align-items: flex-start; line-height: 1.15; }
.user-chip-text strong { font-size: .875rem; font-weight: 600; color: var(--ot-gray-900); }
.user-chip-text small { font-size: .75rem; color: var(--ot-gray-500); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ot-blue-600), var(--ot-navy-700)); color: #fff; font-weight: 600; font-size: .85rem; }
.btn-install { background: var(--ot-blue-50); color: var(--ot-blue-600); border: 0; }
.btn-install:hover { background: #dbe8ff; color: #1858c4; }
.dropdown-menu { border: 1px solid var(--ot-gray-200); border-radius: var(--ot-radius); padding: .4rem; min-width: 14rem; }
.dropdown-item { border-radius: 7px; padding: .5rem .75rem; }
.dropdown-header { padding: .5rem .75rem; }

.content { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 2rem; outline: none; }
@media (min-width: 992px) { .content { padding: 2rem 2rem 3rem; } }
@media (max-width: 991.98px) { .content { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1.5rem); } }

/* ---------- Barra inferior (celular) ---------- */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 1030; display: flex;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--ot-bottombar-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--ot-gray-200); box-shadow: 0 -4px 16px rgba(16, 24, 40, .05);
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; color: var(--ot-gray-500); text-decoration: none; font-size: .7rem; font-weight: 500;
  -webkit-tap-highlight-color: transparent; position: relative;
}
.bottom-nav i { font-size: 1.3rem; line-height: 1; }
.bottom-nav span { max-width: 100%; padding-inline: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-nav .active { color: var(--ot-blue-600); font-weight: 600; }
.bottom-nav .active i { transform: translateY(-1px); }
.bottom-nav .active::before { content: ""; position: absolute; top: 0; width: 32px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--ot-blue-600); }

.sheet { height: auto !important; max-height: 85vh; border-radius: 20px 20px 0 0; padding-bottom: var(--safe-bottom); }
.sheet-handle { width: 40px; height: 4px; background: var(--ot-gray-300); border-radius: 2px; margin: .6rem auto 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sheet-item { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .25rem;
  border-radius: var(--ot-radius); background: var(--ot-gray-100); color: var(--ot-gray-700); text-decoration: none;
  font-size: .8rem; font-weight: 500; border: 0; text-align: center; }
.sheet-item i { font-size: 1.35rem; color: var(--ot-blue-600); }
.sheet-item.active { background: var(--ot-blue-50); color: var(--ot-blue-600); }

/* ---------- Cabeçalho de página ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem;
  margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-subtitle { color: var(--ot-gray-500); margin: .25rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 575.98px) {
  .page-title { font-size: 1.3rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
}
.breadcrumb { --bs-breadcrumb-divider-color: var(--ot-gray-300); font-size: .825rem; margin-bottom: .5rem; }
.breadcrumb a { text-decoration: none; }

/* ---------- Cartões ---------- */
.card { --bs-card-border-color: var(--ot-gray-200); --bs-card-border-radius: var(--ot-radius); box-shadow: var(--ot-shadow-sm); }
.card-header { background: transparent; padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.section-title { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ot-gray-500); margin-bottom: 1rem; }

.stat-card { padding: 1.1rem 1.25rem; height: 100%; flex-direction: row; gap: .9rem; align-items: center; }
@media (max-width: 575.98px) {
  .stat-card { padding: .85rem; gap: .65rem; }
  .stat-card .stat-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 9px; }
  .stat-card .stat-value { font-size: 1.35rem; }
  .stat-card .stat-label { font-size: .75rem; }
}
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0; }
.stat-icon.blue { background: var(--ot-blue-50); color: var(--ot-blue-600); }
.stat-icon.green { background: #e3f8f1; color: #0f9f74; }
.stat-icon.amber { background: #fff4e0; color: #c27803; }
.stat-icon.gray { background: var(--ot-gray-100); color: var(--ot-gray-500); }
.stat-icon.red { background: #fde8e8; color: #b42318; }
.stat-icon.violet { background: #f0ebff; color: #6d4ae0; }
.stat-label { font-size: .8rem; color: var(--ot-gray-500); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ot-gray-900); }
.stat-hint { font-size: .75rem; color: var(--ot-gray-500); }

/* ---------- Tabelas (viram cartões no celular) ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ot-gray-500); background: var(--ot-gray-100); border-bottom: 1px solid var(--ot-gray-200);
  padding: .7rem 1rem; white-space: nowrap; }
.table > tbody td { padding: .8rem 1rem; border-color: var(--ot-gray-200); }
.table > tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--ot-hover); }
.card > .table-responsive:first-child thead th:first-child { border-top-left-radius: var(--ot-radius); }
.card > .table-responsive:first-child thead th:last-child { border-top-right-radius: var(--ot-radius); }
.row-link { color: inherit; text-decoration: none; font-weight: 600; }
.row-link:hover { color: var(--ot-blue-600); }
.cell-sub { display: block; font-size: .8rem; color: var(--ot-gray-500); font-weight: 400;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: .9rem 1rem; border-bottom: 1px solid var(--ot-gray-200); position: relative; }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { border: 0 !important; padding: .15rem 0 !important; display: flex; justify-content: space-between;
    gap: 1rem; text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--ot-gray-500); font-size: .8rem; text-align: left; }
  .table-cards td.td-main { display: block; text-align: left; font-size: 1rem; padding-bottom: .35rem !important; }
  .table-cards td.td-main::before, .table-cards td.td-actions::before, .table-cards td.td-empty::before { content: none; }
  .table-cards td.td-actions { justify-content: flex-end; padding-top: .5rem !important; }
  .table-cards td.td-empty { display: block; text-align: center; }
}

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .35em .65em; border-radius: 999px; font-size: .72rem; letter-spacing: .01em; }
.badge-soft-success { background: #e3f8f1; color: #0b7d5b; }
.badge-soft-info { background: var(--ot-blue-50); color: #1858c4; }
.badge-soft-warning { background: #fff4e0; color: #9a5b00; }
.badge-soft-secondary { background: var(--ot-gray-100); color: var(--ot-gray-700); }
.badge-soft-primary { background: #e7efff; color: var(--ot-blue-600); }
.badge-soft-danger { background: #fde8e8; color: #b42318; }
.badge-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  margin-right: .4em; vertical-align: middle; }

/* ---------- Formulários ---------- */
.form-label { font-weight: 500; font-size: .875rem; color: var(--ot-gray-700); margin-bottom: .35rem; }
.req { color: #d92d20; margin-left: .2rem; font-weight: 600; }
.required-legend { font-size: .8rem; color: var(--ot-gray-500); margin-bottom: 1rem; }
.form-control, .form-select { border-color: var(--ot-gray-300); border-radius: var(--ot-radius-sm); padding: .55rem .8rem;
  font-size: .95rem; }
.form-control::placeholder { color: #9aa3b2; }
.form-control:focus, .form-select:focus { border-color: var(--ot-blue-500); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-control.is-invalid, .form-select.is-invalid { background-image: none; padding-right: .8rem; }
.invalid-feedback { font-size: .8rem; font-weight: 500; }
.invalid-feedback:empty { display: none !important; }
.form-text { font-size: .8rem; color: var(--ot-gray-500); }
.form-switch { padding-left: 3.1em; }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-top: .1em; margin-left: -3.1em; }
.form-check-label { font-size: .9rem; }
.form-summary { border: 0; border-left: 4px solid #d92d20; background: #fef3f2; color: #7a271a; border-radius: var(--ot-radius-sm); }
.form-summary a { color: #b42318; }
.form-section { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--ot-gray-200); }
.form-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.form-section-title { font-size: .95rem; font-weight: 600; margin-bottom: .2rem; }
.form-section-desc { font-size: .825rem; color: var(--ot-gray-500); margin-bottom: 1rem; }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; padding: 1rem 1.25rem; border-top: 1px solid var(--ot-gray-200);
  background: var(--ot-surface-2); border-radius: 0 0 var(--ot-radius) var(--ot-radius); }
@media (max-width: 575.98px) { .form-actions { flex-direction: column-reverse; } .form-actions .btn { width: 100%; } }
.input-loading { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%231f6feb' stroke-width='3' stroke-dasharray='42 14'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.1rem; }
.form-card { max-width: 720px; }
.form-card-wide { max-width: 1000px; }

/* ---------- Estados vazios ---------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--ot-gray-500); }
.empty-state i { font-size: 2.25rem; color: var(--ot-gray-300); display: block; margin-bottom: .75rem; }
.empty-state .empty-title { font-weight: 600; color: var(--ot-gray-700); margin-bottom: .25rem; }

/* ---------- Toasts ---------- */
.toast-area { top: calc(var(--topbar-h) + var(--safe-top) + .75rem); right: 1rem; z-index: 1090; }
@media (max-width: 575.98px) { .toast-area { left: .75rem; right: .75rem; } .toast { width: 100%; } }
.toast { border: 0; border-radius: var(--ot-radius); box-shadow: var(--ot-shadow-lg); border-left: 4px solid var(--ot-blue-600); }
.toast-success { border-left-color: #12b76a; } .toast-success .toast-icon { color: #12b76a; }
.toast-danger { border-left-color: #d92d20; } .toast-danger .toast-icon { color: #d92d20; }
.toast-warning { border-left-color: #f79009; } .toast-warning .toast-icon { color: #f79009; }
.toast-info .toast-icon { color: var(--ot-blue-600); }
.toast-icon { font-size: 1.15rem; }

/* ---------- Modal de confirmação ---------- */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--ot-shadow-lg); }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: #fef3f2; color: #d92d20;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

/* ---------- Instalação (PWA) ---------- */
.install-banner { position: fixed; z-index: 1040; left: 1rem; right: 1rem; bottom: 1rem; max-width: 460px; margin-left: auto;
  display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; background: var(--ot-surface); border-radius: 16px;
  box-shadow: var(--ot-shadow-lg); border: 1px solid var(--ot-gray-200); animation: slide-up .3s ease-out; }
.install-banner img { border-radius: 10px; }
@media (max-width: 991.98px) { .app .install-banner { bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + .75rem); } }
@keyframes slide-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.ios-steps { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: step; }
.ios-steps li { display: flex; gap: .9rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--ot-gray-200); }
.ios-steps li:last-child { border-bottom: 0; }
.step-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--ot-blue-50); color: var(--ot-blue-600);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }

/* ---------- Autenticação ---------- */
.auth { background: var(--ot-surface); }
.auth-shell { min-height: 100vh; display: flex; }
.auth-hero { flex: 1 1 50%; background: radial-gradient(1200px 600px at 10% 0%, #2a5cb8 0%, transparent 60%),
  linear-gradient(160deg, var(--ot-navy-800), var(--ot-navy-900)); color: #fff; align-items: center; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%;
  border: 70px solid rgba(255, 255, 255, .05); }
.auth-hero-inner { max-width: 440px; position: relative; z-index: 1; }
.auth-hero-title { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; margin: 2.5rem 0 2rem; }
.auth-hero-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; color: rgba(255, 255, 255, .82); }
.auth-hero-list i { color: var(--ot-green-400); margin-right: .75rem; font-size: 1.1rem; }
.auth-logo { display: flex; align-items: center; gap: .65rem; font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }
.auth-logo img { border-radius: 10px; }
.auth-panel { flex: 1 1 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(2rem + var(--safe-top)) 1.25rem calc(1.5rem + var(--safe-bottom)); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .auth-logo { color: var(--ot-navy-800); }
.auth-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .35rem; }
.auth-subtitle { color: var(--ot-gray-500); margin-bottom: 1.75rem; }
.auth-back { display: inline-block; font-size: .875rem; text-decoration: none; margin-bottom: 1.25rem; }
.auth-footer { margin-top: 2.5rem; font-size: .8rem; color: var(--ot-gray-500); }
.error-code { font-size: 3rem; font-weight: 800; color: var(--ot-gray-300); line-height: 1; }

/* ---------- Equipamentos ---------- */
.equip-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center;
  justify-content: center; background: var(--ot-blue-50); color: var(--ot-blue-600); font-size: 1.1rem; }
.equip-icon-lg { width: 52px; height: 52px; border-radius: 14px; font-size: 1.5rem; }
.min-w-0 { min-width: 0; }

/* ---------- Utilidades ---------- */
.text-pre-wrap { white-space: pre-wrap; }
.dl-grid { display: grid; grid-template-columns: minmax(110px, 35%) 1fr; gap: .55rem 1rem; margin: 0; font-size: .9rem; }
.dl-grid dt { color: var(--ot-gray-500); font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters .search { flex: 1 1 260px; position: relative; }
.filters .search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ot-gray-500); }
.filters .search input { padding-left: 2.4rem; }
.filters .form-select { flex: 0 1 220px; }
@media (max-width: 575.98px) { .filters .form-select, .filters .btn { flex: 1 1 auto; } }
.pagination { --bs-pagination-border-radius: var(--ot-radius-sm); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Chamados ---------- */
.view-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--ot-gray-200); scrollbar-width: none; }
.view-tab { padding: .6rem .9rem; color: var(--ot-gray-500); text-decoration: none; font-weight: 500; font-size: .9rem;
  border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.view-tab:hover { color: var(--ot-gray-900); }
.view-tab.active { color: var(--ot-blue-600); border-bottom-color: var(--ot-blue-600); }

.ticket-list li + li { border-top: 1px solid var(--ot-gray-200); }
.ticket-row { display: flex; gap: 1rem; justify-content: space-between; padding: .95rem 1.25rem; color: inherit;
  text-decoration: none; border-left: 3px solid transparent; transition: background-color .15s; }
.ticket-row:hover { background: var(--ot-hover); }
.ticket-row.prio-critical { border-left-color: #d92d20; }
.ticket-row.prio-high { border-left-color: #f79009; }
.ticket-main { min-width: 0; }
.ticket-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ticket-code { color: var(--ot-gray-500); font-weight: 600; font-variant-numeric: tabular-nums; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; color: var(--ot-gray-500); margin-top: .25rem; }
.ticket-meta i, .ticket-tech i { margin-right: .3rem; }
.ticket-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex-shrink: 0; }
.ticket-tech { font-size: .8rem; color: var(--ot-gray-500); }
@media (max-width: 575.98px) {
  .ticket-row { flex-direction: column; gap: .5rem; padding: .9rem 1rem; }
  .ticket-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}

.avatar-sm { width: 30px; height: 30px; font-size: .72rem; flex-shrink: 0; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }

.timeline { position: relative; margin: 0 0 1rem; padding-left: 0; }
.timeline > li { margin-bottom: .9rem; }
.tl-message { display: flex; gap: .65rem; align-items: flex-start; }
.tl-bubble { flex: 1; min-width: 0; background: var(--ot-surface); border: 1px solid var(--ot-gray-200); border-radius: 4px var(--ot-radius) var(--ot-radius) var(--ot-radius);
  padding: .75rem 1rem; box-shadow: var(--ot-shadow-sm); }
.tl-staff .tl-bubble { background: #f7faff; border-color: #d8e6ff; }
.tl-internal .tl-bubble { background: #fffaeb; border-color: #fde68a; }
.tl-internal .avatar { background: linear-gradient(135deg, #f79009, #b54708); }
.tl-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .82rem; margin-bottom: .35rem; }
.tl-event { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; color: var(--ot-gray-700); padding-left: .35rem; }
.tl-event > i { width: 22px; height: 22px; border-radius: 50%; background: var(--ot-gray-100); color: var(--ot-gray-500);
  display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; flex-shrink: 0; }

.attachments { display: flex; flex-wrap: wrap; gap: .4rem; }
.attachment { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .35rem .6rem; border: 1px solid var(--ot-gray-200);
  border-radius: 8px; background: var(--ot-surface); color: var(--ot-gray-700); text-decoration: none; font-size: .82rem; }
.attachment:hover { border-color: var(--ot-blue-500); color: var(--ot-blue-600); }
.attachment .text-truncate { max-width: 220px; }

.resolve-card { border-color: #a6f4c5; background: #f6fef9; }
.manage-card .form-label { font-size: .8rem; }

.choice-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (max-width: 575.98px) { .choice-cards { grid-template-columns: repeat(2, 1fr); } }
.choice-card { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border: 1px solid var(--ot-gray-300);
  border-radius: var(--ot-radius-sm); cursor: pointer; font-size: .9rem; font-weight: 500; background: var(--ot-surface); transition: all .15s; }
.choice-card:hover { border-color: var(--ot-blue-500); }
.choice-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--ot-gray-300); }
.choice-low .choice-dot { background: #98a2b3; } .choice-normal .choice-dot { background: var(--ot-blue-500); }
.choice-high .choice-dot { background: #f79009; } .choice-critical .choice-dot { background: #d92d20; }
.choice-card:has(input:checked) { border-color: var(--ot-blue-600); background: var(--ot-blue-50); box-shadow: 0 0 0 .15rem var(--bs-focus-ring-color); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--ot-blue-600); outline-offset: 2px; }
.choice-cards.is-invalid .choice-card { border-color: #d92d20; }
.choice-cards.is-invalid ~ .invalid-feedback { display: block; }
fieldset legend.form-label { float: none; width: auto; font-size: .875rem; }

.file-drop { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border: 1.5px dashed var(--ot-gray-300);
  border-radius: var(--ot-radius-sm); color: var(--ot-gray-500); cursor: pointer; background: var(--ot-surface-2); transition: all .15s; }
.file-drop:hover, .file-drop.dragging { border-color: var(--ot-blue-500); background: var(--ot-blue-50); color: var(--ot-blue-600); }
.file-drop strong { color: var(--ot-blue-600); }
.file-drop i { font-size: 1.2rem; }
.file-input.is-invalid ~ * { color: #d92d20; }
.field .file-drop + .file-list:not(:empty) { margin-top: .5rem; }
.file-drop:has(.is-invalid) { border-color: #d92d20; }
.field:has(.file-drop .is-invalid) .invalid-feedback { display: block; }

/* ---------- Atendimento e SLA ---------- */
.reply-tabs { border-bottom: 0; gap: .25rem; }
.reply-tabs .nav-link { border: 1px solid transparent; border-bottom: 0; color: var(--ot-gray-500); font-weight: 500;
  border-radius: var(--ot-radius-sm) var(--ot-radius-sm) 0 0; }
.reply-tabs .nav-link.active { background: var(--ot-surface); border-color: var(--ot-gray-200); color: var(--ot-blue-600); }
.reply-tabs + .tab-content .reply-card { border-top-left-radius: 0; }
.tl-work .tl-bubble { background: #f6fef9; border-color: #a6f4c5; }
.tl-work .avatar { background: linear-gradient(135deg, #12b76a, #087443); font-size: .9rem; }
.day-toggles { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 54px;
  padding: .45rem .75rem; border: 1px solid var(--ot-gray-300); border-radius: 999px; cursor: pointer; font-size: .85rem;
  font-weight: 500; margin: 0; user-select: none; }
.day-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day-toggle:has(input:checked) { background: var(--ot-blue-50); border-color: var(--ot-blue-600); color: var(--ot-blue-600); }
.day-toggle:has(input:focus-visible) { outline: 2px solid var(--ot-blue-600); outline-offset: 2px; }
.day-toggles.is-invalid .day-toggle { border-color: #d92d20; }

/* ---------- Comercial ---------- */
.plan-card { border-top: 3px solid var(--ot-blue-600); }
.plan-price { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; color: var(--ot-gray-900); margin: .25rem 0 .75rem; }
.plan-price span { font-size: .9rem; font-weight: 500; color: var(--ot-gray-500); margin-left: .15rem; }
.plan-features li { display: flex; gap: .5rem; align-items: center; padding: .25rem 0; }
.plan-features i { color: #12b76a; }
.plan-features .bi-stopwatch, .plan-features .bi-people, .plan-features .bi-pc-display { color: var(--ot-blue-600); }
.plan-features li.off { color: var(--ot-gray-500); text-decoration: line-through; }
.plan-features li.off i { color: var(--ot-gray-300); }
.progress { height: 8px; background: var(--ot-gray-100); }
.w-0 { width: 0 !important; }

/* ---------- Orçamentos ---------- */
.quote-items .col-qty { width: 90px; }
.quote-items .col-price { width: 150px; }
.quote-items .col-total { width: 120px; padding-top: .9rem !important; }
.quote-items td { vertical-align: top; }
.quote-summary { margin: 1rem 0 0 auto; max-width: 340px; display: grid; gap: .4rem; }
.quote-summary > div { display: flex; justify-content: space-between; gap: 1rem; }
.quote-discount { width: 150px; }
.quote-total { border-top: 1px solid var(--ot-gray-200); padding-top: .5rem; font-size: 1.15rem; }
.quote-doc .card-body { padding: 2rem; }
@media (max-width: 575.98px) { .quote-doc .card-body { padding: 1.25rem; } }
.quote-doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--ot-navy-800); }
.quote-doc-brand { font-size: 1.25rem; font-weight: 700; color: var(--ot-navy-800); }
.quote-doc-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ot-gray-500); }
.quote-doc-to { margin-top: 1.25rem; }
.quote-doc-items thead th { background: transparent; border-bottom: 1px solid var(--ot-gray-300); padding-inline: .5rem; }
.quote-doc-items td { padding-inline: .5rem !important; }
.quote-doc-items tfoot td { border: 0; padding-block: .3rem !important; }
.quote-doc-total td { font-size: 1.15rem; font-weight: 700; border-top: 2px solid var(--ot-navy-800) !important; padding-top: .6rem !important; }
.quote-doc-decision { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--ot-radius-sm); }
.quote-doc-decision.approved { background: #ecfdf3; color: #05603a; }
.quote-doc-decision.rejected { background: #fef3f2; color: #912018; }
@media (max-width: 767.98px) {
  .quote-items td.col-qty, .quote-items td.col-price, .quote-items td.col-total { width: 100%; }
}

/* ---------- Impressão (orçamentos e demais páginas) ---------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .install-banner, .toast-area, .skip-link, .d-print-none { display: none !important; }
  .shell { margin-left: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  body, .app-body { background: var(--ot-surface) !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  .quote-doc .card-body { padding: 0; }
  a { color: inherit !important; text-decoration: none !important; }
  .col-lg-8 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
}
@media (max-width: 575.98px) { .quote-doc-head > .text-end { text-align: left !important; } }

/* ---------- Relatórios ---------- */
.report-filters { align-items: flex-end; }
.report-filters .filter-field { flex: 0 1 170px; }
.report-filters .filter-wide { flex: 1 1 200px; }
.report-filters .filter-actions { display: flex; gap: .5rem; }
@media (max-width: 575.98px) { .report-filters .filter-field { flex: 1 1 45%; } .report-filters .filter-actions { width: 100%; }
  .report-filters .filter-actions .btn-primary { flex: 1; } }
.bar-list li + li { margin-top: .7rem; }
.bar { display: block; width: 100%; height: 6px; margin-top: .25rem; }
.bar-bg { fill: var(--ot-gray-100); }
.bar-fg { fill: var(--ot-blue-600); }
.report-link { transition: box-shadow .15s, border-color .15s; }
.report-link:hover { border-color: var(--ot-blue-500); box-shadow: var(--ot-shadow); }
.table > tfoot th, .table > tfoot td { padding: .8rem 1rem; }

/* ---------- Menu lateral recolhido (desktop) ---------- */
.sidebar { transition: width .2s ease; }
.shell { transition: margin-left .2s ease; }
.sidebar-toggle { margin-left: -.5rem; }
@media (min-width: 992px) {
  .sidebar-collapsed { --sidebar-w: 76px; }
  .sidebar-collapsed .sidebar { padding-inline: .6rem; }
  .sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar-brand > span:not(.org-avatar),
  .sidebar-collapsed .sidebar-link span,
  .sidebar-collapsed .sidebar-footer { display: none; }
  .sidebar-collapsed .sidebar-section { font-size: 0; padding: .6rem 0 .3rem; margin: 0 .5rem; border-top: 1px solid rgba(255, 255, 255, .1); }
  .sidebar-collapsed .sidebar-link { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar-link i { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .shell { transition: none; } }

/* ---------- Seletor de tema ---------- */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 9px;
  background: var(--ot-gray-100); min-width: 13rem; }
.theme-option { display: flex; align-items: center; justify-content: center; gap: .35rem; border: 0; background: transparent;
  color: var(--ot-gray-500); font-size: .78rem; font-weight: 500; padding: .35rem .4rem; border-radius: 7px; }
.theme-option:hover { color: var(--ot-gray-900); }
.theme-option[aria-checked="true"] { background: var(--ot-surface); color: var(--ot-gray-900); box-shadow: var(--ot-shadow-sm); }
.theme-switch-lg .theme-option { padding: .6rem; font-size: .85rem; }

/* =====================================================================
   Tema escuro
   ===================================================================== */
[data-bs-theme="dark"] {
  color-scheme: dark;
  --ot-bg: #0b1220;
  --ot-surface: #121b2b;
  --ot-surface-2: #172234;
  --ot-hover: #1a263a;
  --ot-topbar-bg: rgba(18, 27, 43, .9);
  --ot-bottombar-bg: rgba(18, 27, 43, .96);
  --ot-gray-900: #e7ecf3;
  --ot-gray-700: #c3ccd9;
  --ot-gray-500: #8d99ad;
  --ot-gray-300: #3a475c;
  --ot-gray-200: #263247;
  --ot-gray-100: #1b2638;
  --ot-blue-50: rgba(59, 130, 246, .16);
  --ot-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --ot-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .3);
  --ot-shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  --bs-body-bg: var(--ot-surface);
  --bs-body-color: var(--ot-gray-900);
  --bs-secondary-color: var(--ot-gray-500);
  --bs-border-color: var(--ot-gray-200);
  --bs-tertiary-bg: var(--ot-surface-2);
  --bs-emphasis-color: #fff;
  --bs-link-color: #6ea8fe;
  --bs-link-color-rgb: 110, 168, 254;
  --bs-link-hover-color: #9ec5fe;
}
[data-bs-theme="dark"] .sidebar { background: linear-gradient(180deg, #0f1d36 0%, #08101e 100%); border-right: 1px solid var(--ot-gray-200); }
[data-bs-theme="dark"] .topbar-brand, [data-bs-theme="dark"] .auth-card .auth-logo,
[data-bs-theme="dark"] .quote-doc-brand { color: var(--ot-gray-900); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { border-color: var(--ot-gray-300); }
[data-bs-theme="dark"] .form-control::placeholder { color: #66748a; }
[data-bs-theme="dark"] .btn-light { --bs-btn-bg: var(--ot-gray-100); --bs-btn-border-color: var(--ot-gray-100);
  --bs-btn-color: var(--ot-gray-900); --bs-btn-hover-bg: var(--ot-gray-200); --bs-btn-hover-border-color: var(--ot-gray-200);
  --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--ot-gray-300); }
[data-bs-theme="dark"] .btn-install { color: #9ec5fe; }
[data-bs-theme="dark"] .card { --bs-card-bg: var(--ot-surface); }
[data-bs-theme="dark"] .alert-light { --bs-alert-bg: var(--ot-surface-2); --bs-alert-color: var(--ot-gray-700); --bs-alert-border-color: var(--ot-gray-200); }
[data-bs-theme="dark"] .bg-light-subtle { background-color: var(--ot-surface-2) !important; }
[data-bs-theme="dark"] .text-body { color: var(--ot-gray-900) !important; }
[data-bs-theme="dark"] .stat-value { color: var(--ot-gray-900); }

/* Cores suaves: no escuro, fundo translúcido e texto claro. */
[data-bs-theme="dark"] .badge-soft-success, [data-bs-theme="dark"] .stat-icon.green { background: rgba(18, 183, 106, .16); color: #6ce9a6; }
[data-bs-theme="dark"] .badge-soft-info, [data-bs-theme="dark"] .badge-soft-primary,
[data-bs-theme="dark"] .stat-icon.blue { background: rgba(59, 130, 246, .18); color: #93c5fd; }
[data-bs-theme="dark"] .badge-soft-warning, [data-bs-theme="dark"] .stat-icon.amber { background: rgba(247, 144, 9, .16); color: #fdb022; }
[data-bs-theme="dark"] .badge-soft-danger, [data-bs-theme="dark"] .stat-icon.red { background: rgba(240, 68, 56, .18); color: #fda29b; }
[data-bs-theme="dark"] .badge-soft-secondary, [data-bs-theme="dark"] .stat-icon.gray { background: var(--ot-gray-100); color: var(--ot-gray-700); }
[data-bs-theme="dark"] .stat-icon.violet { background: rgba(122, 90, 248, .2); color: #bdb4fe; }
[data-bs-theme="dark"] .equip-icon, [data-bs-theme="dark"] .step-icon { background: rgba(59, 130, 246, .16); color: #93c5fd; }

[data-bs-theme="dark"] .tl-staff .tl-bubble { background: #13243f; border-color: #1e3a66; }
[data-bs-theme="dark"] .tl-internal .tl-bubble { background: #2a2210; border-color: #5c4710; }
[data-bs-theme="dark"] .tl-work .tl-bubble { background: #0f2a1f; border-color: #1d5c41; }
[data-bs-theme="dark"] .resolve-card { background: #0f2a1f; border-color: #1d5c41; }
[data-bs-theme="dark"] .form-summary { background: rgba(240, 68, 56, .12); color: #fecdca; }
[data-bs-theme="dark"] .form-summary a { color: #fda29b; }
[data-bs-theme="dark"] .confirm-icon { background: rgba(240, 68, 56, .16); color: #fda29b; }
[data-bs-theme="dark"] .quote-doc-head { border-bottom-color: var(--ot-gray-300); }
[data-bs-theme="dark"] .quote-doc-total td { border-top-color: var(--ot-gray-300) !important; }
[data-bs-theme="dark"] .quote-doc-decision.approved { background: rgba(18, 183, 106, .14); color: #6ce9a6; }
[data-bs-theme="dark"] .quote-doc-decision.rejected { background: rgba(240, 68, 56, .14); color: #fda29b; }
[data-bs-theme="dark"] .plan-card { border-top-color: #3b82f6; }
[data-bs-theme="dark"] .auth { background: var(--ot-surface); }
[data-bs-theme="dark"] .bar-fg { fill: #3b82f6; }
[data-bs-theme="dark"] .bottom-nav .active, [data-bs-theme="dark"] .view-tab.active,
[data-bs-theme="dark"] .sheet-item.active { color: #93c5fd; }
[data-bs-theme="dark"] .view-tab.active { border-bottom-color: #3b82f6; }
[data-bs-theme="dark"] .text-warning-emphasis { color: #fdb022 !important; }

/* ---------- Base de conhecimento ---------- */
.kb-search { position: relative; max-width: 760px; }
.kb-search > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ot-gray-500); font-size: 1.1rem; }
.kb-search input { padding-left: 2.8rem; border-radius: 12px; }
.chip { display: inline-flex; align-items: center; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--ot-gray-200);
  background: var(--ot-surface); color: var(--ot-gray-700); text-decoration: none; font-size: .85rem; font-weight: 500; }
.chip:hover { border-color: var(--ot-blue-500); color: var(--ot-blue-600); }
.chip.active { background: var(--ot-blue-600); border-color: var(--ot-blue-600); color: #fff; }
.kb-card { transition: border-color .15s, box-shadow .15s; }
.kb-card:hover { border-color: var(--ot-blue-500); box-shadow: var(--ot-shadow); }
.kb-meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--ot-gray-500); }
.kb-meta i { margin-right: .3rem; }
.kb-article-body { padding: 2rem; }
@media (max-width: 575.98px) { .kb-article-body { padding: 1.25rem; } }
.kb-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin: .25rem 0 .5rem; }
.kb-summary { font-size: 1.05rem; color: var(--ot-gray-500); margin-bottom: 1.5rem; }
.kb-content { font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.kb-content h2 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 .75rem; }
.kb-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
.kb-content img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--ot-gray-200); margin: .5rem 0; }
.kb-content blockquote { border-left: 4px solid var(--ot-blue-500); background: var(--ot-blue-50); padding: .75rem 1rem;
  border-radius: 0 10px 10px 0; margin: 1rem 0; }
.kb-content blockquote p:last-child { margin-bottom: 0; }
.kb-content code, .kb-content kbd { background: var(--ot-gray-100); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; color: inherit; }
.kb-content pre { background: var(--ot-gray-100); padding: 1rem; border-radius: 10px; overflow-x: auto; }
.kb-content ol li, .kb-content ul li { margin-bottom: .35rem; }
.kb-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.kb-content th, .kb-content td { border: 1px solid var(--ot-gray-200); padding: .5rem .75rem; }
.kb-related li + li { margin-top: .5rem; }
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .35rem; border: 1px solid var(--ot-gray-300);
  border-bottom: 0; border-radius: var(--ot-radius-sm) var(--ot-radius-sm) 0 0; background: var(--ot-surface-2); }
.md-toolbar button, .md-upload { border: 0; background: transparent; color: var(--ot-gray-700); padding: .3rem .5rem; border-radius: 6px;
  display: inline-flex; align-items: center; cursor: pointer; font-size: .9rem; margin: 0; }
.md-toolbar button:hover, .md-upload:hover { background: var(--ot-gray-100); color: var(--ot-gray-900); }
.md-upload.loading { opacity: .6; pointer-events: none; }
.md-sep { width: 1px; height: 20px; background: var(--ot-gray-300); margin: 0 .25rem; }
.md-textarea { border-top-left-radius: 0; border-top-right-radius: 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .9rem; line-height: 1.6; min-height: 320px; }
.md-preview { border: 1px solid var(--ot-gray-300); border-radius: var(--ot-radius-sm); padding: 1.25rem; min-height: 320px; }
.md-tabs .nav-link { padding: .2rem .7rem; font-size: .82rem; }
.kb-suggestions { border: 1px solid #a6f4c5; background: #f6fef9; border-radius: var(--ot-radius-sm); padding: .75rem 1rem; }
.kb-suggestions li a { display: flex; padding: .45rem 0; text-decoration: none; color: inherit; }
.kb-suggestions li + li { border-top: 1px solid var(--ot-gray-200); }
.kb-suggestions li a:hover strong { color: var(--ot-blue-600); }
[data-bs-theme="dark"] .kb-suggestions { background: #0f2a1f; border-color: #1d5c41; }

/* ---------- Acesso remoto ---------- */
.remote-id { display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; }
.remote-open { background: var(--ot-blue-50); }
.remote-pill { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: .35rem;
  border-radius: 6px; background: var(--ot-blue-50); color: var(--ot-blue-600); font-size: .75rem; vertical-align: middle; }
.remote-go { border-color: var(--ot-blue-500); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #12b76a; margin-right: .45rem;
  box-shadow: 0 0 0 0 rgba(18, 183, 106, .6); animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(18, 183, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); } }
.remote-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.25rem; }
.remote-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; position: relative;
  color: var(--ot-gray-500); font-size: .82rem; }
.remote-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--ot-gray-200); z-index: 0; }
.remote-steps li:first-child::before { display: none; }
.remote-steps .step-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ot-gray-100); color: transparent; position: relative; z-index: 1; border: 2px solid var(--ot-gray-200); }
.remote-steps .done .step-dot { background: #12b76a; border-color: #12b76a; color: #fff; }
.remote-steps .done::before { background: #12b76a; }
.remote-steps .failed .step-dot { background: #d92d20; border-color: #d92d20; color: #fff; }
.remote-steps .current .step-label { color: var(--ot-gray-900); font-weight: 600; }
.remote-steps .step-time { font-size: .72rem; }
[data-bs-theme="dark"] .remote-alert { background: rgba(247, 144, 9, .14); color: #fdb022; border-color: rgba(247, 144, 9, .3); }

/* ---------------------------------------------------------------- pesquisa de satisfação */
.rating-card { border-color: #fedf89; background: #fffcf5; scroll-margin-top: 5rem; }
.stars-view { display: inline-flex; gap: .1rem; color: #d0d5dd; white-space: nowrap; vertical-align: -.1em; }
.stars-view .on { color: #f79009; }
.stars-view.lg { font-size: 1.35rem; gap: .2rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .35rem; }
.star-input label { cursor: pointer; font-size: 2rem; line-height: 1; color: #d0d5dd; transition: color .1s, transform .1s; }
.star-input input:checked ~ label { color: #f79009; }
.star-input:hover input ~ label { color: #d0d5dd; }
.star-input input ~ label:hover, .star-input input ~ label:hover ~ label { color: #fdb022; }
.star-input label:active { transform: scale(.9); }
.star-input input:focus-visible + label { outline: 2px solid var(--bs-primary); outline-offset: 2px; border-radius: .25rem; }
.star-caption { font-weight: 600; color: var(--bs-secondary-color); min-width: 6rem; }
.rating-dist li { display: grid; grid-template-columns: 7rem 1fr 4.5rem; gap: .5rem; align-items: center; }
[data-bs-theme="dark"] .rating-card { background: #2a2110; border-color: #5c4513; }
[data-bs-theme="dark"] .stars-view, [data-bs-theme="dark"] .star-input label,
[data-bs-theme="dark"] .star-input:hover input ~ label { color: #475467; }
[data-bs-theme="dark"] .star-input input:checked ~ label { color: #fdb022; }
[data-bs-theme="dark"] .star-input input ~ label:hover, [data-bs-theme="dark"] .star-input input ~ label:hover ~ label { color: #fec84b; }

/* ---------------------------------------------------------------- notificações */
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #d92d20; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px;
  text-align: center; box-shadow: 0 0 0 2px var(--bs-body-bg); }
.notif-menu { width: min(380px, calc(100vw - 24px)); overflow: hidden; }
.notif-menu .notif-list { max-height: min(420px, 60vh); overflow-y: auto; }
.notif-menu-head { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color); }
.notif-menu-foot { display: block; padding: .6rem 1rem; text-align: center; font-weight: 600; font-size: .875rem;
  border-top: 1px solid var(--bs-border-color); text-decoration: none; }
.notif-list li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.notif-item { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; color: inherit;
  text-decoration: none; position: relative; }
.notif-item:hover, .notif-item:focus-visible { background: var(--bs-tertiary-bg); }
.notif-item.unread { background: var(--ot-blue-50, #eff4ff); }
.notif-item.unread:hover { background: #e0eaff; }
.notif-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 8px; }
.notif-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.notif-title { font-size: .875rem; line-height: 1.3; }
.notif-item.unread .notif-title { font-weight: 600; }
.notif-body { font-size: .8rem; color: var(--bs-secondary-color); margin-top: .1rem; }
.notif-time { font-size: .72rem; color: var(--bs-secondary-color); margin-top: .2rem; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bs-primary); flex-shrink: 0; margin-top: .45rem; }
[data-bs-theme="dark"] .notif-item.unread { background: rgba(46, 144, 250, .1); }
[data-bs-theme="dark"] .notif-item.unread:hover { background: rgba(46, 144, 250, .16); }
@media (max-width: 575.98px) {
  .notif-bell { position: static; }
  .notif-menu { position: fixed !important; inset: calc(env(safe-area-inset-top, 0px) + 60px) 12px auto 12px !important;
    transform: none !important; width: auto; }
}

/* ---------------------------------------------------------------- módulos */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .75rem; }
.module-option { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem; border: 1px solid var(--bs-border-color);
  border-radius: .75rem; cursor: pointer; background: var(--bs-body-bg); }
.module-option:hover { border-color: var(--bs-primary); }
.module-option:has(input:checked) { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary) inset; }
.module-option .form-check-input { margin-top: .6rem; flex-shrink: 0; }
.module-option .stat-icon { width: 36px; height: 36px; font-size: 1rem; }
.module-state-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; }
.module-state-list li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.module-state-list .stat-icon { width: 34px; height: 34px; font-size: 1rem; }
.module-state-list .module-off .stat-icon { filter: grayscale(1); opacity: .6; }
.brand-logo { max-height: 28px; max-width: 120px; object-fit: contain; }
.brand-logo-preview { max-height: 72px; max-width: 220px; object-fit: contain; padding: .5rem; border: 1px dashed var(--bs-border-color); border-radius: .5rem; }
.locked-card { max-width: 560px; }
.locked-icon { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 16px; }

/* ---------------------------------------------------------------- editor da página pública */
.qr-preview { width: 180px; height: 180px; padding: .5rem; background: #fff; border-radius: .75rem; border: 1px solid var(--bs-border-color); }
.sched-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; flex-wrap: wrap; }
.sched-list li + li { border-top: 1px dashed var(--bs-border-color-translucent); }
.sched-add { padding: .75rem; border-radius: .6rem; background: var(--bs-tertiary-bg); }
.weekday-picker { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.weekday-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 2rem;
  padding: 0 .5rem; border: 1px solid var(--bs-border-color); border-radius: 999px; font-size: .8rem; font-weight: 600;
  cursor: pointer; user-select: none; background: var(--bs-body-bg); }
.weekday-chip input:checked + span { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.weekday-chip input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------- página pública */
.public-body { background: var(--ot-gray-50, #f6f7f9); min-height: 100vh; display: flex; flex-direction: column; }
.pub-wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.pub-hero { position: relative; color: #fff; background: linear-gradient(135deg, #11264a, #1d4ed8);
  padding-top: calc(env(safe-area-inset-top, 0px) + 3rem); padding-bottom: 2.5rem; overflow: hidden; }
.pub-hero.has-cover { min-height: 340px; display: flex; align-items: flex-end; }
.pub-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-hero.has-cover::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 40, .15) 0%, rgba(10, 20, 40, .82) 100%); }
.pub-hero-inner { position: relative; z-index: 1; }
.pub-title { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; margin: 0 0 .35rem; letter-spacing: -.02em; }
.pub-subtitle { font-size: 1.05rem; opacity: .92; margin: 0 0 1.25rem; }
.pub-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pub-actions .btn { font-weight: 600; }
.pub-main { padding-top: 1.5rem; padding-bottom: 2rem; flex: 1; }
.pub-section { margin-bottom: 1.75rem; scroll-margin-top: 1rem; }
.pub-h2 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.pub-h2 .bi { color: var(--bs-primary); }
.pub-h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pub-card { border-radius: 1rem; }
.pub-schedule { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pub-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pub-sched-row + .pub-sched-row { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--bs-border-color-translucent); }
.pub-sched-place { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.pub-sched-days { display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr; gap: .25rem .5rem; margin: 0; font-size: .92rem; }
.pub-sched-days dt { font-weight: 500; color: var(--bs-secondary-color); }
.pub-sched-days dd { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .6rem; }
.pub-time { font-weight: 700; }
.pub-time small { font-weight: 400; color: var(--bs-secondary-color); }
.pub-contact li { display: flex; align-items: center; gap: .6rem; padding: .2rem 0; }
.pub-contact .bi { color: var(--bs-primary); }
.pub-share { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-radius: 1rem; background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); }
.pub-qr { background: #fff; border-radius: .5rem; padding: .25rem; flex-shrink: 0; }
.pub-footer { padding: 1.25rem 0 calc(env(safe-area-inset-bottom, 0px) + 1.25rem); border-top: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg); }
[data-bs-theme="dark"] .public-body { background: #0b1220; }

/* ---------------------------------------------------------------- cartaz A4 */
.poster-toolbar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: .75rem 16px; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.poster { width: min(210mm, 100%); aspect-ratio: 210 / 297; margin: 1.5rem auto; background: #fff; color: #111827;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .12); display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 8% 7%; }
.poster-kicker { font-size: clamp(.9rem, 2.4vw, 1.25rem); text-transform: uppercase; letter-spacing: .12em; color: #1d4ed8; margin: 0 0 .5rem; font-weight: 700; }
.poster-title { font-size: clamp(1.8rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.1; margin: 0 0 .75rem; letter-spacing: -.02em; }
.poster-headline { font-size: clamp(1rem, 3vw, 1.6rem); color: #374151; margin: 0 0 1.5rem; }
.poster-qr { width: 62%; max-width: 120mm; }
.poster-qr svg { width: 100%; height: auto; display: block; }
.poster-cta { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 700; margin: 1.25rem 0 .25rem; }
.poster-url { font-size: clamp(.8rem, 2vw, 1.05rem); color: #4b5563; word-break: break-all; margin: 0; }
@media print {
  @page { size: A4; margin: 0; }
  .public-body { background: #fff; }
  .poster { width: 210mm; height: 297mm; margin: 0; box-shadow: none; aspect-ratio: auto; }
}
.pub-hero-sm { padding-bottom: 1.75rem; }
.pub-back { color: rgba(255, 255, 255, .85); text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: .5rem; }
.pub-back:hover { color: #fff; }
.pub-events { display: grid; gap: .6rem; margin: 0; }
.pub-event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 3.2rem;
  padding: .35rem .25rem; border-radius: .6rem; background: var(--ot-blue-50, #eaf2ff); color: var(--bs-primary); line-height: 1; }
.pub-event-date span { font-size: 1.35rem; font-weight: 800; }
.pub-event-date small { font-size: .72rem; text-transform: uppercase; font-weight: 700; margin-top: .15rem; }
[data-bs-theme="dark"] .pub-event-date { background: rgba(46, 144, 250, .14); }
/* agenda interna */
.agenda-list { display: grid; gap: .75rem; }
.agenda-day { display: flex; gap: .9rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: .85rem; padding: .85rem; scroll-margin-top: 5rem; }
.agenda-day.is-today { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary) inset; }
.agenda-day.is-past { opacity: .65; }
.agenda-date { display: flex; flex-direction: column; align-items: center; min-width: 3rem; line-height: 1; padding-top: .2rem; }
.agenda-dnum { font-size: 1.5rem; font-weight: 800; }
.agenda-dname { font-size: .75rem; text-transform: uppercase; color: var(--bs-secondary-color); font-weight: 700; margin-top: .2rem; }
.agenda-items { flex: 1; min-width: 0; margin: 0; display: grid; gap: .6rem; }
.agenda-item { display: flex; gap: .75rem; align-items: flex-start; }
.agenda-item .stat-icon { width: 34px; height: 34px; font-size: 1rem; }
.month-label { min-width: 11rem; opacity: 1 !important; }
[data-bs-theme="dark"] .month-label { background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); color: var(--bs-body-color) !important; }
.pub-narrow { max-width: 720px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent-box { padding: 1rem; border-radius: .75rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }
.pub-signup-card:hover { border-color: var(--bs-primary); }
.field-row { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .85rem; background: var(--bs-body-bg); }
.field-row + .field-row { margin-top: .6rem; }
.field-row .field-handle { color: var(--bs-secondary-color); }
.liturgy-card { border-top: 3px solid #b45309; }
.liturgy-refs li { padding: .2rem 0; font-size: .92rem; }
.liturgy-refs li span { color: var(--bs-secondary-color); }
.liturgy-quote { border-left: 3px solid var(--bs-border-color); padding-left: .75rem; margin: 0 0 .75rem; font-style: italic; font-size: .95rem; }
/* escalas */
.roster-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.roster-slot { display: grid; grid-template-columns: 6.5rem 1fr; gap: .35rem .5rem; align-items: center; margin-bottom: .4rem; }
.roster-slot .badge { grid-column: 2; justify-self: start; }
.roster-slot.is-open select { border-color: #fda29b; background-color: #fffbfa; }
[data-bs-theme="dark"] .roster-slot.is-open select { background-color: rgba(240, 68, 56, .08); }
.whatsapp-preview { white-space: pre-wrap; font-family: inherit; font-size: .85rem; background: var(--bs-tertiary-bg); padding: .75rem; border-radius: .5rem; max-height: 320px; overflow: auto; }

/* ---------------------------------------------------------------- cor da página pública */
.public-body { --bs-primary: var(--pub-accent, #1d4ed8); --bs-primary-rgb: var(--pub-accent-rgb, 29, 78, 216);
  --bs-link-color: var(--pub-accent, #1d4ed8); --bs-link-hover-color: var(--pub-accent-dark, #13338c);
  --bs-link-color-rgb: var(--pub-accent-rgb, 29, 78, 216); }
.public-body .btn-primary { --bs-btn-bg: var(--pub-accent, #1d4ed8); --bs-btn-border-color: var(--pub-accent, #1d4ed8);
  --bs-btn-hover-bg: var(--pub-accent-dark, #13338c); --bs-btn-hover-border-color: var(--pub-accent-dark, #13338c);
  --bs-btn-active-bg: var(--pub-accent-dark, #13338c); --bs-btn-active-border-color: var(--pub-accent-dark, #13338c); }
.public-body .btn-outline-primary { --bs-btn-color: var(--pub-accent, #1d4ed8); --bs-btn-border-color: var(--pub-accent, #1d4ed8);
  --bs-btn-hover-bg: var(--pub-accent, #1d4ed8); --bs-btn-hover-border-color: var(--pub-accent, #1d4ed8);
  --bs-btn-active-bg: var(--pub-accent-dark, #13338c); }
.public-body .pub-hero { background: linear-gradient(135deg, var(--pub-accent-dark, #11264a), var(--pub-accent, #1d4ed8)); }
.public-body .pub-h2 .bi, .public-body .pub-contact .bi { color: var(--pub-accent, #1d4ed8); }
.public-body .pub-event-date { background: var(--pub-accent-soft, #eaf2ff); color: var(--pub-accent, #1d4ed8); }
.public-body .badge-soft-primary { background: var(--pub-accent-soft, #eaf2ff); color: var(--pub-accent-dark, #1d4ed8); }
.public-body .liturgy-card { border-top-color: var(--pub-accent, #b45309); }
[data-bs-theme="dark"] .public-body .pub-event-date, [data-bs-theme="dark"] .public-body .badge-soft-primary { background: rgba(var(--pub-accent-rgb, 29, 78, 216), .2); color: #fff; }
.pix-grid { display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: center; }
@media (max-width: 575.98px) { .pix-grid { grid-template-columns: 1fr; } .pix-qr { max-width: 220px; margin: 0 auto; } }
.pix-qr { background: #fff; border-radius: .75rem; padding: .35rem; border: 1px solid var(--bs-border-color); }
.pix-qr svg { width: 100%; height: auto; display: block; }
.pix-key { font-size: .95rem; word-break: break-all; color: var(--bs-body-color); background: var(--bs-tertiary-bg); padding: .2rem .45rem; border-radius: .35rem; }
.pub-news-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pub-news-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: .75rem; }
/* seletor de cor (editor) */
.color-picker { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.color-swatch { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--bs-body-bg); box-shadow: 0 0 0 1px var(--bs-border-color); padding: 0; cursor: pointer; }
.color-swatch.active { box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--bs-primary); }
.color-custom { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; margin-left: .25rem; }
.color-custom input[type=color] { width: 2.4rem; height: 2.1rem; padding: 0; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: none; }
.swatch-1d4ed8 { background: #1d4ed8; }
.swatch-1e3a8a { background: #1e3a8a; }
.swatch-0284c7 { background: #0284c7; }
.swatch-15803d { background: #15803d; }
.swatch-9f1239 { background: #9f1239; }
.swatch-b91c1c { background: #b91c1c; }
.swatch-6d28d9 { background: #6d28d9; }
.swatch-b45309 { background: #b45309; }
.swatch-78350f { background: #78350f; }
.swatch-374151 { background: #374151; }
/* reserva de espaços */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 991.98px) { .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .week-grid { grid-template-columns: 1fr; } }
.week-day { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .6rem; min-height: 6rem; display: grid; gap: .4rem; align-content: start; }
.week-day.is-today { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary) inset; }
.week-day-head { font-size: .8rem; text-transform: uppercase; color: var(--bs-secondary-color); }
.week-day-head strong { color: var(--bs-body-color); font-size: 1rem; }
.week-item { border-left: 3px solid #12b76a; background: var(--bs-tertiary-bg); border-radius: .4rem; padding: .3rem .45rem; }
.week-item.is-pending { border-left-color: #f79009; }
/* tarefas: quadro no estilo Planner/Asana */
.tc-none { --tc: var(--bs-border-color); }
.tc-yellow { --tc: #f5b700; } .tc-orange { --tc: #f97316; } .tc-red { --tc: #ef4444; } .tc-pink { --tc: #ec4899; }
.tc-purple { --tc: #8b5cf6; } .tc-blue { --tc: #3b82f6; } .tc-teal { --tc: #14b8a6; } .tc-green { --tc: #22c55e; }
.tc-gray { --tc: #64748b; }
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.board-toolbar .view-tabs { border-bottom: 0; }
.board-filters { display: flex; gap: .3rem; align-items: center; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 991.98px) {
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(85vw, 340px); overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: .5rem; margin-inline: -1rem; padding-inline: 1rem; scroll-padding-inline: 1rem; }
  .board-col { scroll-snap-align: start; }
}
.board-col { background: var(--bs-tertiary-bg); border-radius: 1rem; padding: .75rem; display: flex; flex-direction: column; gap: .6rem;
  border-top: 4px solid var(--col, var(--bs-border-color)); }
.board-col--todo { --col: #94a3b8; } .board-col--doing { --col: #3b82f6; } .board-col--done { --col: #22c55e; }
.board-col-head { display: flex; align-items: center; justify-content: space-between; padding: 0 .2rem; }
.board-col-title { font-size: .95rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.col-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--col); }
.board-count { font-size: .75rem; font-weight: 600; min-width: 1.6rem; text-align: center; padding: .1rem .45rem; border-radius: 999px;
  background: var(--bs-body-bg); color: var(--bs-secondary-color); }
.board-list { display: flex; flex-direction: column; gap: .6rem; min-height: 3rem; border-radius: .75rem; transition: background .15s; }
.board-list.is-over { background: color-mix(in srgb, var(--col) 12%, transparent); }
.board-empty { font-size: .85rem; color: var(--bs-secondary-color); text-align: center; padding: 1rem .5rem;
  border: 2px dashed var(--bs-border-color); border-radius: .75rem; }
.board-list .tcard ~ .board-empty { display: none; }

.tcard { position: relative; border-radius: .8rem; padding: .75rem .85rem .6rem; border: 1px solid var(--bs-border-color-translucent);
  border-top: 6px solid var(--tc); background: var(--bs-body-bg);
  background: color-mix(in srgb, var(--tc) 13%, var(--bs-body-bg));
  box-shadow: 0 1px 2px rgb(16 24 40 / .06); cursor: grab; transition: box-shadow .15s, transform .15s;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tcard.tc-none { background: var(--bs-body-bg); border-top-width: 1px; }
.tcard:hover { box-shadow: 0 6px 16px rgb(16 24 40 / .12); transform: translateY(-1px); }
.tcard:target { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.tcard.is-late { box-shadow: inset 3px 0 0 #ef4444, 0 1px 2px rgb(16 24 40 / .06); }
.tcard.is-done { opacity: .75; }
.tcard.is-done .tcard-title a { text-decoration: line-through; color: var(--bs-secondary-color); }
.tcard.is-dragging { opacity: .35; box-shadow: none; transform: none; }
.tcard-ghost { position: fixed; z-index: 2000; pointer-events: none; margin: 0; transform: rotate(2.5deg);
  box-shadow: 0 18px 40px rgb(16 24 40 / .28); cursor: grabbing; }
body.is-dragging-task, body.is-dragging-task * { cursor: grabbing !important; }
.tcard-title { font-size: .95rem; font-weight: 600; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.tcard-title a { color: var(--bs-body-color); text-decoration: none; }
.tcard-title a:hover { text-decoration: underline; }
.tcard-labels { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .4rem; }
.task-label { display: inline-block; font-size: .7rem; font-weight: 600; line-height: 1.2; padding: .2rem .5rem; border-radius: 999px;
  border: 0; text-decoration: none; color: var(--bs-body-color);
  background: color-mix(in srgb, var(--tc, var(--bs-secondary-color)) 26%, var(--bs-body-bg)); }
.tc-none .task-label, .label-suggest .task-label { background: var(--bs-secondary-bg); }
button.task-label { cursor: pointer; }
.label-suggest { display: flex; flex-wrap: wrap; gap: .25rem; }
.tcard-progress { margin-top: .55rem; }
.tcard-progress .bar { height: 5px; width: 100%; display: block; }
.tcard-progress .bar-fg { fill: var(--tc); }
.tcard.tc-none .tcard-progress .bar-fg { fill: #22c55e; }
.tcard-progress .bar-bg { fill: color-mix(in srgb, var(--bs-body-color) 10%, transparent); }
.tcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .55rem; font-size: .75rem; color: var(--bs-secondary-color); }
.meta-chip, .due-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .4rem; border-radius: .4rem; }
.due-chip.is-late { background: #fee4e2; color: #b42318; font-weight: 600; }
.due-chip.is-soon { background: #fef0c7; color: #93370d; font-weight: 600; }
.meta-chip.is-complete { color: #12b76a; font-weight: 600; }
.meta-chip.is-high { color: #ef4444; }
.tcard-menu { border: 0; background: none; color: var(--bs-secondary-color); padding: .1rem .35rem; border-radius: .4rem; line-height: 1; }
.tcard-menu:hover, .tcard-menu[aria-expanded="true"] { background: color-mix(in srgb, var(--bs-body-color) 10%, transparent); color: var(--bs-body-color); }
.tcard-dropdown { min-width: 15rem; cursor: default; }
.board-add { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border-radius: .7rem; color: var(--bs-secondary-color); }
.board-add:focus-within { background: var(--bs-body-bg); box-shadow: 0 0 0 1px var(--bs-border-color); }
.board-add input { flex: 1; min-width: 0; border: 0; background: none; padding: .3rem 0; color: var(--bs-body-color); outline: 0; }
.board-add .btn { display: none; }
.board-add:focus-within .btn { display: inline-block; }

.swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.swatch { --sz: 1.9rem; width: var(--sz); height: var(--sz); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--tc); border: 2px solid var(--bs-body-bg); box-shadow: 0 0 0 1px var(--bs-border-color); cursor: pointer; padding: 0;
  color: var(--bs-secondary-color); transition: transform .1s; }
.swatch.tc-none { background: var(--bs-body-bg); }
.swatch:hover { transform: scale(1.1); }
.swatch-sm { --sz: 1.35rem; }
.swatch.is-active { box-shadow: 0 0 0 2px var(--bs-body-color); }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--bs-body-color); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.task-cover { height: .5rem; border-radius: 999px; background: var(--tc); margin-bottom: 1rem; }
.task-cover.tc-none { display: none; }
[data-bs-theme="dark"] .due-chip.is-late { background: #55160c; color: #fda29b; }
[data-bs-theme="dark"] .due-chip.is-soon { background: #4e1d09; color: #fec84b; }
[data-bs-theme="dark"] .tcard { box-shadow: none; }
.avatar-xs { width: 1.35rem; height: 1.35rem; font-size: .6rem; display: inline-flex; vertical-align: middle; }
.checklist li { border-top: 1px solid var(--bs-border-color-translucent); }
.checklist-item { display: flex; gap: .6rem; align-items: flex-start; width: 100%; text-align: left; padding: .6rem 1rem;
  background: none; border: 0; color: inherit; }
.checklist-item:hover { background: var(--bs-tertiary-bg); }
.checklist-item .bi { font-size: 1.1rem; color: var(--bs-secondary-color); }
.checklist-item.is-done .bi { color: #12b76a; }
.checklist-item.is-done span { text-decoration: line-through; color: var(--bs-secondary-color); }
.choice-chip span { display: inline-block; padding: .35rem .75rem; border: 1px solid var(--bs-border-color); border-radius: 999px;
  font-size: .85rem; cursor: pointer; background: var(--bs-body-bg); }
.choice-chip input:checked + span { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.choice-chip input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
/* ferramentas de PDF */
.pdf-stage { overflow: auto; background: var(--bs-tertiary-bg); border-radius: .75rem; padding: 1rem; max-height: 80vh; }
.pdf-page { position: relative; margin: 0 auto; width: max-content; box-shadow: 0 4px 24px rgba(0, 0, 0, .15); background: #fff; }
.pdf-page canvas { display: block; }
.pdf-layer { position: absolute; inset: 0; }
.pdf-item { position: absolute; outline: 1px dashed transparent; }
.pdf-item:hover, .pdf-item.is-selected { outline-color: #2e90fa; }
.pdf-text { min-width: 1ch; white-space: pre; line-height: 1.2; font-family: Helvetica, Arial, sans-serif; outline: none; cursor: text; padding: 0 2px; }
.pdf-item-image img { width: 100%; height: 100%; display: block; cursor: move; user-select: none; }
.pdf-grip { position: absolute; top: -1.4rem; left: -2px; font-size: .8rem; background: #2e90fa; color: #fff; border-radius: .3rem;
  padding: 0 .3rem; cursor: move; display: none; touch-action: none; }
.pdf-item:hover .pdf-grip, .pdf-item.is-selected .pdf-grip { display: inline-block; }
.pdf-resize { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; background: #2e90fa; border: 2px solid #fff;
  border-radius: 50%; cursor: nwse-resize; touch-action: none; }
.pdf-file { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; }
.pdf-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.pdf-thumb { display: grid; gap: .3rem; justify-items: center; padding: .5rem; border: 1px solid var(--bs-border-color); border-radius: .6rem;
  background: var(--bs-body-bg); cursor: pointer; }
.pdf-thumb:has(input:checked) { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary) inset; }
.pdf-thumb canvas { max-width: 100%; height: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
button.view-tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
button.view-tab.active { border-bottom-color: var(--bs-primary); }

/* ---------------------------------------------------------------- agendas (cores, grade, impressão) */
.cal-1d4ed8 { --cal: #1d4ed8; }
.cal-1e3a8a { --cal: #1e3a8a; }
.cal-0284c7 { --cal: #0284c7; }
.cal-15803d { --cal: #15803d; }
.cal-9f1239 { --cal: #9f1239; }
.cal-b91c1c { --cal: #b91c1c; }
.cal-6d28d9 { --cal: #6d28d9; }
.cal-b45309 { --cal: #b45309; }
.cal-78350f { --cal: #78350f; }
.cal-374151 { --cal: #374151; }
.cal-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--cal, #1d4ed8); flex-shrink: 0; }
.cal-dot.lg { width: 1rem; height: 1rem; margin-top: .25rem; }
.cal-filter { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cal-chip > span { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid var(--bs-border-color);
  border-radius: 999px; font-size: .85rem; cursor: pointer; background: var(--bs-body-bg); }
.cal-chip input:checked + span { border-color: var(--cal); box-shadow: 0 0 0 1px var(--cal) inset; font-weight: 600; }
.cal-chip input:focus-visible + span { outline: 2px solid var(--cal); outline-offset: 2px; }
.cal-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px;
  border: 1px solid var(--cal); color: var(--cal); }
[data-bs-theme="dark"] .cal-tag { color: var(--bs-body-color); }
.month-grid-wrap { overflow-x: auto; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 640px; border: 1px solid var(--bs-border-color);
  border-radius: .85rem; overflow: hidden; background: var(--bs-body-bg); }
.month-head { padding: .45rem .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
.month-cell { min-height: 7.2rem; padding: .35rem; border-right: 1px solid var(--bs-border-color-translucent);
  border-bottom: 1px solid var(--bs-border-color-translucent); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.is-other { background: var(--bs-tertiary-bg); }
.month-cell.is-other .month-num { color: var(--bs-secondary-color); }
.month-cell.is-today .month-num { background: var(--bs-primary); color: #fff; }
.month-cell-head { display: flex; align-items: center; justify-content: space-between; }
.month-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; border-radius: 50%;
  font-size: .85rem; font-weight: 700; }
.month-add { opacity: 0; color: var(--bs-secondary-color); text-decoration: none; font-size: 1.05rem; line-height: 1; padding: 0 .2rem; }
.month-cell:hover .month-add, .month-add:focus-visible { opacity: 1; }
@media (hover: none) { .month-add { opacity: .6; } }
.month-event { display: block; font-size: .74rem; line-height: 1.25; padding: .12rem .35rem; border-radius: .3rem; text-decoration: none;
  color: var(--bs-body-color); background: color-mix(in srgb, var(--cal, #1d4ed8) 12%, transparent); border-left: 3px solid var(--cal, #1d4ed8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-event:hover { background: color-mix(in srgb, var(--cal, #1d4ed8) 22%, transparent); }
.month-event-time { font-weight: 700; margin-right: .25rem; }
.month-more { font-size: .72rem; color: var(--bs-secondary-color); text-decoration: none; padding-left: .35rem; }
.color-option .color-swatch { display: inline-block; }
.color-option input:checked + .color-swatch { box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--bs-primary); }
.color-option input:focus-visible + .color-swatch { outline: 2px solid var(--bs-primary); outline-offset: 3px; }
/* impressão da agenda */
.print-sheet { width: min(210mm, 100%); margin: 1.5rem auto; background: #fff; color: #111827; padding: 12mm; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.print-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; border-bottom: 2px solid #111827; padding-bottom: .5rem; margin-bottom: .75rem; }
.print-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #4b5563; }
.print-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.print-period { font-weight: 700; font-size: 1rem; }
.print-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.print-table th, .print-table td { border-bottom: 1px solid #e5e7eb; padding: .45rem .5rem; vertical-align: top; text-align: left; }
.print-table th { width: 7.5rem; white-space: nowrap; }
.print-table tr.is-weekend th { background: #f9fafb; }
.print-day { display: block; font-weight: 800; font-size: 1rem; }
.print-wd { display: block; font-size: .78rem; color: #4b5563; text-transform: capitalize; font-weight: 500; }
.print-item { display: flex; gap: .6rem; padding: .1rem 0; }
.print-time { min-width: 6.5rem; font-weight: 700; white-space: nowrap; }
.print-cal { color: #6b7280; font-size: .8rem; }
.print-empty { color: #9ca3af; }
.print-foot { margin-top: .75rem; font-size: .72rem; color: #6b7280; }
@media print { .print-sheet { width: auto; margin: 0; padding: 12mm; box-shadow: none; } }
@media (max-width: 575.98px) {
  .month-grid { min-width: 0; }
  .month-head { padding: .35rem .15rem; text-align: center; font-size: .65rem; }
  .month-cell { min-height: 3.8rem; padding: .2rem; gap: .15rem; }
  .month-cell-head { justify-content: center; }
  .month-num { min-width: 1.4rem; height: 1.4rem; font-size: .78rem; }
  .month-add { display: none; }
  .month-event { font-size: 0; height: .32rem; padding: 0; border-left: 0; border-radius: 999px; background: var(--cal, #1d4ed8); }
  .month-event:hover { background: var(--cal, #1d4ed8); }
  .month-event-time { display: none; }
  .month-more { font-size: .6rem; padding: 0; text-align: center; }
}

/* ---------------------------------------------------------------- "Hoje na secretaria" (PRD §57, fase B, item 3) */
.today-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.today-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.today-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px;
  border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none;
  font-size: .85rem; }
.today-chip:hover { border-color: var(--bs-primary); color: var(--bs-body-color); }
.today-chip-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem;
  border-radius: 999px; background: var(--bs-tertiary-bg); font-weight: 700; }
.today-chip.is-hot .today-chip-num { background: var(--bs-primary); color: #fff; }
.today-chip.is-late .today-chip-num { background: var(--bs-danger); color: #fff; }
.today-body { padding-top: .5rem; }
.today-list { display: grid; gap: .15rem; margin: 0 0 .5rem; }
.today-list:last-child { margin-bottom: 0; }
.today-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .5rem; margin: 0 -.5rem; border-radius: .6rem;
  color: var(--bs-body-color); text-decoration: none; }
a.today-row:hover, a.today-row:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.today-row .stat-icon { width: 34px; height: 34px; font-size: 1rem; flex-shrink: 0; }
.today-time { min-width: 3.1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--bs-primary); font-size: .9rem; }
.today-count { min-width: 2rem; height: 2rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-primary); color: #fff; font-weight: 700; font-size: .85rem; }
.today-mark { width: .55rem; height: .55rem; border-radius: 50%; flex-shrink: 0; background: var(--bs-secondary-color); }
.today-mark.red { background: var(--bs-danger); }
.today-mark.amber { background: var(--bs-warning); }
.today-sub { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color);
  margin: .75rem 0 .15rem; }
.today-body > .today-sub:first-child { margin-top: 0; }
.today-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.today-note { display: block; font-size: .85rem; color: var(--bs-warning-text-emphasis); text-decoration: none; }
@media (max-width: 575.98px) {
  .today-request { flex-wrap: wrap; }
  .today-request > .stat-icon { display: none; }
  .today-request .today-actions { width: 100%; }
  .today-request .today-actions form { flex: 1; }
  .today-request .today-actions .btn { width: 100%; }
}
.today-more { display: block; font-size: .85rem; margin-top: .25rem; }

/* ---------------------------------------------------------------- intenções de missa (PRD §57, fase B, item 4) */
.mass-list { display: grid; gap: .9rem; }
.mass-card .card-header { padding-block: .7rem; }
.mass-when { min-width: 3.4rem; font-size: 1.15rem; font-weight: 800; color: var(--bs-primary); font-variant-numeric: tabular-nums; }
.intention-list { padding: .25rem 1rem .5rem; }
.intention-row { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.intention-row:last-child { border-bottom: 0; }
.intention-row > .badge { min-width: 6.6rem; margin-top: .15rem; }
.intention-menu { min-width: 16rem; }
.more-dates summary { cursor: pointer; font-weight: 600; color: var(--bs-primary); }
.more-dates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.intention-mass { font-size: 1.15rem; font-weight: 800; }
.intention-group { margin-bottom: 1rem; break-inside: avoid; }
.intention-group h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #374151; margin: 0 0 .3rem;
  border-bottom: 1px solid #e5e7eb; padding-bottom: .2rem; }
.intention-group ul { margin: 0; padding-left: 1.1rem; font-size: 1.05rem; line-height: 1.55; columns: 2; column-gap: 2rem; }
.intention-group li { break-inside: avoid; }
.summary-totals { max-width: 22rem; margin-left: auto; }
@media (max-width: 575.98px) {
  .intention-row { flex-wrap: wrap; }
  .intention-row > .badge { min-width: 0; }
  .intention-row > .flex-grow-1 { order: 3; flex-basis: 100%; }
  .intention-row > .dropdown { margin-left: auto; }
  .intention-group ul { columns: 1; }
}
@media print { .intention-sheet { break-after: page; } .intention-sheet:last-child { break-after: auto; } }

/* ---------------------------------------------------------------- batizados e casamentos (PRD §57, fase B, item 5) */
.sac-list > li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.sac-row { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; color: var(--bs-body-color); text-decoration: none; }
a.sac-row:hover, a.sac-row:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.sac-row.is-past { opacity: .65; }
.sac-row .stat-icon { width: 38px; height: 38px; font-size: 1.05rem; flex-shrink: 0; }
.sac-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; flex-shrink: 0; }
.sac-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 3.2rem; height: 3.2rem;
  border-radius: .7rem; background: var(--bs-tertiary-bg); line-height: 1; flex-shrink: 0; }
.sac-date span { font-size: 1.3rem; font-weight: 800; }
.sac-date small { font-size: .68rem; color: var(--bs-secondary-color); margin-top: .15rem; }
.sac-chosen { display: flex; align-items: center; gap: .85rem; }
.sac-data dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 700; }
.sac-data dd { margin-bottom: .75rem; }
.sac-data dd:last-child { margin-bottom: 0; }
.print-pending { font-size: .75rem; color: #b42318; margin-top: .2rem; }
.sac-print th { width: auto; white-space: normal; }
.sac-print th:first-child, .sac-print td:first-child { width: 2rem; }
@media (max-width: 575.98px) {
  .sac-row { flex-wrap: wrap; }
  .sac-side { width: 100%; justify-content: flex-start; }
  .sac-row .stat-icon ~ .sac-side { padding-left: calc(38px + .85rem); }
  .sac-row .sac-date ~ .sac-side { padding-left: calc(3.2rem + .85rem); }
}

/* ---------------------------------------------------------------- Minha agenda (PRD §57, fase C) */
/* Dentro do layout normal do sistema (menu lateral e barra inferior), centralizada como no celular. */
.my-agenda { max-width: 40rem; margin-inline: auto; }
.ma-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.2; }
.ma-icon-btn { width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border-radius: 50%; font-size: 1.15rem; }
.ma-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--bs-border-color); }
.ma-tab { flex: 1; text-align: center; padding: .6rem .5rem; font-weight: 700; color: var(--bs-secondary-color); text-decoration: none;
  border-bottom: 3px solid transparent; }
.ma-tab.active { color: var(--bs-primary); border-bottom-color: var(--bs-primary); }
.ma-main { padding-top: 1rem; }
.ma-period { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.ma-period-label { font-size: 1.15rem; font-weight: 800; text-align: center; }
.ma-today { display: inline-block; margin-left: .45rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--bs-primary); vertical-align: middle; }
.ma-cals { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .35rem; margin-bottom: .75rem; scrollbar-width: none; }
.ma-cals .cal-chip > span { white-space: nowrap; }
.ma-day { margin-bottom: 1rem; }
.ma-day-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color);
  margin: 0 0 .4rem; display: flex; align-items: baseline; gap: .4rem; }
.ma-day-title span { font-size: 1.25rem; color: var(--bs-body-color); }
.ma-day.is-today .ma-day-title { color: var(--bs-primary); }
.ma-event { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-left: 5px solid var(--cal, #1d4ed8);
  border-radius: .8rem; margin-bottom: .5rem; }
.ma-event summary { display: flex; gap: .85rem; align-items: flex-start; padding: .8rem .9rem; cursor: pointer; list-style: none; }
.ma-event summary::-webkit-details-marker { display: none; }
.ma-event[open] summary { padding-bottom: .4rem; }
.ma-time { min-width: 3.3rem; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ma-what { display: flex; flex-direction: column; min-width: 0; }
.ma-event-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.ma-place { font-size: .88rem; color: var(--bs-secondary-color); }
.ma-next-tag { align-self: flex-start; margin-top: .3rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: var(--bs-primary); border-radius: 999px; padding: .1rem .5rem; }
.ma-event.is-next { box-shadow: 0 0 0 2px var(--bs-primary); }
.ma-event.is-past { opacity: .6; }
.ma-detail { padding: 0 .9rem .85rem calc(3.3rem + 1.75rem); font-size: .92rem; color: var(--bs-secondary-color); display: grid; gap: .15rem; }
.ma-empty { text-align: center; padding: 1.75rem 1rem; color: var(--bs-secondary-color); background: var(--bs-body-bg);
  border: 1px dashed var(--bs-border-color); border-radius: .8rem; }
.ma-empty .bi { display: block; font-size: 1.6rem; margin-bottom: .35rem; }
@media (max-width: 380px) { .ma-detail { padding-left: .9rem; } }

/* ---------------------------------------------------------------- identidade da organização (menu e Início) */
.org-avatar { width: 44px; height: 44px; border-radius: 12px !important; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .12); }
.org-avatar-sm { width: 32px; height: 32px; border-radius: 9px !important; box-shadow: none; }
.org-avatar-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem;
  color: #fff; background: linear-gradient(135deg, var(--ot-blue-600, #1d4ed8), var(--ot-navy-800, #11264a)); }
.org-avatar-sm.org-avatar-initials { font-size: .8rem; }
.sidebar-org-brand { align-items: center; padding-bottom: 1rem; }
.org-brand-text { display: flex; flex-direction: column; min-width: 0; }
.org-brand-name { font-size: 1rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.org-brand-sub { font-size: .72rem; font-weight: 500; color: rgba(255, 255, 255, .6); letter-spacing: 0; margin-top: .15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-powered { display: flex; align-items: center; gap: .4rem; font-size: .72rem; }
.sidebar-powered .brand-logo { max-height: 18px; max-width: 60px; border-radius: 4px; }
.topbar-org-name { max-width: 58vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
.org-hero { position: relative; border-radius: 1rem; overflow: hidden; margin-bottom: 1.25rem; min-height: 9.5rem;
  display: flex; align-items: flex-end; color: #fff;
  background: linear-gradient(135deg, var(--ot-navy-800, #11264a), var(--ot-blue-600, #1d4ed8)); }
.org-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.org-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 15, 35, .05) 0%, rgba(8, 15, 35, .78) 100%); }
.org-hero-body { position: relative; z-index: 1; padding: 1.25rem 1.4rem; display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: .75rem; width: 100%; }
.org-hero-kicker { font-size: .8rem; opacity: .85; }
.org-hero-title { font-size: clamp(1.35rem, 3.2vw, 1.9rem); font-weight: 800; margin: .1rem 0 0; line-height: 1.15; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.org-hero-sub { font-size: .9rem; opacity: .9; margin-top: .2rem; }
.org-hero-btn { background: rgba(255, 255, 255, .94); color: #111827; border: 0; font-weight: 600; }
.org-hero-btn:hover, .org-hero-btn:focus-visible { background: #fff; color: #111827; }
@media (max-width: 575.98px) { .org-hero { min-height: 8rem; } .org-hero-body { padding: 1rem; } }

/* ---------------------------------------------------------------- políticas de privacidade */
.privacy-doc h2 { font-size: 1.05rem; font-weight: 700; margin: 1.4rem 0 .5rem; }
.privacy-doc h2:first-child { margin-top: 0; }
.privacy-doc ul { padding-left: 1.2rem; }
.privacy-doc li { margin-bottom: .35rem; }

/* ---------------------------------------------------------------- página pública: layout de portal (out/2026) */
.pub-wide { max-width: 1160px; }
.pub-topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--bs-border-color); padding-top: env(safe-area-inset-top, 0px); }
[data-bs-theme="dark"] .pub-topbar { background: rgba(11, 18, 32, .94); }
.pub-topbar-row { display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; }
.pub-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bs-body-color); min-width: 0; flex-shrink: 1; }
.pub-brand-img { width: 2.3rem; height: 2.3rem; border-radius: .6rem; object-fit: cover; flex-shrink: 0; }
.pub-brand-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, var(--pub-accent-dark, #11264a), var(--pub-accent, #1d4ed8)); }
.pub-brand-name { font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.pub-menu { display: flex; gap: .15rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.pub-menu::-webkit-scrollbar { display: none; }
.pub-menu a { padding: .45rem .7rem; border-radius: .5rem; font-weight: 600; font-size: .92rem; color: var(--bs-secondary-color);
  text-decoration: none; white-space: nowrap; }
.pub-menu a:hover, .pub-menu a:focus-visible { color: var(--bs-primary); background: var(--bs-tertiary-bg); }
.pub-give { flex-shrink: 0; font-weight: 700; }
.pub-section { scroll-margin-top: 4.5rem; }
@media (max-width: 767.98px) {
  .pub-topbar-row { flex-wrap: wrap; gap: .25rem .75rem; padding-block: .45rem; }
  .pub-brand-name { max-width: 60vw; }
  .pub-menu { order: 3; width: 100%; margin-left: -.7rem; }
  .pub-give { margin-left: auto; }
}
.pub-hero-home.has-cover { min-height: 400px; }
.pub-hero-home .pub-title { font-size: clamp(1.9rem, 5.2vw, 3.1rem); text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.pub-main { padding-top: 2rem; }
.pub-section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }

/* destaques: carrossel + próximos eventos */
.pub-highlights { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.25rem; align-items: stretch; }
.pub-highlights.no-events, .pub-highlights.no-news { grid-template-columns: 1fr; }
@media (max-width: 991.98px) { .pub-highlights { grid-template-columns: 1fr; } }
.pub-carousel { border-radius: 1rem; overflow: hidden; background: #0b1220; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); }
.pub-slide { position: relative; display: block; aspect-ratio: 16 / 9; color: #fff; text-decoration: none; }
.pub-slide:hover, .pub-slide:focus-visible { color: #fff; }
.pub-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-slide-img-soft { filter: saturate(.85) brightness(.85); }
.pub-slide-placeholder { display: flex; align-items: center; justify-content: center; font-size: 4rem; color: rgba(255, 255, 255, .25);
  background: linear-gradient(135deg, var(--pub-accent-dark, #11264a), var(--pub-accent, #1d4ed8)); }
.pub-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 10, 25, 0) 35%, rgba(5, 10, 25, .88) 100%); }
.pub-slide-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.25rem 1.5rem 2.4rem; display: flex; flex-direction: column; gap: .3rem; }
.pub-slide-date { font-size: .8rem; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pub-slide-title { font-size: clamp(1.2rem, 2.6vw, 1.75rem); font-weight: 800; line-height: 1.2; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.pub-slide-summary { font-size: .95rem; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub-slide-more { font-size: .85rem; font-weight: 700; margin-top: .2rem; }
.pub-carousel .carousel-indicators { margin-bottom: .75rem; }
.pub-carousel .carousel-indicators [data-bs-target] { width: 1.6rem; height: .3rem; border-radius: 999px; }
.pub-carousel .carousel-control-prev, .pub-carousel .carousel-control-next { width: 10%; }
@media (max-width: 575.98px) {
  .pub-slide { aspect-ratio: 4 / 3; }
  .pub-slide-text { padding: 1rem 1rem 2.2rem; }
  .pub-slide-summary { -webkit-line-clamp: 3; }
}
.pub-events-compact { display: grid; gap: .8rem; }
.pub-events-compact li { display: flex; gap: .75rem; align-items: center; }
.pub-events-compact .pub-event-date { min-width: 3rem; }

.pub-news-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pub-news-card { transition: transform .15s, box-shadow .15s; }
.pub-news-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15, 23, 42, .1); }

.pub-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.pub-two.single { grid-template-columns: 1fr; }
@media (max-width: 991.98px) { .pub-two { grid-template-columns: 1fr; } }
.pub-two > .pub-section, .pub-two > .card { margin-bottom: 0; }
.pub-two { margin-bottom: 1.75rem; }
#contato.pub-two { align-items: stretch; }
.pub-locations { display: grid; gap: .75rem; }
.pub-band { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: 1.25rem; }
.card-body.pub-share { border: 0; background: none; padding: 1.25rem; height: 100%; }

.pub-footer-rich { background: #0f172a; color: rgba(255, 255, 255, .85); border-top: 0; padding-top: 2rem; }
.pub-footer-rich a { color: #fff; }
.pub-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 767.98px) { .pub-footer-grid { grid-template-columns: 1fr; gap: 1rem; } }
.pub-footer-title { font-weight: 800; font-size: 1.05rem; color: #fff; }
.pub-footer-links { display: flex; flex-direction: column; gap: .35rem; }
.pub-footer-credit { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .55); }

/* ---------------------------------------------------------------- menu lateral: cabeça e conta (out/2026) */
.sidebar-head { display: flex; align-items: flex-start; gap: .25rem; }
.sidebar-head .sidebar-brand { flex: 1; min-width: 0; }
.sidebar-collapse-btn { border: 0; background: transparent; color: rgba(255, 255, 255, .45); width: 1.8rem; height: 1.8rem;
  border-radius: .45rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: .4rem; }
.sidebar-collapse-btn:hover, .sidebar-collapse-btn:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-account { display: flex; align-items: center; gap: .35rem; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: .75rem; margin-top: .5rem; }
.sidebar-user { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; color: #fff;
  padding: .4rem .45rem; border-radius: .6rem; text-align: left; }
.sidebar-user:hover, .sidebar-user[aria-expanded="true"] { background: rgba(255, 255, 255, .08); }
.sidebar-user .avatar { flex-shrink: 0; }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; flex: 1; }
.sidebar-user-text strong { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-text small { font-size: .72rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user > .bi { color: rgba(255, 255, 255, .5); }
.btn-sidebar { color: rgba(255, 255, 255, .8); background: transparent; border: 0; }
.btn-sidebar:hover, .btn-sidebar:focus-visible, .btn-sidebar[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .1); }
.account-menu { min-width: 15rem; }
.sidebar-bell .notif-menu { max-height: 70vh; }
@media (min-width: 992px) {
  .sidebar-collapsed .sidebar-head { flex-direction: column; align-items: center; }
  .sidebar-collapsed .sidebar-collapse-btn .bi { transform: rotate(180deg); }
  .sidebar-collapsed .sidebar-account { flex-direction: column-reverse; }
  .sidebar-collapsed .sidebar-user { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar-user-text, .sidebar-collapsed .sidebar-user > .bi { display: none; }
  .sidebar-collapsed .sidebar-org-brand .org-avatar { width: 40px; height: 40px; }
}

/* ---------------------------------------------------------------- Início da secretaria (out/2026) */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 1.25rem; align-items: start; }
.home-main, .home-side { display: grid; gap: 1.25rem; min-width: 0; }
@media (max-width: 1199.98px) { .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); } }
@media (max-width: 991.98px) { .home-grid { grid-template-columns: 1fr; } .home-side { order: -1; } }
.home-ti-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; }
.home-ti-stats a { display: flex; flex-direction: column; padding: .6rem .75rem; border-radius: .7rem; background: var(--bs-tertiary-bg);
  color: var(--bs-body-color); text-decoration: none; line-height: 1.1; }
.home-ti-stats a:hover { background: var(--bs-secondary-bg); }
.home-ti-stats strong { font-size: 1.4rem; font-weight: 800; }
.home-ti-stats span { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .2rem; }
.home-ti-stats a.is-hot strong { color: var(--bs-primary); }
.card-title .badge { font-size: .7rem; vertical-align: middle; }

/* ---------------------------------------------------------------- Início da secretaria (out/2026) */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 1.25rem; align-items: start; }
.home-main, .home-side { display: grid; gap: 1.25rem; min-width: 0; }
@media (max-width: 1199.98px) { .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); } }
@media (max-width: 991.98px) { .home-grid { grid-template-columns: 1fr; } }
.home-ti-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; }
.home-ti-stats a { display: flex; flex-direction: column; padding: .6rem .75rem; border-radius: .7rem; background: var(--bs-tertiary-bg);
  color: var(--bs-body-color); text-decoration: none; line-height: 1.1; }
.home-ti-stats a:hover { background: var(--bs-secondary-bg); }
.home-ti-stats strong { font-size: 1.4rem; font-weight: 800; }
.home-ti-stats span { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .2rem; }
.home-ti-stats a.is-hot strong { color: var(--bs-primary); }
.card-title .badge { font-size: .7rem; vertical-align: middle; }
.home-side .today-request { flex-wrap: wrap; }
.home-side .today-request .today-actions { width: 100%; }
.pub-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pub-brand-sub { font-size: .75rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.pub-highlights-side { display: flex; flex-direction: column; gap: 1rem; }
.pub-today-list { display: grid; gap: .35rem; }
.pub-today-list li { display: flex; gap: .75rem; align-items: baseline; }
.pub-today-list strong { min-width: 3.2rem; font-size: 1.05rem; color: var(--bs-primary); font-variant-numeric: tabular-nums; }
.pub-today-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pub-welcome { position: relative; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--pub-accent-dark, #11264a), var(--pub-accent, #1d4ed8)); }
.pub-welcome::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 10, 25, 0) 30%, rgba(5, 10, 25, .8) 100%); }
.pub-main { padding-top: 1.5rem; }
@media (max-width: 767.98px) { .pub-brand-sub { max-width: 60vw; } }

/* ---------------------------------------------------------------- leitura: liturgia e notícias */
.pub-reading { max-width: 760px; }
.pub-crumb { display: inline-block; font-size: .9rem; font-weight: 600; text-decoration: none; margin-bottom: .75rem; }
.pub-article-head { margin-bottom: 1rem; }
.pub-kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--bs-primary); }
.pub-article-title { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: .25rem 0 .35rem; }
.pub-article-subtitle { font-size: 1.5rem; font-weight: 800; margin: .2rem 0 .75rem; }
.pub-article { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem);
  margin-top: 1rem; font-size: 1.08rem; line-height: 1.75; }
.pub-article-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.4rem 0 .5rem; }
.pub-article-body p { margin-bottom: 1rem; }
.liturgy-reading + .liturgy-reading { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--bs-border-color); }
.liturgy-reading h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.liturgy-ref { font-weight: 700; color: var(--bs-primary); margin-bottom: .75rem; }
.liturgy-text { font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; line-height: 1.8; }
.liturgy-close { font-style: italic; margin-top: .75rem; }
.pub-saint { margin-top: 1.5rem; }
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem 0; }
.pub-tools-sep { flex: 1; }
.pub-share-btn { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; font-size: 1rem; }
.pub-share-btn:hover, .pub-share-btn:focus-visible { border-color: var(--bs-primary); color: var(--bs-primary); }
.pub-share-btn.whatsapp:hover { color: #128c4b; border-color: #128c4b; }
.pub-share-btn.facebook:hover { color: #1877f2; border-color: #1877f2; }
.pub-listen[aria-pressed="true"] { background: var(--bs-danger); border-color: var(--bs-danger); }
@media (max-width: 575.98px) { .pub-tools-sep { flex-basis: 100%; height: 0; } }

/* ---------------------------------------------------------------- destaques e "hoje" (ajuste out/2026) */
.pub-highlights { grid-template-columns: minmax(0, 1fr) 21rem; }
.pub-highlights-side { display: flex; flex-direction: column; min-height: 0; }
.pub-events-card { flex: 1; min-height: 0; overflow: hidden; }
@media (min-width: 992px) {
  .pub-highlights { align-items: stretch; }
  .pub-highlights-main { display: flex; flex-direction: column; }
  .pub-highlights-side { position: relative; }
  .pub-events-card { overflow-y: auto; }
}
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub-today-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .85rem 1.1rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 1rem; }
.pub-today-label { display: flex; align-items: center; gap: .45rem; font-weight: 800; white-space: nowrap; }
.pub-today-label .bi { color: var(--bs-primary); font-size: 1.15rem; }
.pub-today-masses { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; min-width: 0; }
.pub-today-mass { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .35rem .75rem; border-radius: .7rem;
  background: var(--bs-tertiary-bg); max-width: 100%; }
.pub-today-mass strong { font-size: 1.05rem; color: var(--bs-primary); font-variant-numeric: tabular-nums; }
.pub-map-link { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--bs-primary); background: var(--bs-body-bg); text-decoration: none; flex-shrink: 0; }
.pub-map-link:hover { background: var(--bs-primary); color: #fff; }
.pub-today-contact { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
@media (max-width: 767.98px) { .pub-today-contact { margin-left: 0; width: 100%; } .pub-today-mass { flex: 1 1 100%; } }
.pub-saint-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .6rem; }
.pub-saint-link { display: flex; overflow: hidden; align-items: stretch; }
.pub-saint-thumb { width: 9rem; object-fit: cover; flex-shrink: 0; }
.liturgy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }

/* ---------------------------------------------------------------- seções na largura toda (ajuste out/2026) */
.pub-stack { margin-bottom: 0; }
.pub-schedule { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); align-items: start; }
.pub-locations { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.pub-liturgy-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: stretch; }
.pub-saint-card { display: flex; flex-direction: row; overflow: hidden; }
.pub-saint-side { width: 40%; max-width: 15rem; object-fit: cover; flex-shrink: 0; }
@media (max-width: 575.98px) { .pub-saint-card { flex-direction: column; } .pub-saint-side { width: 100%; max-width: none; aspect-ratio: 16 / 9; } }
.pub-events-compact li > .min-w-0 { flex: 1; min-width: 0; }
.pub-events-card .card-body { padding: 1rem 1.1rem; }
.pub-events-compact li { align-items: flex-start; }

/* ---------------------------------------------------------------- feriados na agenda */
.month-holiday { font-size: .66rem; font-weight: 700; color: #b45309; line-height: 1.1; text-align: right; margin-left: .25rem;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.month-cell.is-holiday:not(.is-other) { background: color-mix(in srgb, #f59e0b 7%, transparent); }
.month-cell.is-holiday .month-num { color: #b45309; }
.month-cell.is-today.is-holiday .month-num { color: #fff; }
.agenda-holiday, .ma-holiday { font-size: .85rem; font-weight: 700; color: #b45309; }
[data-bs-theme="dark"] .agenda-holiday, [data-bs-theme="dark"] .ma-holiday, [data-bs-theme="dark"] .month-holiday { color: #fbbf24; }
.ma-holiday { margin: -.2rem 0 .5rem; }
.print-holiday { font-weight: 700; font-size: .85rem; }
@media (max-width: 575.98px) { .month-holiday { display: none; } }

/* ===================== Início da paróquia: painel (faixa, cartões do mês, colunas, atalhos) ===================== */
.tone-green, .kpi-green { --tone: #10b981; } .tone-violet, .kpi-violet { --tone: #8b5cf6; }
.tone-blue, .kpi-blue { --tone: #3b82f6; } .tone-amber, .kpi-amber { --tone: #f59e0b; }
.tone-teal, .kpi-teal { --tone: #14b8a6; } .tone-red, .kpi-red { --tone: #ef4444; } .tone-gray { --tone: #94a3b8; }

.home-hero { position: relative; overflow: hidden; border-radius: 1.25rem; margin-bottom: 1.25rem; color: #fff; min-height: 12rem;
  background: radial-gradient(circle at 85% 20%, rgb(16 185 129 / .35), transparent 45%), linear-gradient(120deg, #0b1b3f 0%, #10305f 60%, #0f4c4a 100%); }
.home-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.home-hero.has-cover::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(8 18 40 / .92) 0%, rgb(8 18 40 / .75) 45%, rgb(8 18 40 / .15) 100%); }
.home-hero-body { position: relative; z-index: 1; padding: 2rem 2.25rem; max-width: 46rem; }
.home-hero-kicker { font-size: .85rem; font-weight: 600; color: rgb(255 255 255 / .75); margin: 0 0 .35rem; letter-spacing: .01em; }
.home-hero-title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; margin: 0 0 .5rem; color: #fff; letter-spacing: -.02em; }
.home-hero-sub { font-size: 1.05rem; color: rgb(255 255 255 / .85); margin: 0; }
.home-hero-quote { margin: .25rem 0 0; }
.home-hero-quote blockquote { font-style: italic; font-size: 1rem; line-height: 1.5; color: rgb(255 255 255 / .92); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-hero-quote figcaption { font-size: .82rem; color: #6ee7b7; margin-top: .35rem; font-weight: 600; }
.home-hero-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.hero-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .3rem .7rem;
  border-radius: 999px; background: rgb(255 255 255 / .14); color: #fff; backdrop-filter: blur(4px); }
@media (max-width: 575.98px) { .home-hero-body { padding: 1.4rem 1.25rem; } .home-hero { min-height: 0; border-radius: 1rem; } }

.kpi-grid, .quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi-card, .quick-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 1rem; text-decoration: none;
  color: var(--bs-body-color); border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent);
  background: color-mix(in srgb, var(--tone) 10%, var(--bs-body-bg)); transition: transform .15s, box-shadow .15s; }
.kpi-card:hover, .quick-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(16 24 40 / .1); color: var(--bs-body-color); }
.kpi-icon { flex-shrink: 0; width: 3.1rem; height: 3.1rem; border-radius: .9rem; display: inline-flex; align-items: center;
  justify-content: center; font-size: 1.45rem; color: var(--tone); background: color-mix(in srgb, var(--tone) 18%, var(--bs-body-bg)); }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-size: .82rem; font-weight: 600; color: var(--bs-secondary-color); }
.kpi-value { font-size: 1.85rem; font-weight: 800; line-height: 1.15; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kpi-delta { font-size: .72rem; font-weight: 700; padding: .15rem .45rem; border-radius: 999px; color: #047857; background: #d1fae5; }
.kpi-delta.is-down { color: #b42318; background: #fee4e2; }
.kpi-sub { font-size: .78rem; color: var(--bs-secondary-color); }
.quick-card { padding: .95rem 1.1rem; }
.quick-card .kpi-icon { width: 2.7rem; height: 2.7rem; font-size: 1.25rem; }
.quick-title { font-weight: 700; font-size: .95rem; }
.quick-go { margin-left: auto; color: var(--bs-secondary-color); }
.quick-grid { margin: 1.25rem 0 0; }

.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem; align-items: stretch; }
.home-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.home-card { display: flex; flex-direction: column; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent);
  border-radius: 1rem; box-shadow: 0 1px 2px rgb(16 24 40 / .05); min-width: 0; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.25rem .75rem;
  border-bottom: 1px solid var(--bs-border-color-translucent); }
.home-card-title { font-size: 1.05rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .55rem; }
.home-card-title > .bi { color: var(--bs-primary); font-size: 1.15rem; }
.home-count { font-size: .72rem; font-weight: 700; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; background: #ef4444; color: #fff; }
.home-card-link { font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.home-card-body { padding: .9rem 1.25rem 1rem; flex: 1; }
.home-card-date { font-size: .85rem; color: var(--bs-secondary-color); margin: 0 0 .75rem; }
.home-card-cta { margin: 0 1.25rem 1.1rem; padding: .65rem; border-radius: .7rem; text-align: center; font-weight: 600; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: .4rem; color: #fff; background: #0f5a4a; }
.home-card-cta:hover { background: #0c4a3d; color: #fff; }
.home-empty { color: var(--bs-secondary-color); font-size: .9rem; display: flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; }

.day-line { list-style: none; margin: 0; padding: 0; display: grid; }
.day-item { display: grid; grid-template-columns: 3.4rem 1rem minmax(0, 1fr) auto; align-items: start; column-gap: .55rem; position: relative;
  padding-bottom: .9rem; }
.day-item:last-child { padding-bottom: 0; }
.day-time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .92rem; display: flex; flex-direction: column; line-height: 1.25; }
.day-time small { font-weight: 500; color: var(--bs-secondary-color); font-size: .85rem; }
.day-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--tone); margin: .3rem auto 0; position: relative; z-index: 1;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.day-item:not(:last-child)::before { content: ""; position: absolute; left: calc(3.4rem + .55rem + .5rem - 1px); top: 1.1rem; bottom: .1rem;
  width: 2px; background: color-mix(in srgb, var(--tone) 45%, transparent); }
.day-text { display: flex; flex-direction: column; min-width: 0; }
.day-title { font-weight: 600; color: var(--bs-body-color); text-decoration: none; overflow-wrap: anywhere; }
a.day-title:hover { text-decoration: underline; }
.day-sub { font-size: .82rem; color: var(--bs-secondary-color); font-weight: 400; }
.day-print { padding: .15rem .45rem; }

.task-checks { list-style: none; margin: 0; padding: 0; display: grid; }
.task-check { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.task-check:last-child { border-bottom: 0; }
.task-check form { display: contents; }
.task-check-box { width: 1.3rem; height: 1.3rem; flex-shrink: 0; border-radius: .35rem; border: 2px solid var(--bs-border-color);
  background: var(--bs-body-bg); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: transparent; }
.task-check-box:hover, .task-check-box:focus-visible { border-color: #10b981; color: #10b981; }
.task-check-title { flex: 1; min-width: 0; color: var(--bs-body-color); text-decoration: none; display: flex; flex-direction: column; }
.task-check-title:hover { text-decoration: underline; }
.task-check-color { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--tc); margin-right: .4rem;
  vertical-align: middle; }
.task-check .due-chip { flex-shrink: 0; font-size: .75rem; font-weight: 600; background: var(--bs-tertiary-bg); }

.req-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.req-list > li { min-width: 0; }
.req-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .5rem; margin: 0 -.5rem; border-radius: .7rem;
  text-decoration: none; color: var(--bs-body-color); }
a.req-item:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.req-avatar { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff; background: var(--tone); }
.req-avatar .bi { font-size: 1.1rem; }
.req-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-sub { font-size: .8rem; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-pill { flex-shrink: 0; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #fef0c7; color: #93370d; }
.req-actions { display: flex; gap: .3rem; flex-shrink: 0; }
.req-actions .btn { padding: .2rem .5rem; }

[data-bs-theme="dark"] .home-card { box-shadow: none; }
[data-bs-theme="dark"] .kpi-delta { background: rgb(16 185 129 / .18); color: #6ee7b7; }
[data-bs-theme="dark"] .kpi-delta.is-down { background: rgb(239 68 68 / .18); color: #fda29b; }
[data-bs-theme="dark"] .req-pill { background: rgb(245 158 11 / .18); color: #fcd34d; }
[data-bs-theme="dark"] .home-card-cta { background: #10b981; color: #052e22; }
[data-bs-theme="dark"] .home-card-cta:hover { background: #34d399; color: #052e22; }

/* ---------------------------------------------------------------- módulos do cliente (cadastro e ficha) */
.module-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.module-pick { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--bs-border-color);
  border-radius: .7rem; cursor: pointer; background: var(--bs-body-bg); }
.module-pick:has(input:checked) { border-color: var(--bs-primary); box-shadow: 0 0 0 1px var(--bs-primary); }
.module-pick .form-check-input { margin: .2rem 0 0; flex-shrink: 0; }
.module-pick-icon { color: var(--bs-secondary-color); font-size: 1.1rem; line-height: 1.2; }
.module-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; margin: 0; }

/* ---------------------------------------------------------------- Minha paróquia */
.profile-image-preview { display: flex; gap: .85rem; align-items: flex-start; }
.profile-image-preview .org-avatar { width: 56px; height: 56px; margin-top: 1.9rem; }
