@media (max-width: 768px) {
  .tpe-sidebar__collapse-button {
    display: none !important;
  }
}

/* ==========================================================
   TPE — Calendário em colunas (escopado)
   Versão: 3.0.0  |  Layout semanal responsivo
   Escopo: #ep-calendario-container (...)
   ========================================================== */

body {
  margin: 0;
}

:root {
  --tpe-calendar-max-width: 100%;
}

/* ---------- LAYOUT PRINCIPAL E TOPO ---------- */
.tpe-layout {
  display: flex;
  min-height: 100vh;
  background: #f3f4f6;
}

.tpe-sidebar {
  width: 220px;
  background: #1f2937;
  color: #fff;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 2px 0 12px rgba(15, 23, 42, .18);
  transition: width .3s ease, padding .3s ease;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.tpe-sidebar__title {
  margin: 0;
  padding: 0 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d1d5db;
}


.tpe-sidebar__nav {
  padding: 0 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.tpe-sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.tpe-sidebar__item {
  margin: 0;
}

.tpe-sidebar__link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1.2rem;
  border-radius: .85rem;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.tpe-sidebar__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  transition: background-color .2s ease, box-shadow .2s ease;
}

.tpe-sidebar__icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.tpe-sidebar__icon--fontawesome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  color: currentColor;
}

/* Ícones BRANCOS (correção da codificação do #fff) */
.tpe-sidebar__icon--agenda {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='17' rx='2' fill='%23fff'/%3E%3Crect x='3' y='8' width='18' height='3' fill='%23fff'/%3E%3Crect x='8' y='2' width='2.5' height='4' rx='1' fill='%23fff'/%3E%3Crect x='13.5' y='2' width='2.5' height='4' rx='1' fill='%23fff'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--pesquisa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M10 2a8 8 0 0 1 6.32 12.9l4.39 4.39-1.42 1.42-4.39-4.39A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12z'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--experiencias {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M4 3h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 5v-5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--custom {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='10' y='4' width='4' height='16' rx='1' fill='%23fff'/%3E%3Crect x='4' y='10' width='16' height='4' rx='1' fill='%23fff'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--pontos {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2a7 7 0 0 0-7 7c0 4.88 5.44 11.18 6.78 12.74a1.5 1.5 0 0 0 2.44 0C18.56 20.18 24 13.88 24 9a7 7 0 0 0-7-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--publicadores {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='9' r='3.5' fill='%23fff'/%3E%3Ccircle cx='17' cy='9' r='3' fill='%23fff' opacity='.85'/%3E%3Cpath fill='%23fff' d='M3 20c0-3.04 2.46-5.5 5.5-5.5S14 16.96 14 20v3H3z'/%3E%3Cpath fill='%23fff' opacity='.85' d='M14 19.5c0-2.61 2.02-4.5 4.5-4.5S23 16.89 23 19.5V23h-9z'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--congregacoes {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M4 10.5 12 4l8 6.5V22a2 2 0 0 1-2 2h-4v-6h-4v6H6a2 2 0 0 1-2-2z'/%3E%3Cpath fill='%23fff' d='M10 2h4v4h-4z'/%3E%3C/svg%3E");
}

.tpe-sidebar__icon--peticoes {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6 2h9l5 5v15a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8 0v5h5'/%3E%3Cpath fill='%23fff' d='M8 11h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E");
}

.tpe-menu-manager__icon-cell {
  width: 5rem;
  text-align: center;
}

.tpe-menu-manager__icon-wrap {
  background: #1d2327;
  border-radius: 8px;
}

.tpe-menu-manager__icon-preview {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tpe-menu-manager__icon-preview-label {
  font-size: 12px;
  color: #50575e;
}

body.wp-admin .tpe-menu-manager__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.wp-admin .tpe-menu-manager__icon-preview .tpe-sidebar__icon--fontawesome,
body.wp-admin .tpe-menu-manager__icon-cell .tpe-sidebar__icon--fontawesome {
  color: #000;
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--agenda {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='17' rx='2' fill='%23000'/%3E%3Crect x='3' y='8' width='18' height='3' fill='%23000'/%3E%3Crect x='8' y='2' width='2.5' height='4' rx='1' fill='%23000'/%3E%3Crect x='13.5' y='2' width='2.5' height='4' rx='1' fill='%23000'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--pesquisa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 2a8 8 0 0 1 6.32 12.9l4.39 4.39-1.42 1.42-4.39-4.39A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12z'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--experiencias {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 3h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 5v-5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--custom {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='10' y='4' width='4' height='16' rx='1' fill='%23000'/%3E%3Crect x='4' y='10' width='16' height='4' rx='1' fill='%23000'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--pontos {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2a7 7 0 0 0-7 7c0 4.88 5.44 11.18 6.78 12.74a1.5 1.5 0 0 0 2.44 0C18.56 20.18 24 13.88 24 9a7 7 0 0 0-7-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--publicadores {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='9' r='3.5' fill='%23000'/%3E%3Ccircle cx='17' cy='9' r='3' fill='%23000' opacity='.85'/%3E%3Cpath fill='%23000' d='M3 20c0-3.04 2.46-5.5 5.5-5.5S14 16.96 14 20v3H3z'/%3E%3Cpath fill='%23000' opacity='.85' d='M14 19.5c0-2.61 2.02-4.5 4.5-4.5S23 16.89 23 19.5V23h-9z'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--congregacoes {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 10.5 12 4l8 6.5V22a2 2 0 0 1-2 2h-4v-6h-4v6H6a2 2 0 0 1-2-2z'/%3E%3Cpath fill='%23000' d='M10 2h4v4h-4z'/%3E%3C/svg%3E");
}

body.wp-admin .tpe-menu-manager__icon-wrap .tpe-sidebar__icon--peticoes {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 2h9l5 5v15a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8 0v5h5'/%3E%3Cpath fill='%23000' d='M8 11h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E");
}

.tpe-sidebar__link:hover,
.tpe-sidebar__link:focus-visible {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.tpe-sidebar__link.is-active {
  background: #0b1f3c;
  color: #fff;
  box-shadow: 0 12px 24px rgba(11, 31, 60, .28);
}

.tpe-sidebar__link.is-active .tpe-sidebar__icon-wrap,
.tpe-sidebar__link:hover .tpe-sidebar__icon-wrap,
.tpe-sidebar__link:focus-visible .tpe-sidebar__icon-wrap {
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
}

/* Seção de Perfil no Rodapé */
.tpe-sidebar__footer {
  margin-top: auto;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.tpe-sidebar__profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.tpe-sidebar__profile-avatar {
  flex-shrink: 0;
}

.tpe-sidebar__avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .2);
}

.tpe-sidebar__profile-info {
  flex: 1;
  min-width: 0;
}

.tpe-sidebar__profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}

.tpe-sidebar__profile-role {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpe-sidebar__profile-logout,
.tpe-sidebar__profile-login {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, .08);
  color: #e2e8f0;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.tpe-sidebar__profile-logout:hover,
.tpe-sidebar__profile-login:hover {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.tpe-sidebar__logout-icon,
.tpe-sidebar__login-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.tpe-sidebar__logout-icon svg,
.tpe-sidebar__login-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.tpe-sidebar__logout-text,
.tpe-sidebar__login-text {
  display: none;
}

/* Tooltips para estado colapsado */
.tpe-sidebar__link {
  position: relative;
}

.sidebar-collapsed .tpe-sidebar__link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.sidebar-collapsed .tpe-sidebar__link::before {
  content: '';
  position: absolute;
  left: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #111827;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1001;
}

.sidebar-collapsed .tpe-sidebar__link:hover::after,
.sidebar-collapsed .tpe-sidebar__link:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar-collapsed .tpe-sidebar__link:hover::before,
.sidebar-collapsed .tpe-sidebar__link:focus-visible::before {
  opacity: 1;
}

.tpe-sidebar__toggle,
.tpe-layout__overlay,
.tpe-sidebar__toggle-button {
  display: none;
}

.tpe-sidebar__collapse-button {
  display: block;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: .3rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  flex-shrink: 0;
  margin: .25rem 0 .25rem 1.5rem;
}

.tpe-sidebar__collapse-button:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tpe-sidebar__collapse-button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.tpe-sidebar__collapse-icon {
  position: relative;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 10px;
  transition: transform .3s ease, background-color .3s ease;
}

.tpe-sidebar__collapse-icon::before,
.tpe-sidebar__collapse-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 10px;
  transition: transform .3s ease;
}

.tpe-sidebar__collapse-icon::before {
  transform: translateY(-6px);
}

.tpe-sidebar__collapse-icon::after {
  transform: translateY(6px);
}

.sidebar-collapsed .tpe-sidebar__collapse-icon {
  background: transparent;
}

/* ---------- Admin: Petições ---------- */
.tpe-peticoes-page .tpe-peticoes-publicadores-filtro {
  margin: 1rem 0;
}

.tpe-peticoes-page .tpe-peticoes-publicadores-filtro .search-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

.tpe-peticoes-page .tpe-peticoes-clear-filter {
  padding-left: 0;
}

.tpe-peticoes-page .tpe-peticoes-usuario-acoes {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1 1 auto;
}

.tpe-peticoes-page .tpe-peticoes-col-acoes-header,
.tpe-peticoes-page .tpe-peticoes-col-acoes {
  width: 24rem;
  min-width: 20rem;
  max-width: 100%;
}

.tpe-peticoes-page .tpe-peticoes-col-acoes {
  vertical-align: top;
}

.tpe-peticoes-page .tpe-peticoes-col-acoes__content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .75rem;
  height: 100%;
}

.tpe-peticoes-page .tpe-peticoes-col-acoes .tpe-peticoes-usuario-acoes {
  width: 100%;
  height: 100%;
}

.tpe-peticoes-page .tpe-peticoes-acao {
  width: 100%;
  min-width: 0;
}

.tpe-peticoes-page .tpe-peticoes-form select,
.tpe-peticoes-page .tpe-peticoes-form input[type="text"],
.tpe-peticoes-page .tpe-peticoes-form input[type="email"],
.tpe-peticoes-page .tpe-peticoes-form input[type="tel"] {
  width: 100%;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.tpe-peticoes-page .tpe-peticoes-form p {
  margin: .25rem 0;
}

.tpe-peticoes-page .tpe-peticoes-form .tpe-peticoes-select--pontos {
  min-height: 16rem;
  min-width: 16rem;
  width: 100%;
  max-width: 100%;
  resize: both;
  overflow: auto;
}

.tpe-peticoes-page .tpe-peticoes-usuario-acoes details summary {
  cursor: pointer;
}

.sidebar-collapsed .tpe-sidebar__collapse-icon::before {
  transform: translateY(0) rotate(45deg);
}

.sidebar-collapsed .tpe-sidebar__collapse-icon::after {
  transform: translateY(0) rotate(-45deg);
}

.sidebar-collapsed .tpe-sidebar__collapse-button {
  background: #0a6bff;
  border-color: #0a6bff;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 107, 255, .3);
}

.tpe-sidebar__link:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.tpe-main {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #dddddd;
  padding-bottom: 2.5rem;
}

/* Reduzir padding-bottom quando contém dashboard de suporte */
.tpe-main:has(.tpe-support-dashboard) {
  padding-bottom: 1rem;
}

/* Fallback para navegadores antigos */
.tpe-main .tpe-support-dashboard {
  margin-bottom: 0;
}

.tpe-dashboard-page {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  margin: 32px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tpe-dashboard-page__title {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
  color: #101828;
  margin: 0 0 24px;
}

@media (max-width: 782px) {
  .tpe-dashboard-page {
    margin: 16px;
    padding: 24px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-dashboard-page__title {
    font-size: 1.25rem;
  }

  .tpe-support-contacts,
  .tpe-support-petitions,
  .tpe-support-users {
    margin: 16px;
    padding: 24px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
  }
}

.tpe-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.75rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  color: #0f172a;
}

.tpe-topbar__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 320px;
  color: inherit;
}

.tpe-topbar__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.tpe-topbar__actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 1.25rem;
  flex: 1 1 360px;
  margin-left: auto;
  flex-wrap: wrap;
  min-width: 0;
  text-align: right;
  color: inherit;
}

.tpe-topbar__user {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e5ea;
  background-color: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  line-height: 1;
}

.tpe-topbar__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .48rem 1.2rem;
  border-radius: 10px;
  border: 1px solid #0a6bff;
  background-color: #0a6bff;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(10, 107, 255, .2);
}

.tpe-topbar__button:hover,
.tpe-topbar__button:focus-visible {
  background-color: #084ec4;
  border-color: #084ec4;
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 78, 196, .3);
}

.tpe-topbar__button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .75);
  outline-offset: 2px;
}

/* Fix for Congregations Button */
.tpe-congregacoes-content .btn-primary,
#abrirModal {
  white-space: nowrap;
  width: auto;
  max-width: none;
  display: inline-block;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
}


@media (min-width: 769px) {
  .sidebar-collapsed .tpe-sidebar {
    width: 72px;
    padding: 1.25rem .75rem;
    align-items: center;
    gap: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar-collapsed .tpe-sidebar__item {
    position: relative;
    overflow: visible;
  }

  .sidebar-collapsed .tpe-sidebar__link {
    position: relative;
  }

  .sidebar-collapsed .tpe-sidebar__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sidebar-collapsed .tpe-sidebar__nav {
    padding: 0;
    overflow: visible;
  }

  .sidebar-collapsed .tpe-sidebar__menu {
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .sidebar-collapsed .tpe-sidebar__item {
    width: 100%;
  }

  .sidebar-collapsed .tpe-sidebar__link {
    justify-content: center;
    padding: 0.5rem;
    width: 100%;
    text-align: center;
    gap: 0;
  }

  .sidebar-collapsed .tpe-sidebar__icon-wrap {
    width: 2rem;
    height: 2rem;
  }

  .sidebar-collapsed .tpe-sidebar__icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .sidebar-collapsed .tpe-sidebar__link-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Seção de perfil colapsada */
  .sidebar-collapsed .tpe-sidebar__footer {
    padding: 1rem 0.75rem 0;
  }

  .sidebar-collapsed .tpe-sidebar__profile {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.5rem 0;
  }

  .sidebar-collapsed .tpe-sidebar__profile-avatar {
    display: none;
  }

  .sidebar-collapsed .tpe-sidebar__profile-info {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sidebar-collapsed .tpe-sidebar__profile-logout,
  .sidebar-collapsed .tpe-sidebar__profile-login {
    width: 100%;
    height: 2.5rem;
    margin-top: 0.5rem;
  }

  .sidebar-collapsed .tpe-sidebar__logout-text,
  .sidebar-collapsed .tpe-sidebar__login-text {
    display: none;
  }

  /* Tooltip para perfil no estado colapsado */
  .sidebar-collapsed .tpe-sidebar__profile-logout::after {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    background: #111827;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  }

  .sidebar-collapsed .tpe-sidebar__profile-logout::before {
    content: '';
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #111827;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1001;
  }

  .sidebar-collapsed .tpe-sidebar__profile-logout:hover::after,
  .sidebar-collapsed .tpe-sidebar__profile-logout:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  .sidebar-collapsed .tpe-sidebar__profile-logout:hover::before,
  .sidebar-collapsed .tpe-sidebar__profile-logout:focus-visible::before {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .tpe-layout {
    flex-direction: column;
  }

  .tpe-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  }

  .tpe-sidebar__title {
    padding: 0;
    margin: 0;
  }

  .tpe-sidebar__nav {
    padding: 0;
  }

  .tpe-sidebar__menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .tpe-sidebar__link {
    border-radius: 10px;
  }

  .tpe-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .tpe-layout {
    position: relative;
  }

  .tpe-sidebar__collapse-button {
    display: none;
  }

  .tpe-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(80vw, 280px);
    padding: 2.5rem 1.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.75rem;
    transform: translateX(-110%);
    transition: transform .3s ease, visibility .3s ease;
    visibility: hidden;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .22);
    z-index: 1000;
    overflow-y: auto;
  }

  .tpe-sidebar__title {
    padding: 0;
  }

  .tpe-sidebar__nav {
    width: 100%;
    padding: 0;
  }

  .tpe-sidebar__menu {
    width: 100%;
    flex-direction: column;
    gap: .35rem;
  }

  .tpe-sidebar__link {
    width: 100%;
    border-radius: .75rem;
  }

  #tpe-sidebar-toggle:checked~.tpe-sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .tpe-sidebar__toggle {
    display: block;
    position: absolute;
    inset: 1rem auto auto 1rem;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .tpe-sidebar__toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .5rem 1rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  }

  .tpe-sidebar__toggle-button:hover {
    background: #f9fafb;
    color: #0f172a;
  }

  .tpe-sidebar__toggle-button:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-sidebar__toggle-button {
    background: #0a6bff;
    border-color: #0a6bff;
    color: #fff;
    box-shadow: 0 8px 20px rgba(10, 107, 255, .3);
  }

  .tpe-sidebar__toggle-icon {
    position: relative;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 10px;
    transition: transform .3s ease, background-color .3s ease;
  }

  .tpe-sidebar__toggle-icon::before,
  .tpe-sidebar__toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 10px;
    transition: transform .3s ease;
  }

  .tpe-sidebar__toggle-icon::before {
    transform: translateY(-6px);
  }

  .tpe-sidebar__toggle-icon::after {
    transform: translateY(6px);
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-sidebar__toggle-icon {
    background: transparent;
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-sidebar__toggle-icon::before {
    transform: translateY(0) rotate(45deg);
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-sidebar__toggle-icon::after {
    transform: translateY(0) rotate(-45deg);
  }

  .tpe-sidebar__toggle-text {
    font-size: .95rem;
  }

  .tpe-topbar__brand {
    width: 100%;
    gap: .85rem;
    align-items: flex-start;
  }

  .tpe-topbar__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    gap: .85rem;
  }

  .tpe-layout__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 900;
  }

  #tpe-sidebar-toggle:checked~.tpe-layout__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .tpe-main {
    margin-left: 0;
    width: 100%;
    position: relative;
    z-index: 500;
  }
}

@media (max-width: 640px) {
  .tpe-sidebar__toggle-button {
    width: 100%;
    justify-content: space-between;
  }

  /* O layout de grid definido em @media (max-width: 768px) tem precedência */
  /* Esta regra só se aplica se o grid não estiver ativo */
}

.tpe-back-to-top,
#back-to-top,
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 1400;
}
}



/* ---------- CALENDÁRIO SEMANAL / CONTROLES ---------- */
.tpe-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 1.75rem auto 1rem;
  padding: 0 1.75rem;
}

.tpe-calendar__heading {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 0;
  flex: 1 1 260px;
}

.tpe-calendar {
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 0 auto 2rem;
  padding: 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tpe-calendar__toolbar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  /* opcional, deixa o título colado */
}


.tpe-calendar__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.18;
}

.tpe-calendar__title-point {
  display: block;
  margin-top: .25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  word-break: break-word;
}

.tpe-calendar__week-nav {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .4rem .3rem;
  border-radius: 10px;
  background: #edf2ff;
}

.tpe-calendar__week-label {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  letter-spacing: .01em;
}

.tpe-calendar__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #fff;
  color: #0a6bff;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
}

.tpe-calendar__nav:hover,
.tpe-calendar__nav:focus-visible {
  background: #0a6bff;
  border-color: #0a6bff;
  color: #fff;
  box-shadow: 0 6px 18px rgba(10, 107, 255, .24);
}

.tpe-calendar__nav:focus-visible {
  outline: 3px solid rgba(14, 116, 244, .35);
  outline-offset: 2px;
}

.tpe-calendar__select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  min-width: min(320px, 100%);
  flex: 0 1 320px;
}

.tpe-calendar__select-label {
  font-size: .85rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.tpe-calendar__dropdown {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: .6rem 2.7rem .6rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%230a6bff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1%201.5%206%206.5%2011%201.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
  cursor: pointer;
}

.tpe-calendar__dropdown:focus-visible {
  outline: 2px solid #0a6bff;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(10, 107, 255, .18);
}

.tpe-calendar__dropdown option {
  font-weight: 500;
}

@media (max-width: 960px) {

  .tpe-calendar__header,
  .tpe-calendar {
    padding: 0 1.25rem;
  }

  .tpe-calendar__header {
    margin: 1.5rem auto .85rem;
  }

  .tpe-calendar__toolbar {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .tpe-calendar__header {
    padding: 0 1.1rem;
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-calendar__heading {
    width: 100%;
  }

  .tpe-calendar__select {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .tpe-calendar {
    padding: 0 1.1rem;
  }

  .tpe-calendar__toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.1rem;
  }

  .tpe-calendar__week-nav {
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 520px) {

  .tpe-calendar__header,
  .tpe-calendar {
    padding: 0 1rem;
  }

  .tpe-calendar__title {
    font-size: 1.32rem;
  }

  .tpe-calendar__week-nav {
    gap: .5rem;
  }

  .tpe-calendar__nav {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }

  .tpe-calendar__week-label {
    font-size: .95rem;
  }
}

/* ---------- BASE / CONTÊINER ---------- */
#ep-calendario-container {
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 0 auto;
}

/* ---------- ESTADOS / MENSAGENS ---------- */
.tpe-grid--loading {
  opacity: .55;
  pointer-events: none;
  transition: opacity .2s ease;
}

.tpe-calendar__feedback {
  padding: 2.4rem 1.2rem;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
}

.tpe-calendar__feedback--loading {
  border-style: solid;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #0f172a;
}

.tpe-calendar__feedback--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.tpe-calendar__feedback--empty {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

/* (Legado) Caso ainda exista um modo tabela em alguma página */
#ep-calendario-container table {
  width: 100%;
  border-collapse: collapse;
}

#ep-calendario-container th,
#ep-calendario-container td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}

/* ---------- GRID (7 colunas, responsivo) ---------- */
.tpe-grid {
  display: grid;
  /* reduz o mínimo por coluna e o espaçamento */
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 0.6rem;
  align-items: start;
}

@media (max-width: 1280px) {
  .tpe-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
  }
}

@media (max-width: 1120px) {
  .tpe-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }
}

@media (max-width: 900px) {
  .tpe-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 600px) {
  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid {
    display: grid;
    grid-template-columns: unset;
    grid-auto-flow: column;
    grid-auto-columns: minmax(14rem, 1fr);
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 0.75rem 0.75rem;
    margin: 0;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid__column {
    min-width: 14rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid__column.is-today {
    scroll-margin-left: 0.75rem;
  }
}

/* ---------- COLUNA/DIA ---------- */
.tpe-grid__column,
#ep-calendario-container .tpe-col {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-grid__column.is-today,
#ep-calendario-container .tpe-col.is-today {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, .2), 0 18px 36px rgba(15, 23, 42, .12);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.tpe-grid__column.is-today .tpe-grid__column-header,
#ep-calendario-container .tpe-col.is-today .ep-dia-header {
  background: rgba(29, 78, 216, .12);
  color: #0f172a;
}

.tpe-grid__column-header,
#ep-calendario-container .ep-dia-header {
  background: #f8fafc;
  padding: .95rem 1.1rem;
  font-weight: 300;
  border-bottom: 1px solid #e2e8f0;
  font-size: .98rem;
  color: #0f172a;
}

.tpe-grid__column-body,
#ep-calendario-container .ep-faixas {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  gap: .4rem;
  padding: 1rem 1.15rem 1.35rem;
  background: #fff;
}

#ep-calendario-container .ep-sem-horarios {
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: .92rem;
  color: #475569;
  background: #f8fafc;
}

/* ---------- CARTÕES (intervalo de hora + status) ---------- */
.tpe-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  padding: .75rem .9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  line-height: 1.2;
  background: #fff;
  color: #0f172a;
  min-height: 48px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.tpe-slot--has-actions {
  position: relative;
  padding-right: .9rem;
  transition: padding-right .2s ease;
}

.tpe-slot--has-actions:hover,
.tpe-slot--has-actions:focus-within {
  padding-right: 2.8rem;
}

.tpe-slot__actions {
  position: absolute;
  top: .45rem;
  right: .45rem;
  display: flex;
  gap: .35rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.tpe-slot--has-actions:hover .tpe-slot__actions,
.tpe-slot--has-actions:focus-within .tpe-slot__actions {
  opacity: 1;
  pointer-events: auto;
}

.tpe-slot__action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  padding: 0;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  background: rgba(15, 23, 42, .08);
  color: #0f172a;
  transition: background-color .2s ease, color .2s ease;
}

.tpe-slot__action::before {
  content: "";
  width: 1rem;
  height: 1rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem 1rem;
}

.tpe-slot__action:focus-visible {
  outline: 2px solid rgba(14, 116, 244, .45);
  outline-offset: 1px;
}

.tpe-slot__action .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.tpe-slot__action--edit {
  background: rgba(37, 99, 235, .18);
  color: #1d4ed8;
}

.tpe-slot__action--edit::before {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjMWQ0ZWQ4JyBzdHJva2Utd2lkdGg9JzInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcgc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCc+PHBhdGggZD0nTTEyIDIwaDknLz48cGF0aCBkPSdNMTYuNSAzLjVhMi4xMjEgMi4xMjEgMCAwIDEgMyAzTDcgMTlsLTQgMSAxLTRMMTYuNSAzLjV6Jy8+PC9zdmc+");
}

.tpe-slot__action--edit:hover,
.tpe-slot__action--edit:focus-visible {
  background: rgba(37, 99, 235, .28);
}

.tpe-slot__action--delete {
  background: rgba(239, 68, 68, .18);
  color: #b91c1c;
}

.tpe-slot__action--delete::before {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nbm9uZScgc3Ryb2tlPScjYjkxYzFjJyBzdHJva2Utd2lkdGg9JzInIHN0cm9rZS1saW5lY2FwPSdyb3VuZCcgc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCc+PHBhdGggZD0nTTMgNmgxOCcvPjxwYXRoIGQ9J004IDZWNGg4djInLz48cGF0aCBkPSdNMTAgMTF2NicvPjxwYXRoIGQ9J00xNCAxMXY2Jy8+PHBhdGggZD0nTTUgNmwxIDE0aDEybDEtMTQnLz48L3N2Zz4=");
}

.tpe-slot__action--delete:hover,
.tpe-slot__action--delete:focus-visible {
  background: rgba(239, 68, 68, .28);
}

.tpe-slot.is-loading {
  opacity: .6;
  pointer-events: none;
}

.tpe-slot--free-action,
.tpe-slot--info-action {
  cursor: pointer;
}


.tpe-slot:hover {
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.tpe-slot:focus-visible {
  outline: 3px solid rgba(14, 116, 244, .25);
  outline-offset: 2px;
}

.tpe-slot .ep-hora {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
  font-size: .95rem;
}

.tpe-slot .ep-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: .2rem .6rem;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  background: rgba(15, 23, 42, .08);
  color: inherit;
}

@media (min-width: 1024px) {
  #ep-calendario-container .tpe-slot .ep-hora {
    font-size: .88rem;
  }

  #ep-calendario-container .tpe-slot .ep-status {
    font-size: .72rem;
  }
}

.tpe-slot--free {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, .35);
  color: #047857;
}

.tpe-slot--free .ep-hora {
  color: #065f46;
}

.tpe-slot--free .ep-status {
  background: rgba(16, 185, 129, .18);
  color: #047857;
}

.tpe-slot--reserved {
  background: #e0f2fe;
  border-color: rgba(37, 99, 235, .25);
  color: #1d4ed8;
}

.tpe-slot--reserved .ep-hora {
  color: #1e3a8a;
}

.tpe-slot--reserved .ep-status {
  background: rgba(37, 99, 235, .18);
  color: #1d4ed8;
}

.tpe-slot--pending {
  background: #ffe4e6;
  border-color: rgba(244, 63, 94, .3);
  color: #be123c;
}

.tpe-slot--pending .ep-hora {
  color: #9f1239;
}

.tpe-slot--pending .ep-status {
  background: rgba(244, 63, 94, .22);
  color: #be123c;
}

.tpe-slot--busy {
  background: #fef3c7;
  border-color: rgba(217, 119, 6, .28);
  color: #b45309;
}

.tpe-slot--busy .ep-hora {
  color: #92400e;
}

.tpe-slot--busy .ep-status {
  background: rgba(217, 119, 6, .2);
  color: #b45309;
}

.tpe-slot--conflict {
  background: #fee2e2;
  border-color: rgba(239, 68, 68, .3);
  color: #b91c1c;
}

.tpe-slot--conflict .ep-hora {
  color: #991b1b;
}

.tpe-slot--conflict .ep-status {
  background: rgba(239, 68, 68, .22);
  color: #b91c1c;
}

.tpe-slot--one-off {
  background: repeating-linear-gradient(45deg,
      #d1fae5,
      #d1fae5 10px,
      #ecfdf5 10px,
      #ecfdf5 20px);
  border-left-color: #059669;
}

.tpe-slot--one-off .ep-hora {
  color: #065f46;
}

.tpe-slot--one-off .ep-status {
  color: #047857;
  font-weight: 700;
}

@media (min-width: 1600px) {
  #ep-calendario-container .tpe-slot .ep-hora {
    font-size: .92rem;
  }

  #ep-calendario-container .tpe-slot .ep-status {
    font-size: .78rem;
  }
}

/* ---------- (Opcional) Estados por classe semântica ---------- */
#ep-calendario-container .ep-status.confirmada {
  color: inherit;
}

#ep-calendario-container .ep-status.pendente {
  color: inherit;
}

#ep-calendario-container .ep-status.cancelada {
  color: inherit;
}

/* ---------- TABELA (modo alternativo) ---------- */
.tpe-calendar-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

.tpe-calendar-table thead th {
  background: #f8fafc;
  padding: .75rem .9rem;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

.tpe-calendar-table__hour {
  width: 150px;
  font-weight: 700;
  text-align: left;
  color: #0f172a;
}

.tpe-calendar-table tbody th {
  background: #f9fafb;
}

.tpe-calendar-table td {
  padding: .75rem .9rem;
  border-bottom: 1px solid #f1f5f9;
  border-left: 1px solid #f1f5f9;
  vertical-align: top;
  min-width: 130px;
}

.tpe-calendar-table tr:last-child td,
.tpe-calendar-table tr:last-child th {
  border-bottom: none;
}

.tpe-table-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .65rem;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  margin: .15rem;
  background: #0a6bff;
  word-break: break-word;
  white-space: normal;
}

.tpe-table-status--livre {
  background: #2bae4b;
}

.tpe-table-status--reserva {
  background: #0a6bff;
}

.tpe-table-status--pendente {
  background: #ef4444;
}

.tpe-table-status--ocupado {
  background: #ff9800;
}

.tpe-table-status--conflito {
  background: #e03a3a;
}

@media (max-width: 768px) {
  .tpe-calendar-table {
    display: block;
    overflow-x: auto;
  }
}

.tpe-versao,
.tpe-deploy {
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: .35rem auto;
  padding: 0 1.75rem;
  text-align: right;
  font-size: .75rem;
  color: #94a3b8;
}

@media (max-width: 768px) {

  .tpe-versao,
  .tpe-deploy {
    padding: 0 1.1rem;
  }
}

@media (max-width: 600px) {

  .tpe-versao,
  .tpe-deploy {
    text-align: center;
  }
}

:root {
  /* Integração com barras sticky externas (ex.: countdown). */
  --global-sticky-offset: 0px;
}

.tpe-calendar {
  scroll-margin-top: var(--global-sticky-offset, 0px);
}

body.tpe-calendar-active #wpadminbar {
  display: none !important;
}


/* ===== TPE — Full-bleed da área do app (remove faixa branca da esquerda) ===== */

/* 1) Faça o app ignorar o padding do tema e ocupar a largura do viewport */
.entry-content>.tpe-layout,
.entry-content .tpe-layout {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  max-width: none !important;
  /* impede que o tema limite a largura do app */
  background: #dddddd;
  /* mantém o fundo cinza até a borda */
}

/* 2) Em telas pequenas, manter comportamento padrão (já fica full width) */
@media (max-width: 768px) {

  .entry-content>.tpe-layout,
  .entry-content .tpe-layout {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* 3) Fallback opcional — se o tema ainda impuser padding na entry-content,
      zere apenas nesta página (troque 241 pelo ID da sua página, se quiser). */
.page-id-241 .entry-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* ===== Ajuste 1: Ícones brancos e alinhados à esquerda ===== */

/* reduz o acolchoamento do link e encosta o bloco do ícone */
.tpe-sidebar__nav {
  padding-left: 1rem;
}

/* o “disco” do ícone continua, mas o ícone fica colado à esquerda */
.tpe-sidebar__icon-wrap {
  justify-content: flex-start;
  /* antes: center */
  padding-left: .35rem;
  /* encosta o ícone no lado esquerdo */
  background: rgba(255, 255, 255, .08);
  /* mantém halo discreto */
}

/* garante que os ícones fiquem nítidos e brancos */
.tpe-sidebar__icon {
  background-position: left center;
  /* antes: center */
  opacity: 1;
}

.tpe-sidebar__icon--fontawesome {
  background: none;
}

/* estado ativo/hover mantém tudo consistente */
.tpe-sidebar__link.is-active .tpe-sidebar__icon-wrap,
.tpe-sidebar__link:hover .tpe-sidebar__icon-wrap,
.tpe-sidebar__link:focus-visible .tpe-sidebar__icon-wrap {
  background: rgba(255, 255, 255, .16);
}


/* Header da sidebar: título + botão lado a lado */
.tpe-sidebar__header-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.5rem .25rem 1.5rem;
}

/* Botão minimalista, sem caixa azul */
.tpe-sidebar__collapse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .15rem .35rem;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: #e5e7eb;
  /* cor do ícone */
  cursor: pointer;
  box-shadow: none;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}

.tpe-sidebar__collapse-button:hover,
.tpe-sidebar__collapse-button:focus-visible {
  background: rgba(255, 255, 255, .10);
  color: #fff;
  outline: 0;
}

.tpe-sidebar__collapse-button:active {
  transform: scale(.96);
}

/* tamanho do ícone “+ / –” */
.tpe-sidebar__collapse-button .tpe-ico {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  transform: translateY(-1px);
}

/* Quando a sidebar está colapsada:
   - Esconde o texto "MENU"
   - Mantém o botão visível (apenas o "+") */
.is-hidden-visually {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ajustes de layout no modo colapsado (desktop) */
@media (min-width:769px) {
  .sidebar-collapsed .tpe-sidebar__header-row {
    justify-content: flex-start;
    /* mantém o + na mesma região do MENU */
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

/* Esconde versões antigas do botão fora da sidebar, se alguma sobrar */
.tpe-topbar .tpe-sidebar__collapse-button,
.tpe-calendar__header .tpe-sidebar__collapse-button {
  display: none !important;
}

/* Espaçamento mínimo entre título e semana */
.tpe-calendar__header .tpe-week-in-header {
  margin-left: .5rem;
}

/* Empurra o "Ponto" para a direita */
.tpe-calendar__header .tpe-calendar__select {
  margin-left: auto;
}

/* Some com uma toolbar que tenha ficado sem conteúdo */
.tpe-calendar__toolbar:empty {
  display: none;
}

/* === Header: Escala | Seletor de semana | PONTO: [select] === */

/* Desktop: Seletor "Ponto" vira linha única: rótulo à esquerda + select à direita */
@media (min-width: 769px) {

  /* Mantém tudo na mesma linha e alinhado ao centro vertical */
  .tpe-calendar__header {
    align-items: center;
  }

  .tpe-calendar__header .tpe-calendar__select {
    margin-left: auto;
    /* continua do lado direito do header */
    display: flex;
    flex-direction: row;
    /* em vez de coluna */
    align-items: center;
    gap: .6rem;
    min-width: auto;
    /* evita largura mínima grande */
  }

  /* Rótulo "PONTO :" ao lado do campo */
  .tpe-calendar__header .tpe-calendar__select-label {
    margin: 0;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
  }

  .tpe-calendar__header .tpe-calendar__select-label::after {
    content: ":";
    /* adiciona ":" depois de PONTO */
    margin-left: .25rem;
  }

  /* Ajuste fino do input (opcional) */
  .tpe-calendar__header .tpe-calendar__dropdown {
    margin: 0;
  }
}

/* Responsivo: em telas menores volta a empilhar para não quebrar layout */
@media (max-width: 768px) {
  .tpe-calendar__header .tpe-calendar__select {
    margin-left: 0;
    flex: 1 1 100%;
  }

  .tpe-calendar__header .tpe-calendar__select-label::after {
    content: "";
    /* some com o ":" quando empilhar */
  }
}


/* --- Centralizar o seletor de semanas entre "Escala" e "Ponto" --- */

/* Desktop: layout em grid com 4 colunas */
@media (min-width: 769px) {

  /* 4 colunas: [titulo]*auto  [semana]*auto  [ponto]*1fr  [exportar]*auto  */
  /* Garante que margens e paddings da regra base sejam respeitados */
  .tpe-calendar__header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    column-gap: 1rem;
    margin: 1.75rem auto 1rem;
    padding: 0 1.75rem;
    max-width: var(--tpe-calendar-max-width);
  }

  /* título à esquerda */
  .tpe-calendar__heading {
    justify-self: start;
    margin: 0;
  }

  /* semana no centro-esquerda */
  .tpe-calendar__header .tpe-week-in-header,
  .tpe-calendar__header .tpe-calendar__week-nav {
    margin: 0;
    justify-self: start;
  }

  /* seletor (Ponto) à direita, mas antes do botão */
  .tpe-calendar__header .tpe-calendar__select {
    justify-self: end;
    margin-left: auto;
    margin-right: 0;
  }

  /* botão de exportar à direita */
  .tpe-calendar__header .tpe-export-escala-btn {
    justify-self: end;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Responsivo: empilha no mobile */
@media (max-width: 768px) {
  .tpe-calendar__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  .tpe-calendar__header .tpe-calendar__select {
    align-self: stretch;
    justify-self: stretch;
  }

  .tpe-calendar__header .tpe-week-in-header,
  .tpe-calendar__header .tpe-calendar__week-nav {
    margin: 0;
    justify-self: stretch;
  }

  .tpe-calendar__header .tpe-export-escala-btn {
    justify-self: stretch;
    width: 100%;
  }
}


/* ===== MOBILE (≤768px) — topo, menu, header da Escala ===== */
@media (max-width: 768px) {

  /* TOPO compacto em 3 colunas: [☰] [Título] [Sair] */
  .tpe-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    height: 56px;
    min-height: 56px;
    padding: 0 .75rem;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: .5rem;
  }

  /* Botão hambúrguer dentro do topo (sem “estranheza” nas 3 linhas) */
  .tpe-sidebar__toggle-button {
    position: static !important;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tpe-sidebar__toggle-text {
    display: none !important;
  }

  /* Ícone hambúrguer */
  .tpe-sidebar__toggle-button .tpe-hamburger {
    position: relative;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::before,
  .tpe-sidebar__toggle-button .tpe-hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::before {
    transform: translateY(-6px);
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::after {
    transform: translateY(6px);
  }

  /* Ao abrir a lateral, vira “X” */
  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger {
    background: transparent;
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger::before {
    transform: rotate(45deg);
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger::after {
    transform: rotate(-45deg);
  }

  /* Título visível e com reticências se for longo */
  .tpe-topbar__brand {
    min-width: 0;
    /* habilita ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mostra o botão Sair/Login no mobile (esconde só o “usuário”) */
  .tpe-topbar__actions {
    display: contents;
  }

  /* entra na grid */
  .tpe-topbar__user {
    display: none !important;
  }

  .tpe-topbar__button {
    padding: .4rem .8rem;
    border-radius: 999px;
    line-height: 1;
  }

  /* ===== Header da Escala =====
     Layout em grade: 1ª linha: [Escala] [Semana] ; 2ª linha: [Ponto] ; 3ª linha: [Exportar]  */
  .tpe-calendar__header {
    margin: 1.25rem 0 .75rem 0;
    padding: 0 1.1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "title week"
      "point point"
      "export export";
    align-items: center;
    column-gap: .6rem;
    row-gap: .75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-calendar__heading {
    grid-area: title;
    margin: 0;
  }

  .tpe-calendar__title {
    font-size: 1.25rem;
    margin: 0;
  }

  .tpe-week-in-header {
    grid-area: week;
    justify-self: end;
    /* fica na direita da 1ª linha */
    margin: 0;
    position: static;
    /* garante que não "caia" lá embaixo */
  }

  .tpe-calendar__week-nav {
    padding: .35rem .35rem;
  }

  .tpe-calendar__select {
    grid-area: point;
    /* 2ª linha, largura total */
    margin: 0;
    min-width: 0;
  }

  .tpe-export-escala-btn {
    grid-area: export;
    /* 3ª linha, largura total */
    margin: 0;
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }

  /* Grade: 1 coluna e respiros menores */
  .tpe-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem;
  }

  .tpe-grid__column-header {
    padding: .8rem .9rem;
  }

  .tpe-slot {
    padding: .65rem .8rem;
    border-radius: 12px;
  }

  /* Garante espaçamento adequado após o topbar sticky */
  .tpe-main {
    padding-top: 0;
  }
}

/* ===== Botão de Exportar Escala ===== */
.tpe-export-escala-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background-color: #0a6bff;
  color: #ffffff;
  border: 1px solid #0a6bff;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 0.5rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.tpe-export-escala-btn:hover,
.tpe-export-escala-btn:focus-visible {
  background-color: #0052cc;
  border-color: #0052cc;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(10, 107, 255, 0.3);
  outline: none;
}

.tpe-export-escala-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(10, 107, 255, 0.2);
}

.tpe-export-escala-btn__icon {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
}

.tpe-export-escala-btn__text {
  line-height: 1.2;
  font-size: 0.8rem;
}

/* Ajuste no header para incluir o botão de exportação - Desktop */
@media (min-width: 769px) {
  .tpe-calendar__header {
    position: relative;
  }

  /* Garante que todos os elementos fiquem na mesma linha (quando em flex) */
  .tpe-calendar__header .tpe-calendar__heading,
  .tpe-calendar__header .tpe-week-in-header,
  .tpe-calendar__header .tpe-calendar__week-nav,
  .tpe-calendar__header .tpe-calendar__select,
  .tpe-calendar__header .tpe-export-escala-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Mobile: ajusta o botão */
@media (max-width: 768px) {
  .tpe-export-escala-btn {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
  }

  .tpe-calendar__header {
    grid-template-areas:
      "title week"
      "point point"
      "export export";
  }

  .tpe-export-escala-btn {
    grid-area: export;
    justify-self: stretch;
  }
}

/* Se algum container do tema estiver gerando “sobras”, zera em mobile */
@media (max-width: 768px) {

  .entry-content>.tpe-layout,
  .entry-content .tpe-layout {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* ========== HEADER MOBILE – ajustes finais (≤768px) ========== */
@media (max-width: 768px) {

  /* Topo em 3 colunas: [☰] [Título] [Sair] */
  .tpe-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #fff;
    padding: max(env(safe-area-inset-top), 0) .75rem .25rem;
    height: calc(56px + max(env(safe-area-inset-top), 0));
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: .5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  }

  /* Hambúrguer redondo, sem “estranheza” */
  .tpe-sidebar__toggle-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 0px solid #e5e7eb;
    background: #fff;
    color: #111827;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tpe-sidebar__toggle-text {
    display: none !important;
  }

  .tpe-sidebar__toggle-button .tpe-hamburger {
    position: relative;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::before,
  .tpe-sidebar__toggle-button .tpe-hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::before {
    transform: translateY(-6px);
  }

  .tpe-sidebar__toggle-button .tpe-hamburger::after {
    transform: translateY(6px);
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger {
    background: transparent;
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger::before {
    transform: rotate(45deg);
  }

  #tpe-sidebar-toggle:checked~.tpe-main .tpe-hamburger::after {
    transform: rotate(-45deg);
  }

  /* Título central, pode quebrar em duas linhas */
  .tpe-topbar__brand {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    grid-column: 2;
    display: flex;
    align-items: center;
  }

  .tpe-topbar__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    padding-top: 8px;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
  }

  /* Container para sininho e botão na mesma linha */
  .tpe-topbar__actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
  }

  /* deixa o botão ir pra coluna 3 */
  .tpe-topbar__user {
    display: none !important;
  }

  /* Sininho de notificações */
  .tpe-notifications-icon-wrapper {
    flex-shrink: 0;
  }

  /* Botão Sair/Login pequeno */
  .tpe-topbar__button {
    width: auto !important;
    min-width: auto;
    padding: .4rem .8rem;
    border-radius: 999px;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(8, 78, 196, .18);
    flex-shrink: 0;
  }

  /* Escala + Semana na 1ª linha; Ponto na 2ª; Exportar na 3ª */
  .tpe-calendar__header {
    margin: 1.75rem auto 1.85rem;
    padding: 0 .75rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "title week" "point point" "export export";
    column-gap: .6rem;
    row-gap: .75rem;
    align-items: center;
  }

  .tpe-calendar__heading {
    grid-area: title;
    margin: 0;
  }

  .tpe-calendar__title {
    font-size: 1.2rem;
    margin: 0;
  }

  .tpe-week-in-header {
    grid-area: week;
    justify-self: end;
    margin: 0;
  }

  .tpe-calendar__week-nav {
    padding: .35rem .35rem;
  }

  .tpe-calendar__select {
    grid-area: point;
    margin: 0;
    min-width: 0;
  }

  .tpe-export-escala-btn {
    grid-area: export;
    margin: 0;
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }

  /* Conteúdo sem “sobras” do tema em mobile */
  .entry-content>.tpe-layout,
  .entry-content .tpe-layout {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Mata qualquer regra antiga que force largura cheia no botão em telas pequenas */
@media (max-width: 640px) {
  .tpe-topbar__button {
    width: auto !important;
    margin-right: 15px;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid {
    display: grid;
    grid-template-columns: unset;
    grid-auto-flow: column;
    grid-auto-columns: minmax(12rem, 1fr);
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 1rem 0.75rem;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid__column {
    min-width: 12rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .tpe-calendar[data-calendar-view="colunas"] .tpe-grid__column.is-today {
    scroll-margin-left: 1rem;
  }
}

/* ---------- Detalhes do ponto selecionado ---------- */
.tpe-point-details {
  width: calc(100% - 3.5rem);
  max-width: calc(var(--tpe-calendar-max-width) - 3.5rem);
  margin: 2rem auto 0;
  padding: 1.75rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .tpe-point-details {
    width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    margin: 1.5rem auto 0;
  }
}

.tpe-point-details__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.tpe-point-details__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.tpe-point-details__item {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.tpe-point-details__label {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}

.tpe-point-details__value {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
}

.tpe-point-details__contact {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.tpe-point-details__link {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, text-decoration .2s ease;
}

.tpe-point-details__link:hover,
.tpe-point-details__link:focus-visible {
  color: #2563eb;
  text-decoration: underline;
}

.tpe-point-details__link[data-empty="1"] {
  pointer-events: none;
  text-decoration: none;
}

.tpe-point-details__map {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.tpe-point-details__map-frame {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: .85rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}

.tpe-point-details__map-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1.1rem;
  border-radius: .65rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.tpe-point-details__map-link:hover,
.tpe-point-details__map-link:focus-visible {
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .18);
}

.tpe-point-details__map-link[data-empty="1"] {
  display: none;
}

.tpe-point-details__separator {
  opacity: .55;
}

.tpe-point-details [data-empty="1"] {
  color: #94a3b8;
}

.tpe-point-details__contact[data-empty="1"] {
  display: none;
}

@media (min-width:768px) {
  .tpe-point-details__item {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  .tpe-point-details__label {
    min-width: 220px;
    margin: 0;
  }
}

/* ---------- Legenda da escala (abaixo do calendário, acima de Dados do Ponto) ---------- */
.tpe-calendar .tpe-legend {
  margin-top: -0.75rem;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
}

.tpe-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 1rem auto 0;
  padding: 0.75rem 0;
  box-sizing: border-box;
}

.tpe-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

.tpe-legend__swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.tpe-legend__swatch.tpe-slot--free {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.35);
}

.tpe-legend__swatch.tpe-slot--one-off {
  background: repeating-linear-gradient(45deg,
    #d1fae5,
    #d1fae5 4px,
    #ecfdf5 4px,
    #ecfdf5 8px);
  border-left-color: #059669;
}

.tpe-legend__swatch.tpe-slot--busy {
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.28);
}

/* Usuário logado: "Ocupado" na legenda em azul, igual aos slots da escala */
.logged-in .tpe-legend__swatch.tpe-slot--busy {
  background: #e0f2fe;
  border-color: rgba(37, 99, 235, 0.25);
}

.tpe-legend__swatch.tpe-slot--pending {
  background: #ffe4e6;
  border-color: rgba(244, 63, 94, 0.3);
}

.tpe-legend__label {
  font-weight: 500;
}

/* ---------- Lista de usuários ---------- */
.tpe-user-list {
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.tpe-user-list .header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
}

.tpe-user-list__table-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 1.25rem 1.5rem;
}

.tpe-data-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tpe-data-scroll table {
  width: 100%;
}

.tpe-data-scroll::-webkit-scrollbar {
  height: 8px;
}

.tpe-data-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.tpe-data-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.tpe-user-list .header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.tpe-user-list .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tpe-user-list .btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tpe-user-list .btn-create {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.tpe-user-list .btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

.tpe-user-list .btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

.tpe-user-list .btn-action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.tpe-user-list .btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.tpe-user-list .btn-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.tpe-user-list .btn-action.btn-excluir {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.tpe-user-list .btn-action.btn-excluir:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.tpe-user-list .btn-action.btn-excluir:active {
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Estilos para botões de ação no contexto do support */
.tpe-support-actions-buttons .btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

.tpe-support-actions-buttons .btn-action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.tpe-support-actions-buttons .btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.tpe-support-actions-buttons .btn-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.tpe-support-actions-buttons .btn-action.btn-excluir {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.tpe-support-actions-buttons .btn-action.btn-excluir:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.tpe-support-actions-buttons .btn-action.btn-excluir:active {
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Botões de contato na listagem de chamados (Ligar, WhatsApp, E-mail) */
.tpe-contact-row-actions .btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

.tpe-contact-row-actions .btn-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.tpe-contact-row-actions .btn-action.btn-whatsapp svg {
  fill: currentColor;
  stroke: none;
}

.tpe-contact-row-actions .btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.tpe-contact-row-actions .btn-action.btn-telefone:hover,
.tpe-contact-row-actions .btn-action.btn-email:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.tpe-contact-row-actions .btn-action.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.tpe-contact-row-actions .btn-action.btn-whatsapp:hover {
  background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
  box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.tpe-contact-row-actions .btn-action.btn-email {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2);
}

.tpe-contact-row-actions .btn-action.btn-email:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.3);
}

.tpe-user-list__header-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.tpe-user-list__filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.tpe-user-list__filter-input {
  min-width: 220px;
  padding: .55rem .85rem;
  border-radius: .9rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: .95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-user-list__filter-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.tpe-user-list__filter-clear {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.tpe-user-list__filter-clear:hover {
  text-decoration: underline;
}

.tpe-user-list .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.tpe-user-list .btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tpe-user-list .btn-secondary.is-disabled,
.tpe-user-list .btn-secondary[aria-disabled="true"] {
  cursor: default;
  opacity: .5;
  box-shadow: none;
}

.tpe-user-list__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.tpe-user-list__pagination-controls {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.tpe-user-list__pagination-info {
  font-size: .95rem;
  color: #475569;
  font-weight: 500;
}

.tpe-user-list__empty {
  text-align: center;
  padding: 2rem 1rem;
  font-weight: 600;
  color: #475569;
}

.tpe-user-list .tabela-responsiva {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.tpe-user-list .tabela-responsiva thead th {
  padding: 1rem 1.3rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.tpe-user-list .tabela-responsiva tbody tr {
  transition: background-color 0.2s ease;
}

.tpe-user-list .tabela-responsiva tbody tr:nth-child(even) {
  background: #f9fafb;
}

.tpe-user-list .tabela-responsiva tbody tr:hover {
  background: #eef2ff;
}

.tpe-user-list .tabela-responsiva td {
  padding: 0.95rem 1.3rem;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.95rem;
  vertical-align: middle;
}

.tpe-user-list .tabela-responsiva td:nth-child(2) {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #1d4ed8;
}

.tpe-user-list .tabela-responsiva td:last-child {
  min-width: 180px;
  vertical-align: middle;
}

.tpe-user-list__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tpe-user-list .notice {
  margin: 0;
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.08);
}

/* ---------- Congregações ---------- */
.tpe-congregacoes {
  margin: 2rem 2.25rem 0;
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.tpe-congregacoes__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
}

.tpe-congregacoes__header-info {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
}

.tpe-congregacoes__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.tpe-congregacoes__subtitle {
  margin: 0;
  color: #64748b;
  font-size: .95rem;
}

.tpe-congregacoes__header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.tpe-congregacoes__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .9rem;
  font-weight: 600;
  padding: .55rem 1.35rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.tpe-congregacoes__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

.tpe-congregacoes__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.tpe-congregacoes__table-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 1.25rem 1.5rem;
}

.tpe-congregacoes__table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tpe-congregacoes__table-wrapper table {
  margin: 0 !important;
}

.tpe-congregacoes__table {
  width: 100% !important;
  border-collapse: collapse !important;
  min-width: 600px;
  margin: 0 !important;
}

.tpe-congregacoes__table thead th {
  background: #f8fafc !important;
  color: #1f2937 !important;
  font-weight: 700 !important;
  padding: 1rem 1.35rem !important;
  text-align: left !important;
  border-bottom: 1px solid #e2e8f0 !important;
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: none !important;
}

.tpe-congregacoes__table tbody tr {
  transition: background-color 0.2s ease;
}

.tpe-congregacoes__table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.tpe-congregacoes__table tbody tr:hover {
  background: #eef2ff;
}

.tpe-congregacoes__table td {
  padding: 0.95rem 1.3rem !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  font-size: 0.95rem !important;
  vertical-align: middle !important;
  border-left: none !important;
  border-right: none !important;
}

.tpe-congregacoes__table td:last-child {
  min-width: 200px;
}

.tpe-congregacoes__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.tpe-congregacoes__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  border-radius: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.tpe-congregacoes__action:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.tpe-congregacoes__action--edit {
  background: #f1f5f9;
  color: #1d4ed8;
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.12);
}

.tpe-congregacoes__action--edit:hover,
.tpe-congregacoes__action--edit:focus-visible {
  background: #e2e8f0;
  color: #1e3a8a;
  transform: translateY(-1px);
}

.tpe-congregacoes__action--delete {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.14);
}

.tpe-congregacoes__action--delete:focus-visible {
  outline-color: rgba(239, 68, 68, 0.45);
}

.tpe-congregacoes__action--delete:hover,
.tpe-congregacoes__action--delete:focus-visible {
  background: #fecaca;
  color: #7f1d1d;
  transform: translateY(-1px);
}

.tpe-congregacoes__empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-weight: 500;
}

@media (max-width: 1024px) {

  .tpe-user-list,
  .tpe-congregacoes {
    padding: 2rem 1.5rem;
  }

  .tpe-congregacoes {
    margin: 1.5rem 1.5rem 0;
  }

  .tpe-user-list .header,
  .tpe-congregacoes__header,
  .tpe-congregacoes__table-card {
    border-radius: 1.25rem;
  }
}

@media (max-width: 900px) {

  .tpe-user-list__table-card,
  .tpe-congregacoes__table-card {
    padding: 1rem 1rem 1.25rem;
  }

  .tpe-user-list .tabela-responsiva {
    min-width: 640px;
  }

  .tpe-congregacoes__table {
    min-width: 640px;
  }

  .tpe-congregacoes__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .tpe-congregacoes__header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tpe-congregacoes__button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .tpe-user-list .header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .tpe-user-list__header-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .tpe-user-list__filter {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .tpe-user-list__filter-input,
  .tpe-user-list .btn-secondary {
    width: 100%;
  }

  .tpe-user-list__filter-clear {
    width: 100%;
    text-align: center;
    display: inline-block;
    padding: 0.5rem 0;
  }

  .tpe-congregacoes__header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .tpe-congregacoes__header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {

  .tpe-user-list,
  .tpe-congregacoes {
    padding: 1.5rem 1rem;
  }

  .tpe-congregacoes {
    margin: 1.25rem 1rem 0;
  }

  .tpe-user-list .header,
  .tpe-congregacoes__header,
  .tpe-congregacoes__table-card {
    padding: 1.25rem 1.35rem;
  }

  .tpe-user-list__table-card,
  .tpe-congregacoes__table-card {
    padding: 0.9rem 0.85rem 1.1rem;
  }

  .tpe-user-list .btn,
  .tpe-congregacoes__button {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Congregações (dados) ---------- */
.tpe-layout .tpe-congregacoes-content {
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 3vw, 2.75rem) 3rem;
  box-sizing: border-box;
}

/* ---------- Petições (dados) ---------- */
.tpe-layout .tpe-peticoes-content {
  width: 100%;
  max-width: var(--tpe-calendar-max-width);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 3vw, 2.75rem) 3rem;
  box-sizing: border-box;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-frontend {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem clamp(1.35rem, 3vw, 2.5rem);
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.tpe-layout .tpe-peticoes-content h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 2vw, 1.85rem);
  font-weight: 700;
  color: #0b1f3c;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form input[type="search"] {
  padding: 0.55rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0b1f3c;
  font-size: 0.95rem;
  min-height: 2.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form input[type="search"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.6rem;
  border-radius: 0.9rem;
  background: #0a6bff;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.75rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form button:hover,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form button:focus-visible {
  background: #084ec4;
  box-shadow: 0 12px 28px rgba(8, 78, 196, 0.24);
  transform: translateY(-1px);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-clear-search {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a6bff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 0.9rem;
  min-height: 2.75rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-clear-search:hover,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-clear-search:focus-visible {
  text-decoration: none;
  background: rgba(10, 107, 255, 0.08);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table-wrapper {
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table thead {
  background: #0b1f3c;
  color: #fff;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table th,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-size: 0.95rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table tbody tr:hover {
  background: rgba(10, 107, 255, 0.08);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table td {
  color: #0f172a;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-table .tpe-peticoes-pontos {
  white-space: normal;
  line-height: 1.4;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-usuario-atual {
  font-weight: 600;
  color: #0b1f3c;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-usuario-acoes {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-acao {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  overflow: hidden;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-acao summary {
  list-style: none;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #0b1f3c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-acao summary::-webkit-details-marker {
  display: none;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-acao[open] summary {
  background: #e2e8f0;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-form {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-form p {
  margin: 0;
  color: #1f2937;
  font-size: 0.92rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-form .description {
  color: #475569;
  font-size: 0.85rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="text"],
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="email"],
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="tel"],
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form select {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 0.75rem;
  border: 1px solid #cbd5f5;
  background: #fff;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: #0b1f3c;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="text"]:focus,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="email"]:focus,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form input[type="tel"]:focus,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-form select:focus {
  outline: none;
  border-color: #0a6bff;
  box-shadow: 0 0 0 3px rgba(10, 107, 255, 0.15);
}

.tpe-layout .tpe-peticoes-content .tpe-button-primary,
.tpe-layout .tpe-peticoes-content .tpe-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tpe-layout .tpe-peticoes-content .tpe-button-primary {
  background: #0a6bff;
  border: 1px solid #0a6bff;
  color: #fff;
}

.tpe-layout .tpe-peticoes-content .tpe-button-primary:hover,
.tpe-layout .tpe-peticoes-content .tpe-button-primary:focus-visible {
  background: #084ec4;
  border-color: #084ec4;
  box-shadow: 0 12px 28px rgba(8, 78, 196, 0.24);
  transform: translateY(-1px);
}

.tpe-layout .tpe-peticoes-content .tpe-button-secondary {
  background: #fff;
  border: 1px solid #cbd5f5;
  color: #0b1f3c;
}

.tpe-layout .tpe-peticoes-content .tpe-button-secondary:hover,
.tpe-layout .tpe-peticoes-content .tpe-button-secondary:focus-visible {
  border-color: #0a6bff;
  color: #0a6bff;
  box-shadow: 0 10px 24px rgba(10, 107, 255, 0.18);
  transform: translateY(-1px);
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice {
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice p {
  margin: 0;
  font-size: 0.95rem;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice--success {
  border-left: 4px solid #16a34a;
  background: #ecfdf5;
  color: #166534;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice--error {
  border-left: 4px solid #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice--warning {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-notice--info {
  border-left: 4px solid #0a6bff;
  background: #eff6ff;
  color: #0b1f3c;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination ul {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination a,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  border: 1px solid #cbd5f5;
  background: #fff;
  color: #0b1f3c;
  font-weight: 600;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination .current {
  background: #0a6bff;
  border-color: #0a6bff;
  color: #fff;
}

.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination a:hover,
.tpe-layout .tpe-peticoes-content .tpe-peticoes-pagination a:focus-visible {
  border-color: #0a6bff;
  color: #0a6bff;
}

.tpe-layout .tpe-congregacoes-content #abrirModal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 0.9rem;
  background: #0a6bff;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(10, 107, 255, 0.18);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  margin-bottom: 1.5rem;
}

.tpe-layout .tpe-congregacoes-content #abrirModal:hover,
.tpe-layout .tpe-congregacoes-content #abrirModal:focus-visible {
  background: #084ec4;
  box-shadow: 0 16px 32px rgba(8, 78, 196, 0.24);
  transform: translateY(-1px);
}

.tpe-layout .tpe-congregacoes-content .tabela-scroll {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  overflow-x: auto;
}

.tpe-layout .tpe-congregacoes-content #lista-tabela-generica {
  margin: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .tpe-layout .tpe-congregacoes-content {
    padding: 2rem 1.25rem 2.5rem;
  }

  .tpe-layout .tpe-congregacoes-content #abrirModal {
    width: 100%;
    justify-content: center;
  }

  .tpe-layout .tpe-congregacoes-content .tabela-scroll {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 768px) {
  .tpe-layout .tpe-peticoes-content {
    padding: 2rem 1.25rem 2.5rem;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-frontend {
    padding: 1.5rem 1.1rem;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form input[type="search"] {
    min-height: 2rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    border-radius: 0.75rem;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form button,
  .tpe-layout .tpe-peticoes-content .tpe-peticoes-clear-search {
    width: 100%;
    text-align: center;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-search-form button {
    min-height: 2.25rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.93rem;
  }

  .tpe-layout .tpe-peticoes-content .tpe-peticoes-clear-search {
    align-self: stretch;
    justify-content: center;
  }
}

/* ---------- Barra de notificações ---------- */
.tpe-notification-bar {
  background: #f8fafc;
  border-bottom: 1px solid #dbeafe;
  color: #0f172a;
  padding: 1.25rem 1.5rem;
}

.tpe-notification-bar.is-hidden {
  display: none;
}

.tpe-notification-bar__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.tpe-notification-bar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tpe-notification-bar__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tpe-notification-bar--collapsed .tpe-notification-bar__content {
  display: none;
}

.tpe-notification-bar__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
}

.tpe-notification-bar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tpe-notification-bar__toggle:hover,
.tpe-notification-bar__toggle:focus {
  background: #0a6bff;
  border-color: #0a6bff;
  color: #ffffff;
}

.tpe-notification-bar__toggle:focus-visible {
  outline: 2px solid #0a6bff;
  outline-offset: 2px;
}

.tpe-notification-bar__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}

.tpe-notification-bar__toggle-icon::before {
  content: '\25B2';
  font-size: 0.75rem;
}

.tpe-notification-bar--collapsed .tpe-notification-bar__toggle-icon::before {
  content: '\25BC';
}

.tpe-notification-bar__table-wrapper {
  overflow-x: auto;
}

.tpe-notification-bar__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.tpe-notification-bar__table thead {
  background: #0a6bff;
  color: #ffffff;
}

.tpe-notification-bar__table th,
.tpe-notification-bar__table td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.95rem;
}

.tpe-notification-bar__table th {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.tpe-notification-bar__table tbody tr:nth-child(even) {
  background: #f1f5f9;
}

.tpe-notification-bar__table tbody tr:hover {
  background: #e2e8f0;
}

.tpe-notification-bar__table td {
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.tpe-notification-bar__table tbody tr:last-child td {
  border-bottom: none;
}

.tpe-notification-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tpe-notification-bar__button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.tpe-notification-bar__button--confirm {
  background: #0a6bff;
  border-color: #0a6bff;
  color: #ffffff;
}

.tpe-notification-bar__button--confirm:hover,
.tpe-notification-bar__button--confirm:focus {
  background: #004bd1;
  border-color: #004bd1;
}

.tpe-notification-bar__button--decline {
  background: #ffffff;
  border-color: #cbd5f5;
  color: #0f172a;
}

.tpe-notification-bar__button--decline:hover,
.tpe-notification-bar__button--decline:focus {
  background: #f8fafc;
  border-color: #94a3b8;
}

.tpe-notification-bar__button.is-loading,
.tpe-notification-bar__button:disabled {
  opacity: 0.6;
  cursor: default;
}

.tpe-notification-bar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #ffffff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tpe-notification-bar__badge--confirmed {
  background: #16a34a;
}

.tpe-notification-bar__feedback {
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 1.2rem;
}

.tpe-notification-bar__feedback.is-success {
  color: #047857;
}

.tpe-notification-bar__feedback.is-error {
  color: #dc2626;
}

.tpe-notification-bar__status {
  min-width: 180px;
}

@media (max-width: 900px) {
  .tpe-notification-bar__table {
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .tpe-notification-bar {
    padding: 1rem;
  }

  .tpe-notification-bar__header {
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
  }

  .tpe-notification-bar__toggle {
    align-self: center;
    margin-left: auto;
  }

  .tpe-notification-bar__title {
    font-size: 1rem;
  }

  .tpe-notification-bar__table {
    box-shadow: none;
    border-radius: 0;
    min-width: 640px;
  }

  .tpe-notification-bar__table th,
  .tpe-notification-bar__table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .tpe-notification-bar__actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .tpe-notification-bar__button {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
  }

  .tpe-notification-bar__badge {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
  }

  .tpe-notification-bar__status {
    min-width: 140px;
  }
}

/* ---------- Modal de reservas ---------- */
body.tpe-modal-open {
  overflow: hidden;
}

.tpe-modal[hidden] {
  display: none !important;
}

.tpe-modal {
  position: fixed !important;
  inset: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  z-index: 10000 !important;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  box-sizing: border-box;
  /* Garantir que modal não seja afetado por containers isolados */
  contain: none !important;
  isolation: isolate;
}

.tpe-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.tpe-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .2s ease;
}

.tpe-modal.is-open .tpe-modal__backdrop {
  opacity: 1;
}

.tpe-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-width: 420px;
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 28px 60px rgba(15, 23, 42, .32);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #0f172a;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  -webkit-overflow-scrolling: touch;
}

.tpe-modal.is-open .tpe-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tpe-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 0.5rem;
  border: 0;
  background: rgba(148, 163, 184, .18);
  color: #0f172a;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
  z-index: 10;
  flex-shrink: 0;
  padding: 0;
}

.tpe-modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.tpe-modal__close:hover,
.tpe-modal__close:focus-visible {
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
}

.tpe-modal__close:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.tpe-modal__close:active {
  transform: scale(.96);
}

.tpe-modal__title {
  margin: 0;
  padding-right: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  min-width: 0;
}

.tpe-modal__header {
  margin: 0 0 1rem 0;
  padding: 0 0 1rem 0;
  padding-right: 3.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  min-height: 2.5rem;
}

.tpe-modal__body {
  margin: 0;
  padding: 0;
  color: #374151;
  line-height: 1.6;
}

.tpe-modal__body p {
  margin: 0 0 1rem 0;
}

.tpe-modal__body p:last-child {
  margin-bottom: 0;
}

.tpe-modal__details {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .95rem;
  color: #475569;
}

.tpe-modal__detail {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.tpe-modal__detail--date {
  font-size: 1rem;
}

.tpe-modal__label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: .35rem;
}

.tpe-modal__field {
  display: flex;
  flex-direction: column;
}

.tpe-modal__select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  padding: .85rem 2.5rem .85rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.5;
  min-height: 3.25rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 2.25 7 7.25 13 2.25'/%3E%3C/svg%3E") no-repeat right 1rem center;
  background-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-modal__select:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.tpe-modal__input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  padding: .65rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-modal__input:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.tpe-modal__fieldset {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tpe-modal__fieldset:first-of-type {
  margin-top: 1rem;
}

.tpe-modal__subtitle {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: #0f172a;
}

.tpe-modal__inputs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.tpe-modal__inputs-inline .tpe-modal__field {
  flex: 1 1 180px;
}

.tpe-modal__participants {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.tpe-modal__participant {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem;
}

.tpe-modal__participant .tpe-modal__field {
  flex: 1 1 240px;
}

.tpe-modal__participant-remove {
  border: none;
  background: transparent;
  color: #ef4444;
  font-weight: 600;
  cursor: pointer;
  padding: .45rem .75rem;
  border-radius: .75rem;
  transition: background-color .2s ease, color .2s ease;
}

.tpe-modal__participant-remove:hover,
.tpe-modal__participant-remove:focus-visible {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c;
}

.tpe-modal__participant-remove:focus-visible {
  outline: 2px solid rgba(239, 68, 68, .35);
  outline-offset: 2px;
}

.tpe-modal__add-participant {
  align-self: flex-start;
  border: 1px dashed #94a3b8;
  border-radius: .75rem;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  padding: .55rem 1.1rem;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.tpe-modal__add-participant:hover,
.tpe-modal__add-participant:focus-visible {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.tpe-modal__add-participant:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.tpe-modal__add-participant:disabled {
  opacity: .6;
  cursor: not-allowed;
  background: transparent;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.tpe-modal__help {
  margin: 0;
  font-size: .8rem;
  color: #64748b;
}

.tpe-modal__field.is-hidden,
.tpe-modal__fieldset.is-hidden {
  display: none;
}

.tpe-modal__extras-recurrence {
  margin-top: .5rem;
}

.tpe-modal__extras-recurrence-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .5rem 0;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  text-align: left;
  border-radius: .25rem;
  transition: color .2s ease, background-color .2s ease;
}

.tpe-modal__extras-recurrence-header:hover,
.tpe-modal__extras-recurrence-header:focus-visible {
  color: #0f172a;
  background: #f1f5f9;
}

.tpe-modal__extras-recurrence-icon {
  display: inline-block;
  width: .6rem;
  height: .6rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-left: auto;
  transition: transform .2s ease;
}

.tpe-modal__extras-recurrence:not(.tpe-modal__extras-recurrence--collapsed) .tpe-modal__extras-recurrence-icon {
  transform: rotate(135deg);
}

.tpe-modal__extras-recurrence-content {
  padding-top: .75rem;
  padding-left: 0;
}

.tpe-modal__extras-recurrence--collapsed .tpe-modal__extras-recurrence-content {
  display: none;
}

.tpe-modal__feedback {
  display: none;
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 600;
}

.tpe-modal__feedback.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.tpe-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: nowrap;
  align-items: center;
}

.tpe-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: .65rem 1.35rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.tpe-modal__button:disabled {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

.tpe-modal__button--secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.tpe-modal__button--secondary:hover,
.tpe-modal__button--secondary:focus-visible {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tpe-modal__button--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .26);
}

.tpe-modal__button--primary:hover,
.tpe-modal__button--primary:focus-visible {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 10px 22px rgba(29, 78, 216, .28);
}

.tpe-modal__button--primary.is-loading {
  position: relative;
  pointer-events: none;
}

.tpe-modal__button--primary.is-loading::after {
  content: '';
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-top-color: #fff;
  animation: tpe-modal-spin .8s linear infinite;
  margin-left: .6rem;
}

@keyframes tpe-modal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .tpe-modal {
    align-items: flex-start;
    padding: 0;
  }

  .tpe-modal__dialog {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 1.25rem 1rem;
    gap: 1rem;
    max-height: 100vh;
    min-height: auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  @supports (height: 100dvh) {
    .tpe-modal__dialog {
      max-height: 100dvh;
      min-height: 100dvh;
    }
  }

  .tpe-modal__title {
    font-size: 1.125rem;
    padding-right: 2.5rem;
  }

  .tpe-modal__form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible !important;
  }

  .tpe-modal__fieldset {
    overflow: visible;
    padding-right: 0.25rem;
  }

  .tpe-modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    flex-shrink: 0;
  }

  .tpe-modal__button {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
}

/* ---------- Modal de Contatos - Melhorias UX/UI ---------- */
.tpe-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tpe-modal__fieldset {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tpe-modal__fieldset:first-of-type {
  margin-top: 0;
}

/* Em desktop, permitir scroll no fieldset se necessário */
@media (min-width: 521px) {
  .tpe-modal__form {
    overflow: visible;
  }

  .tpe-modal__fieldset {
    overflow: visible;
  }
}

/* Campo de busca de usuário/petição */
.tpe-user-search-wrapper {
  position: relative;
  width: 100%;
}

.tpe-user-search-input {
  width: 100%;
  box-sizing: border-box;
}

.tpe-user-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 .75rem .75rem;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2300;
  width: 100%;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
  margin-top: 0;
  padding: 0;
}

.tpe-user-search-results .result-item {
  padding: .75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color .15s ease;
  font-size: .95rem;
  color: #0f172a;
}

.tpe-user-search-results .result-item:hover {
  background: #f1f5f9;
}

.tpe-user-search-results .result-item.selected {
  background: #2563eb;
  color: #fff;
}

/* Indicador de campo obrigatório */
.tpe-required-indicator {
  color: #ef4444;
  font-weight: 700;
  margin-left: .25rem;
}

/* Select com botão de ação inline */
.tpe-select-with-action {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tpe-select-with-action .tpe-modal__select {
  flex: 1;
  min-width: 0;
}

.tpe-manage-link {
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem;
  font-size: .85rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  border-radius: .5rem;
  transition: background-color .2s ease, color .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tpe-manage-link:hover,
.tpe-manage-link:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.tpe-manage-link::after {
  content: ' ↗';
  font-size: .75rem;
  opacity: .7;
}

/* Textarea */
.tpe-modal__textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  padding: .75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-modal__textarea:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

/* Melhorias de espaçamento no modal de contatos */
.tpe-modal__form .tpe-modal__fieldset {
  margin-top: 1rem;
}

.tpe-modal__form .tpe-modal__actions {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* Estados de feedback visual */
.tpe-input-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18) !important;
}

.tpe-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .18) !important;
}

.tpe-hint-success {
  color: #10b981 !important;
}

.tpe-hint-error {
  color: #ef4444 !important;
}

/* Responsividade para modal de contatos */
@media (max-width: 520px) {
  .tpe-select-with-action {
    flex-direction: column;
    align-items: stretch;
  }

  .tpe-manage-link {
    width: 100%;
    justify-content: center;
    margin-top: .5rem;
  }

  .tpe-modal__inputs-inline {
    flex-direction: column;
    gap: 1rem;
  }

  .tpe-modal__inputs-inline .tpe-modal__field {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .tpe-select-with-action {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .tpe-select-with-action .tpe-modal__select {
    width: 100%;
  }

  .tpe-manage-link {
    align-self: flex-start;
    width: auto;
  }
}

.tpe-user-profile {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.tpe-user-profile__section {
  background: #fff;
  padding: 1.75rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tpe-user-profile__section h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #111827;
}

.tpe-user-profile__details {
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tpe-user-profile__detail-item {
  background: #f9fafb;
  border-radius: .85rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.tpe-user-profile__detail-item dt {
  margin: 0;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
}

.tpe-user-profile__detail-item dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.tpe-user-profile__points-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: .25rem;
}

.tpe-user-profile__form {
  display: grid;
  gap: 1rem;
}

.tpe-user-profile__field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.tpe-user-profile__field label {
  font-weight: 600;
  color: #374151;
}

.tpe-user-profile__field input[type="text"],
.tpe-user-profile__field input[type="email"],
.tpe-user-profile__field input[type="password"] {
  border: 1px solid #d1d5db;
  border-radius: .65rem;
  padding: .75rem 1rem;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tpe-user-profile__field input[type="text"]:focus,
.tpe-user-profile__field input[type="email"]:focus,
.tpe-user-profile__field input[type="password"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .2);
}

.tpe-user-profile__actions {
  display: flex;
  gap: .75rem;
}

.tpe-user-profile__notice {
  padding: 1rem 1.25rem;
  border-radius: .85rem;
  font-weight: 500;
}

.tpe-user-profile__notice ul {
  margin: 0;
  padding-left: 1.1rem;
}

.tpe-user-profile__notice--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, .3);
}

.tpe-user-profile__notice--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(248, 113, 113, .35);
}

/* ==========================================================
   Cadastro de Publicador - Mensagens de Notificação
   ========================================================== */
.tpe-cadastro-publicador {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tpe-cadastro-publicador h2 {
  margin-bottom: 1.5rem;
  color: #0f172a;
  font-size: 1.75rem;
  font-weight: 700;
}

.tpe-cadastro-publicador__notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-width: 2px;
  border-style: solid;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tpe-cadastro-publicador__notice-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
  font-weight: 700;
}

.tpe-cadastro-publicador__notice-content {
  flex: 1;
}

.tpe-cadastro-publicador__notice-content p {
  margin: 0;
  font-weight: 500;
}

.tpe-cadastro-publicador__notice-content a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.tpe-cadastro-publicador__notice-content a:hover {
  opacity: 0.8;
}

/* Estilos específicos por tipo */
.tpe-cadastro-publicador__notice--error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #dc2626;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15), 0 0 0 1px rgba(220, 38, 38, 0.1);
}

.tpe-cadastro-publicador__notice--error .tpe-cadastro-publicador__notice-icon {
  color: #dc2626;
  font-size: 1.75rem;
}

.tpe-cadastro-publicador__notice--error .tpe-cadastro-publicador__notice-content a {
  color: #991b1b;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.tpe-cadastro-publicador__notice--success {
  background: #dcfce7;
  color: #166534;
  border-color: #16a34a;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15), 0 0 0 1px rgba(22, 163, 74, 0.1);
}

.tpe-cadastro-publicador__notice--success .tpe-cadastro-publicador__notice-icon {
  color: #16a34a;
}

.tpe-cadastro-publicador__notice--warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.tpe-cadastro-publicador__notice--warning .tpe-cadastro-publicador__notice-icon {
  color: #f59e0b;
}

.tpe-cadastro-publicador__notice--info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.tpe-cadastro-publicador__notice--info .tpe-cadastro-publicador__notice-icon {
  color: #3b82f6;
}

/* Responsivo */
@media (max-width: 640px) {
  .tpe-cadastro-publicador {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }

  .tpe-cadastro-publicador h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .tpe-cadastro-publicador__notice {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    gap: 0.75rem;
  }

  .tpe-cadastro-publicador__notice-icon {
    font-size: 1.375rem;
  }

  .tpe-cadastro-publicador__notice--error .tpe-cadastro-publicador__notice-icon {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .tpe-user-profile__section {
    padding: 1.25rem;
  }

  .tpe-user-profile__actions {
    flex-direction: column;
  }

  .tpe-user-profile__actions .button {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================
   TPE — Support Shortcodes
   ========================================================== */

/* Support Dashboard */
.tpe-support-dashboard__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tpe-support-dashboard__card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tpe-support-dashboard__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tpe-support-dashboard__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0a6bff;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.tpe-support-dashboard__label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Support Tables & Forms General */
.tpe-support-contacts,
.tpe-support-petitions,
.tpe-support-users {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  margin: 32px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tpe-support-contacts__form,
.tpe-support-contacts__filters,
.tpe-support-users__filters,
.tpe-support-petitions__form {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
}

.tpe-support-contacts__form p,
.tpe-support-contacts__filters p,
.tpe-support-users__filters p,
.tpe-support-petitions__form p {
  margin-bottom: 1rem;
}

.tpe-support-contacts__form p:last-child,
.tpe-support-contacts__filters p:last-child,
.tpe-support-users__filters p:last-child,
.tpe-support-petitions__form p:last-child {
  margin-bottom: 0;
}

.tpe-support-contacts__form label,
.tpe-support-contacts__filters label,
.tpe-support-users__filters label,
.tpe-support-petitions__form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.9rem;
}

.tpe-support-contacts__form input[type="text"],
.tpe-support-contacts__form textarea,
.tpe-support-contacts__filters input[type="text"],
.tpe-support-contacts__filters input[type="number"],
.tpe-support-users__filters input[type="text"],
.tpe-support-petitions__form input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tpe-support-contacts__form input:focus,
.tpe-support-contacts__form textarea:focus,
.tpe-support-contacts__filters input:focus,
.tpe-support-users__filters input:focus,
.tpe-support-petitions__form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.tpe-support-contacts__form button,
.tpe-support-contacts__filters button,
.tpe-support-users__filters button,
.tpe-support-petitions__form button {
  cursor: pointer;
}

/* Tables */
.tpe-support-contacts table,
.tpe-support-petitions table,
.tpe-support-users table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
}

.tpe-support-contacts th,
.tpe-support-petitions th,
.tpe-support-users th {
  background: #f3f4f6;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tpe-support-contacts th:first-child,
.tpe-support-petitions th:first-child,
.tpe-support-users th:first-child {
  border-top-left-radius: 8px;
}

.tpe-support-contacts th:last-child,
.tpe-support-petitions th:last-child,
.tpe-support-users th:last-child {
  border-top-right-radius: 8px;
}

.tpe-support-contacts td,
.tpe-support-petitions td,
.tpe-support-users td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.95rem;
  vertical-align: middle;
}

.tpe-support-contacts tr:last-child td,
.tpe-support-petitions tr:last-child td,
.tpe-support-users tr:last-child td {
  border-bottom: none;
}

.tpe-support-contacts tr:hover td,
.tpe-support-petitions tr:hover td,
.tpe-support-users tr:hover td {
  background-color: #f9fafb;
}

/* Support Tables & Forms General */
.tpe-support-contacts,
.tpe-support-petitions,
.tpe-support-users {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  margin: 32px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tpe-support-contacts__form,
.tpe-support-contacts__filters,
.tpe-support-users__filters,
.tpe-support-petitions__form {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
}

.tpe-support-contacts__form p,
.tpe-support-contacts__filters p,
.tpe-support-users__filters p,
.tpe-support-petitions__form p {
  margin-bottom: 1rem;
}

.tpe-support-contacts__form p:last-child,
.tpe-support-contacts__filters p:last-child,
.tpe-support-users__filters p:last-child,
.tpe-support-petitions__form p:last-child {
  margin-bottom: 0;
}

.tpe-support-contacts__form label,
.tpe-support-contacts__filters label,
.tpe-support-users__filters label,
.tpe-support-petitions__form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.9rem;
}

.tpe-support-contacts__form input[type="text"],
.tpe-support-contacts__form textarea,
.tpe-support-contacts__filters input[type="text"],
.tpe-support-contacts__filters input[type="number"],
.tpe-support-users__filters input[type="text"],
.tpe-support-petitions__form input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tpe-support-contacts__form input:focus,
.tpe-support-contacts__form textarea:focus,
.tpe-support-contacts__filters input:focus,
.tpe-support-users__filters input:focus,
.tpe-support-petitions__form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.tpe-support-contacts__form button,
.tpe-support-contacts__filters button,
.tpe-support-users__filters button,
.tpe-support-petitions__form button {
  cursor: pointer;
}

/* Tables */
.tpe-support-contacts table,
.tpe-support-petitions table,
.tpe-support-users table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
}

.tpe-support-contacts th,
.tpe-support-petitions th,
.tpe-support-users th {
  background: #f3f4f6;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tpe-support-contacts th:first-child,
.tpe-support-petitions th:first-child,
.tpe-support-users th:first-child {
  border-top-left-radius: 8px;
}

.tpe-support-contacts th:last-child,
.tpe-support-petitions th:last-child,
.tpe-support-users th:last-child {
  border-top-right-radius: 8px;
}

.tpe-support-contacts td,
.tpe-support-petitions td,
.tpe-support-users td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.95rem;
  vertical-align: middle;
}

.tpe-support-contacts tr:last-child td,
.tpe-support-petitions tr:last-child td,
.tpe-support-users tr:last-child td {
  border-bottom: none;
}

.tpe-support-contacts tr:hover td,
.tpe-support-petitions tr:hover td,
.tpe-support-users tr:hover td {
  background-color: #f9fafb;
}

/* Messages */
.tpe-support-messages .notice {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tpe-support-messages .notice p {
  margin: 0;
  font-weight: 500;
}

.tpe-support-messages .notice-success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.tpe-support-messages .notice-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.tpe-support-messages .notice-info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

/* Support Contacts Header & Filters */
.tpe-support-contacts__header {
  margin-bottom: 1.5rem;
}

.tpe-support-contacts__header .button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tpe-support-contacts__table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.tpe-support-contacts__table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.tpe-support-contacts__table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.tpe-support-contacts__table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.tpe-support-contacts__table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Filtros em linha horizontal */
.tpe-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.tpe-filter-item {
  flex: 1;
  min-width: 150px;
}

.tpe-filter-item label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.tpe-filter-item select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.tpe-filter-item select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.tpe-filter-item--button {
  flex: 0 0 auto;
}

.tpe-filter-item--button button {
  margin-top: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .tpe-filters-row {
    flex-direction: column;
  }

  .tpe-filter-item {
    width: 100%;
    min-width: 0;
  }

  .tpe-filter-item--button {
    width: 100%;
  }

  .tpe-filter-item--button button {
    width: 100%;
  }

  .tpe-support-contacts,
  .tpe-support-petitions,
  .tpe-support-users {
    margin: 16px;
    padding: 20px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
  }

  .tpe-support-contacts__header .button {
    width: 100%;
  }

  .tpe-support-contacts__table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .tpe-support-contacts table,
  .tpe-support-petitions table,
  .tpe-support-users table {
    min-width: 600px;
  }

  .tpe-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .tpe-chart-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .tpe-stats-row {
    flex-direction: column;
    gap: 2rem;
  }
}

/* Mobile específico - Smartphones padrão */
@media (max-width: 640px) {

  .tpe-support-contacts,
  .tpe-support-petitions,
  .tpe-support-users {
    margin: 12px;
    padding: 16px;
    max-width: calc(100vw - 24px);
  }

  .tpe-support-contacts__filters {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .tpe-support-contacts__table-wrapper {
    margin: 0;
    padding: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-support-contacts table,
  .tpe-support-petitions table,
  .tpe-support-users table {
    min-width: 500px;
  }

  .tpe-support-contacts table th,
  .tpe-support-petitions table th,
  .tpe-support-users table th {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .tpe-support-contacts table td,
  .tpe-support-petitions table td,
  .tpe-support-users table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Mobile muito pequeno - Smartphones pequenos */
@media (max-width: 480px) {

  .tpe-support-contacts,
  .tpe-support-petitions,
  .tpe-support-users {
    margin: 8px;
    padding: 12px;
    max-width: calc(100vw - 16px);
    border-radius: 12px;
  }

  .tpe-support-contacts__header {
    margin-bottom: 1rem;
  }

  .tpe-support-contacts__header .button {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }

  .tpe-support-contacts__filters {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 6px;
  }

  .tpe-filter-item label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }

  .tpe-filter-item select {
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
  }

  .tpe-support-contacts__table-wrapper {
    margin: 0;
    padding: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-support-contacts table,
  .tpe-support-petitions table,
  .tpe-support-users table {
    min-width: 480px;
  }

  .tpe-support-contacts table th,
  .tpe-support-petitions table th,
  .tpe-support-users table th {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .tpe-support-contacts table td,
  .tpe-support-petitions table td,
  .tpe-support-users table td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .tpe-support-contacts table td .button-small {
    padding: 3px 6px;
    min-width: 28px;
    height: 28px;
  }

  .tpe-support-contacts table td .button-small .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
  }
}

/* Indicadores visuais de contatos não lidos */
.tpe-contact-unread {
  background-color: #fef3c7 !important;
  border-left: 3px solid #f59e0b;
}

.tpe-contact-unread:hover {
  background-color: #fde68a !important;
}

.tpe-contact-unread-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.tpe-contact-source-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.875rem;
  vertical-align: middle;
}

/* ==========================================================
   TPE — Support Dashboard (New Grid Layout)
   ========================================================== */

.tpe-support-dashboard {
  margin: 2rem 0 0 0;
  padding: 0 1rem 2rem 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tpe-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Grid de 3 colunas quando há 6 ou mais cards */
@media (min-width: 1200px) {
  .tpe-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Grid de 2 colunas em tablets */
@media (min-width: 768px) and (max-width: 1199px) {
  .tpe-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grid de 3 colunas em mobile - cards menores */
@media (max-width: 767px) {
  .tpe-support-dashboard {
    margin: 1rem 0;
    padding: 0 0.5rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
  }

  .tpe-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  /* Garantir que TODOS os cards ocupem apenas 1 coluna */
  .tpe-dashboard-card {
    grid-column: span 1;
    padding: 0.5rem;
    min-height: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    max-width: 100%;
  }

  .tpe-card-title {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    line-height: 1.2;
    font-weight: 600;
  }

  .tpe-card-content {
    margin-bottom: 0.5rem;
    min-height: auto;
    flex-grow: 1;
  }

  .tpe-stats-row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .tpe-stat-item {
    width: 100%;
    padding: 0.2rem 0;
  }

  .tpe-stat-value {
    font-size: 1.1rem;
  }

  .tpe-stat-label {
    font-size: 0.55rem;
  }

  .tpe-card-link {
    font-size: 0.6rem;
    margin-top: auto;
  }

  /* Ajustes para gráficos e conteúdo maior */
  .tpe-card-petitions .tpe-donut-chart {
    width: 45px;
    height: 45px;
  }

  .tpe-chart-legend {
    gap: 0.25rem;
  }

  .tpe-chart-center {
    font-size: 0.55rem;
  }

  .tpe-chart-total {
    font-size: 0.7rem;
    line-height: 1.1;
  }

  .tpe-chart-label {
    font-size: 0.5rem;
  }

  .tpe-legend-item {
    font-size: 0.55rem;
    gap: 0.2rem;
  }

  .tpe-legend-label {
    font-size: 0.55rem;
  }

  .tpe-legend-value {
    font-size: 0.55rem;
  }

  /* Ajuste para gráfico de rosca ficar proporcional */
  .tpe-chart-container {
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    padding: 0.15rem 0;
  }

  .tpe-chart-legend {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .tpe-areas-chart {
    min-height: 80px;
    max-height: 120px;
  }

  .tpe-bar-header {
    font-size: 0.55rem;
  }

  .tpe-bar-item {
    font-size: 0.5rem;
  }

  .tpe-bar-value {
    font-size: 0.55rem;
  }

  .tpe-card-footer {
    font-size: 0.55rem;
    margin-top: 0.4rem;
  }

  .tpe-import-date {
    font-size: 0.55rem;
  }

  .tpe-import-date-label,
  .tpe-import-date-value {
    font-size: 0.55rem;
  }

  .tpe-empty-state {
    font-size: 0.55rem;
    padding: 0.5rem 0;
  }

  /* Wrapper isolado em tablet/mobile */
  .tpe-support-accordion-wrapper {
    margin: 1.5rem 0 0 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    contain: layout style;
  }

  .tpe-support-accordion {
    margin: 0;
    max-width: 100vw;
    contain: layout style;
  }
}

/* Mobile específico - Smartphones padrão */
@media (max-width: 640px) {
  .tpe-support-dashboard {
    margin: 0.75rem 0;
    padding: 0 0.5rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .tpe-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  /* Wrapper isolado em mobile */
  .tpe-support-accordion-wrapper {
    margin: 1.5rem 0 0 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    contain: layout style;
  }

  .tpe-support-accordion {
    margin: 0;
    max-width: 100vw;
    contain: layout style;
  }

  .tpe-dashboard-card {
    padding: 0.5rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tpe-card-title {
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
  }

  .tpe-stat-value {
    font-size: 1rem;
  }

  .tpe-stat-label {
    font-size: 0.5rem;
  }

  .tpe-card-petitions .tpe-donut-chart {
    width: 40px;
    height: 40px;
  }

  .tpe-chart-center {
    width: 30px;
    height: 30px;
  }

  .tpe-chart-total {
    font-size: 0.65rem;
  }

  .tpe-areas-chart {
    min-height: 80px;
    max-height: 120px;
  }

  .tpe-bar-header {
    font-size: 0.55rem;
  }

  .tpe-bar-item {
    font-size: 0.5rem;
  }

  .tpe-bar-value {
    font-size: 0.55rem;
  }

  .tpe-card-footer {
    font-size: 0.5rem;
    margin-top: 0.3rem;
    padding-top: 0.5rem;
  }

  .tpe-import-date {
    font-size: 0.5rem;
    gap: 0.3rem;
  }

  .tpe-import-date-label,
  .tpe-import-date-value {
    font-size: 0.5rem;
  }

  .tpe-empty-state {
    font-size: 0.5rem;
    padding: 0.4rem 0;
  }
}

/* Mobile muito pequeno - Smartphones pequenos */
@media (max-width: 480px) {
  .tpe-support-dashboard {
    margin: 0.5rem 0;
    padding: 0 0.4rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .tpe-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .tpe-dashboard-card {
    padding: 0.4rem;
  }

  .tpe-card-title {
    font-size: 0.55rem;
    margin-bottom: 0.4rem;
  }

  .tpe-stat-value {
    font-size: 0.9rem;
  }

  .tpe-stat-label {
    font-size: 0.45rem;
  }

  .tpe-card-petitions .tpe-donut-chart {
    width: 35px;
    height: 35px;
  }

  .tpe-chart-center {
    width: 25px;
    height: 25px;
    font-size: 0.5rem;
  }

  .tpe-chart-total {
    font-size: 0.6rem;
  }

  .tpe-card-link {
    font-size: 0.5rem;
  }

  .tpe-card-footer {
    font-size: 0.45rem;
    margin-top: 0.25rem;
    padding-top: 0.4rem;
  }

  .tpe-import-date {
    font-size: 0.45rem;
    gap: 0.25rem;
  }

  .tpe-import-date-label,
  .tpe-import-date-value {
    font-size: 0.45rem;
  }

  .tpe-empty-state {
    font-size: 0.45rem;
    padding: 0.3rem 0;
  }

  .tpe-stats-row {
    gap: 0.25rem;
  }

  .tpe-stat-item {
    padding: 0.15rem 0;
  }

  .tpe-areas-chart {
    min-height: 70px;
    max-height: 100px;
  }

  .tpe-bar-header {
    font-size: 0.5rem;
  }

  .tpe-bar-item {
    font-size: 0.45rem;
  }

  .tpe-bar-value {
    font-size: 0.5rem;
  }

  /* Wrapper isolado em mobile pequeno */
  .tpe-support-accordion-wrapper {
    margin: 1rem 0 0 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    contain: layout style;
  }

  .tpe-support-accordion {
    margin: 0;
    max-width: 100vw;
    contain: layout style;
  }


  /* Wrapper isolado para acordeões - Seção Independente */
  .tpe-support-accordion-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2rem auto 0 auto;
    padding: 0 1rem;
    position: relative;
    overflow-x: hidden;
    contain: layout style;
  }

  /* Desktop: manter margens laterais consistentes com dashboard */
  @media (min-width: 769px) {
    .tpe-support-accordion-wrapper {
      max-width: 1200px;
      padding: 0 1rem;
      margin-left: auto;
      margin-right: auto;
    }
  }

  .tpe-support-accordion {
    margin: 0;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    contain: layout style;
    position: relative;
  }

  .tpe-accordion-header {
    padding: 0.75rem;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
  }

  .tpe-accordion-content[aria-hidden="false"] {
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .tpe-accordion-title {
    font-size: 0.875rem;
  }
}

.tpe-dashboard-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(20px);
  animation: tpe-card-fade-in 0.6s ease-out forwards;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Animação de entrada escalonada para os cards */
.tpe-dashboard-card:nth-child(1) {
  animation-delay: 0.1s;
}

.tpe-dashboard-card:nth-child(2) {
  animation-delay: 0.2s;
}

.tpe-dashboard-card:nth-child(3) {
  animation-delay: 0.3s;
}

.tpe-dashboard-card:nth-child(4) {
  animation-delay: 0.4s;
}

.tpe-dashboard-card:nth-child(5) {
  animation-delay: 0.5s;
}

.tpe-dashboard-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes tpe-card-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tpe-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.tpe-card-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tpe-card-link {
  font-size: 0.875rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  align-self: flex-start;
  transition: color 0.2s;
}

.tpe-card-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Chart Card */
.tpe-chart-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  justify-content: space-around;
}

.tpe-donut-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpe-chart-center {
  width: 90px;
  height: 90px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tpe-chart-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.tpe-chart-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  margin-top: 2px;
}

.tpe-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tpe-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.tpe-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-blue {
  background-color: #3b82f6;
}

.dot-gray {
  background-color: #e5e7eb;
}

.tpe-legend-value {
  font-weight: 600;
  color: #111827;
  margin-left: auto;
}

/* Stats Cards */
.tpe-stats-row {
  display: flex;
  width: 100%;
  justify-content: space-around;
  gap: 1rem;
  text-align: center;
}

.tpe-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tpe-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.tpe-stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-weight: 500;
}

/* Colors */
.text-blue {
  color: #2563eb;
}

.text-green {
  color: #10b981;
}

.text-red {
  color: #ef4444;
}

.text-orange {
  color: #f59e0b;
}

.text-gray {
  color: #6b7280;
}

/* Card de Áreas - Barras Horizontais */
.tpe-card-areas .tpe-card-content {
  padding: 0;
  margin-bottom: 0;
}

.tpe-areas-chart {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.tpe-bars-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tpe-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tpe-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.tpe-bar-label {
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.5rem;
}

.tpe-bar-value {
  font-weight: 700;
  color: #2563eb;
  font-size: 1rem;
  min-width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

.tpe-bar-track {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.tpe-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
  animation: tpe-bar-fill-animate 0.8s ease-out;
}

.tpe-bar-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.8);
}

@keyframes tpe-bar-fill-animate {
  from {
    width: 0;
  }
}

.tpe-empty-state {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
  font-size: 0.875rem;
}

/* Scrollbar personalizada para o container de áreas */
.tpe-areas-chart::-webkit-scrollbar {
  width: 6px;
}

.tpe-areas-chart::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.tpe-areas-chart::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.tpe-areas-chart::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Card de Reservas da Semana */
.tpe-card-reservations .tpe-stats-row {
  gap: 0.75rem;
}

.tpe-card-reservations .tpe-stat-item {
  flex: 1;
}

/* Card Footer - Data da Última Importação */
.tpe-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.tpe-import-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.tpe-import-date-label {
  font-weight: 500;
  color: #9ca3af;
}

.tpe-import-date-value {
  font-weight: 600;
  color: #374151;
}

/* ==========================================================
   TPE — Support Dashboard Accordion
   ========================================================== */

.tpe-support-accordion {
  margin-top: 2rem;
  margin-bottom: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tpe-accordion-item {
  border-bottom: 1px solid #e5e7eb;
}

.tpe-accordion-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.tpe-accordion-header {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.tpe-accordion-header:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.tpe-accordion-header:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.tpe-accordion-header[aria-expanded="true"] {
  background: #eff6ff;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

.tpe-accordion-title {
  flex: 1;
  color: #1f2937;
}

.tpe-accordion-icon {
  transition: transform 0.3s ease;
  font-size: 0.875rem;
  color: #6b7280;
  display: inline-block;
}

.tpe-accordion-header[aria-expanded="true"] .tpe-accordion-icon {
  transform: rotate(180deg);
}

.tpe-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  padding: 0;
}

.tpe-accordion-content[aria-hidden="true"] {
  max-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}

/* Remover margins e paddings dos elementos internos quando accordion está fechado */
.tpe-accordion-content[aria-hidden="true"]>* {
  margin: 0;
  padding: 0;
}

.tpe-accordion-content[aria-hidden="false"] {
  max-height: 5000px;
  padding: 1.5rem;
}

.tpe-support-users-content,
.tpe-support-petitions-content {
  padding: 0;
}

.tpe-data-scroll {
  overflow-x: auto;
  margin: 1rem 0;
}

.tpe-support-users__filters,
.tpe-support-petitions__filters {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 4px;
}

.tpe-support-users__filters p,
.tpe-support-petitions__filters p {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.tpe-support-users__filters label,
.tpe-support-petitions__filters label {
  font-weight: 600;
  min-width: 100px;
}

.tpe-support-users__filters input[type="text"],
.tpe-support-petitions__filters input[type="text"],
.tpe-support-petitions__filters select {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.tpe-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
}

.tpe-pagination-info {
  color: #6b7280;
  font-size: 0.875rem;
}

.button-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Links de ordenação */
.tpe-sort-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tpe-sort-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Badges de status */
.tpe-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tpe-status-badge--nova {
  background: #dbeafe;
  color: #1e40af;
}

.tpe-status-badge--atualizada {
  background: #fef3c7;
  color: #92400e;
}

.tpe-status-badge--sem-status {
  background: #f3f4f6;
  color: #6b7280;
}

@media (max-width: 768px) {
  .tpe-support-accordion {
    margin-top: 1rem;
  }

  .tpe-accordion-header {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
  }

  .tpe-accordion-content[aria-hidden="false"] {
    padding: 1rem;
  }

  .tpe-support-users__filters p,
  .tpe-support-petitions__filters p {
    flex-direction: column;
    align-items: stretch;
  }

  .tpe-support-users__filters label,
  .tpe-support-petitions__filters label {
    min-width: auto;
  }

  .tpe-support-users__filters input[type="text"],
  .tpe-support-petitions__filters input[type="text"],
  .tpe-support-petitions__filters select {
    min-width: auto;
    width: 100%;
  }
}

/* ==========================================================
   Estilos para Modais - Responsivo Mobile
   ========================================================== */

/* Estilos base para modais */
.modal.tpe-modal-base {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  top: var(--global-sticky-offset, 0px) !important;
  z-index: 10000 !important;
  width: 100% !important;
  height: calc(100% - var(--global-sticky-offset, 0px)) !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
  /* Centralização com flexbox */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* Garantir que modal não seja afetado por containers isolados */
  contain: none !important;
  isolation: isolate;
}

.modal.tpe-modal-base[aria-hidden="false"],
.modal.tpe-modal-base.show {
  display: flex !important;
}

.modal-content.tpe-modal-content {
  background-color: #fff;
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  max-width: 600px;
  position: relative;
  min-height: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-content.tpe-modal-content .modal-drag-handle {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-content.tpe-modal-content .modal-drag-handle h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.modal-content.tpe-modal-content .modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(90vh - 80px);
}

.modal.tpe-modal-base .close.tpe-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal.tpe-modal-base .close.tpe-modal-close:hover,
.modal.tpe-modal-base .close.tpe-modal-close:focus {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}

/* Modais de suporte */
.tpe-support-modal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  top: var(--global-sticky-offset, 0px) !important;
  z-index: 10000 !important;
  width: 100% !important;
  height: calc(100% - var(--global-sticky-offset, 0px)) !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  /* Centralização com flexbox */
  align-items: center;
  justify-content: center;
  /* Garantir que modal não seja afetado por containers isolados */
  contain: none !important;
  isolation: isolate;
}

.tpe-support-modal.show {
  display: flex;
}

.tpe-support-modal-content {
  background-color: #fff;
  margin: 0;
  padding: 1.5rem;
  border: none;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-sizing: border-box;
  min-height: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.tpe-support-modal-content h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.tpe-support-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tpe-support-modal-close:hover,
.tpe-support-modal-close:focus {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}

/* Media queries para mobile */
@media (min-width: 769px) {
  .modal.tpe-modal-base {
    padding: 2rem 1.5rem;
  }

  .modal-content.tpe-modal-content {
    margin: 0;
    min-height: auto;
    max-height: 90vh;
    border-radius: 0.75rem;
    overflow: hidden;
  }

  .modal-content.tpe-modal-content .modal-drag-handle {
    position: relative;
    top: auto;
  }

  .modal-content.tpe-modal-content .modal-body {
    max-height: calc(90vh - 80px);
  }

  .tpe-support-modal {
    padding: 2rem 1.5rem;
  }

  .tpe-support-modal-content {
    margin: 0;
    min-height: auto;
    max-height: 90vh;
    border-radius: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  .modal.tpe-modal-base {
    padding: 1rem;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-content.tpe-modal-content {
    max-width: 100%;
    border-radius: 0.75rem;
    min-height: auto;
    max-height: 90vh;
    width: 100%;
  }

  .modal-content.tpe-modal-content .modal-drag-handle {
    padding: 1rem 1.25rem;
  }

  .modal-content.tpe-modal-content .modal-drag-handle h2 {
    font-size: 1.125rem;
  }

  .modal-content.tpe-modal-content .modal-body {
    padding: 1.25rem;
    max-height: calc(90vh - 80px);
  }

  .tpe-support-modal {
    padding: 1rem;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tpe-support-modal-content {
    max-width: 100%;
    border-radius: 0.75rem;
    padding: 1.25rem;
    min-height: auto;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
  }

  .tpe-support-modal-content h2 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }

  /* Garantir que inputs e selects ocupem 100% da largura em mobile */
  .modal-body input[type="text"],
  .modal-body input[type="email"],
  .modal-body input[type="tel"],
  .modal-body input[type="password"],
  .modal-body select,
  .modal-body textarea,
  .tpe-support-modal-content input[type="text"],
  .tpe-support-modal-content input[type="email"],
  .tpe-support-modal-content input[type="tel"],
  .tpe-support-modal-content input[type="password"],
  .tpe-support-modal-content select,
  .tpe-support-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Ajustar botões em mobile */
  .modal-body .button,
  .modal-body button[type="submit"],
  .modal-body .tpe-button-primary,
  .modal-body .tpe-button-secondary,
  .tpe-support-modal-content .button,
  .tpe-support-modal-content button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Label Pendente na escala */
.ep-pendente-label {
  color: #d63638;
  display: block;
  font-size: 0.85em;
  margin-top: 2px;
  font-weight: bold;
  text-transform: uppercase;
}

/* ==========================================================
   TPE — Relatórios (shortcode [tpe_relatorios])
   ========================================================== */
.tpe-relatorios-frontend {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tpe-relatorios-list-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.tpe-relatorios-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tpe-relatorio-item {
  margin: 0;
}

.tpe-relatorio-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0b1f3c;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.tpe-relatorio-link:hover,
.tpe-relatorio-link:focus-visible {
  background: #eff6ff;
  border-color: #0a6bff;
  color: #0a6bff;
}

.tpe-relatorio-item--current .tpe-relatorio-link {
  background: #eff6ff;
  border-color: #0a6bff;
  color: #0a6bff;
}

.tpe-relatorio-desc {
  display: block;
  margin-top: 0.25rem;
  margin-left: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}

.tpe-relatorios-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.tpe-relatorios-content {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.tpe-relatorios-content-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}