/* ARQUIVO: C:\portal_iph\static\css\style.css */
/* AÇÃO: Substituir TODO o conteúdo por este CSS. */

/* =============== VARIÁVEIS =============== */
:root {
  --verde-claro: #98c379;
  --verde-escuro: #135c2c;
  --cinza-fundo: #f5f7fa;
  --cinza-borda: #dedede;
  --texto-base: #222222;
  --azul-link: #0d6efd;
  --amarelo: #ffc107;
}

/* =============== GLOBAL =============== */
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--cinza-fundo);
  color: var(--texto-base);
  -moz-appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* =============== AGENDA DA SEMANA =============== */
.agenda-day-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.agenda-day-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
  border-color: var(--azul-link);
}

.agenda-day-icon {
  transition: transform 0.3s ease;
}

.agenda-day-card:hover .agenda-day-icon {
  transform: scale(1.1);
}

.agenda-day-card h6 {
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

@media (max-width: 767.98px) {
  .agenda-day-card h6 {
    font-size: 0.85rem;
  }
}

a {
  text-decoration: none;
}

/* MAIN */
.iph-main {
  max-width: 1200px;
  margin: 0 auto;
}

/* =============== NAVBAR =============== */
.iph-navbar {
  background: linear-gradient(90deg, var(--verde-escuro), #0b2f4a);
  min-height: 64px;
}

.iph-navbar .nav-link {
  color: #e4f9ea !important;
  font-weight: 500;
}

.iph-navbar .nav-link:hover {
  color: #ffffff !important;
}

/* =============== CARDS GENÉRICOS =============== */
.iph-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--cinza-borda);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* =============== BANNER =============== */
.iph-banner-wrapper {
  overflow: hidden;
}

.iph-banner-img {
  width: 100%;
  height: 430px;
  /* antes era 430px */
  object-fit: cover;
  display: block;
}

/* =============== SIDEBAR =============== */
.iph-sidebar {
  font-size: 0.95rem;
}

.iph-sidebar-list {
  padding-left: 0;
}

.iph-sidebar-link {
  display: block;
  padding: 0.25rem 0;
  color: #444444;
}

.iph-sidebar-link:hover {
  color: var(--verde-escuro);
}

/* Nossos Pastores embaixo da sidebar */
.iph-pastores-card {
  background: #ffffff;
  border-radius: 10px;
  margin-top: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  border: none;
  /* sem borda, como você pediu */
}

/* =============== PASTORES / ANIVERSARIOS =============== */
.iph-pastor-item {
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

.iph-pastor-foto {
  width: 42px;
  height: 42px;
  object-fit: cover;
}

.iph-aniver-foto {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
}

/* =============== DEVOCIONAL =============== */
.iph-devocional {
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Duas colunas automáticas em telas grandes */
/* .iph-devocional-cols {
  column-count: 2;
  column-gap: 2rem;
} */

.iph-devocional-single p {
  margin-bottom: 0.9rem;
  text-align: justify;
}

.iph-devocional-cols p {
  margin-bottom: 0.9rem;
  text-align: justify;
}

/* =============== FOOTER =============== */
.iph-footer {
  background: #ffffff;
  border-top: 1px solid var(--cinza-borda);
}

/* =============== RESPONSIVO =============== */
@media (max-width: 991.98px) {
  .iph-banner-img {
    height: 260px;
  }

  .iph-devocional-cols {
    column-count: 1;
  }
}

@media (max-width: 767.98px) {
  .iph-main {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .iph-banner-img {
    height: 220px;
  }
}

/* PAINEL ADMIN */
.admin-wrapper {
  min-height: 80vh;
}

/* Sidebar */
.admin-sidebar {
  width: 230px;
  background: #2c3e50;
  color: white;
  border-radius: 8px;
}

.admin-sidebar .admin-menu li {
  margin-bottom: 6px;
}

.admin-sidebar .admin-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: #dcdcdc;
  font-size: 0.9rem;
}

.admin-sidebar .admin-menu a:hover,
.admin-sidebar .admin-menu a.active {
  background: #1abc9c;
  color: white;
}

/* Cards */
.admin-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}


/* ========= AVATAR NAVBAR (40x40) ========= */
.iph-nav-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.15) !important;
  flex: 0 0 auto !important;
  border: 2px solid var(--verde-claro);
  box-shadow: 0 0 0 2px rgba(152, 195, 121, 0.25);
}

.iph-nav-avatar:hover {
  border-color: #b6e3c4;
  /* verde um pouco mais claro */
}

.iph-nav-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Avatar pequeno do perfil (estilo img2) */
.iph-avatar-box {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  cursor: pointer;
  flex: 0 0 auto;
}

.iph-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ========= AVATAR PERFIL/SIGNUP (160x180) ========= */
.iph-file-hidden {
  display: none !important;
}

.iph-avatar-picker {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

/* Avatar do perfil */
.iph-avatar-circle {
  width: 160px;
  height: 180px;
  border-radius: 12px;
  /* retangular elegante */
  border: 2px dashed #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  overflow: hidden;
  border: 2px solid var(--verde-claro);
  /* borda verde clara */
  box-sizing: border-box;
}


/* Imagem dentro do avatar */
.iph-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iph-avatar-circle i {
  font-size: 28px;
  color: #6c757d;
}

/* Opcional: hover indicando que é clicável */
.iph-avatar-picker:hover .iph-avatar-circle {
  border-color: #7fbf9b;
  /* verde um pouco mais escuro */
}

/* #cropperImage {
  max-width: 100%;
} */

.iph-avatar-rect {
  width: 160px;
  height: 180px;
  border-radius: 12px;
  border: 2px dashed #6c757d;
  background: #e9ecef;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iph-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iph-avatar-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 22px;
}

.iph-avatar-cam {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.iph-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  color: #fff;
  font-size: 24px;
}

.iph-avatar-rect:hover .iph-avatar-overlay {
  opacity: 1;
}

/* “Nossos Pastores” no mobile: joga texto pra baixo */
@media (max-width: 768px) {
  .iph-pastor-item {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
  }

  .iph-pastor-item .iph-pastor-foto {
    margin-right: 0 !important;
    margin-bottom: 8px;
    width: 60px;
    height: 60px;
  }
}

/* dots online/offline */
.iph-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.iph-dot-online {
  background: #28a745;
}

.iph-dot-offline {
  background: #fd7e14;
}

.iph-auth-card {
  border-radius: 16px;
}

.iph-title {
  color: var(--verde-escuro);
}

.iph-btn-primary {
  background: var(--verde-escuro);
  border: 1px solid var(--verde-escuro);
  color: #fff;
  border-radius: 10px;
}

.iph-btn-primary:hover {
  filter: brightness(0.95);
  color: #fff;
}

/* uploader de foto */
.iph-avatar-uploader {
  width: 100%;
  max-width: 220px;
}

.iph-avatar-frame {
  width: 160px;
  height: 180px;
  border-radius: 14px;
  border: 2px dashed rgba(19, 92, 44, 0.45);
  background: #eef3ef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: 0.15s ease;
}

.iph-avatar-frame:hover {
  border-color: rgba(19, 92, 44, 0.85);
  transform: translateY(-1px);
}

.iph-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iph-avatar-placeholder {
  text-align: center;
  color: rgba(0, 0, 0, 0.55);
}

.iph-avatar-placeholder i {
  font-size: 28px;
  color: rgba(19, 92, 44, 0.75);
}

/* inputs mais "premium" sem brigar com bootstrap */
.iph-auth-card .form-control,
.iph-auth-card input,
.iph-auth-card select,
.iph-auth-card textarea {
  border-radius: 10px;
}

.iph-auth-card .form-control:focus,
.iph-auth-card input:focus,
.iph-auth-card select:focus,
.iph-auth-card textarea:focus {
  border-color: rgba(19, 92, 44, 0.55);
  box-shadow: 0 0 0 .25rem rgba(19, 92, 44, 0.15);
}

/* ===== LOGIN (split layout moderno) ===== */
.iph-auth-wrap {
  min-height: calc(100vh - 64px);
  /* desconta a navbar */
  display: flex;
  align-items: center;
}

.iph-auth-shell {
  border-radius: 18px;
}

.iph-auth-title {
  color: var(--verde-escuro);
}

.iph-auth-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(19, 92, 44, 0.12);
  color: var(--verde-escuro);
}

.iph-auth-hero {
  background: linear-gradient(135deg, var(--verde-escuro), #0b2f4a);
  position: relative;
  overflow: hidden;
}

.iph-auth-hero::after {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
}

.iph-auth-hero-inner {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.iph-auth-illustration {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.iph-auth-illustration img {
  max-width: 92%;
  height: auto;
  display: block;
  border-radius: 18px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.20));
}

/* Botão primário na paleta */
.iph-btn-primary {
  background: var(--verde-escuro);
  border: 1px solid var(--verde-escuro);
  color: #fff;
  border-radius: 10px;
}

.iph-btn-primary:hover {
  filter: brightness(0.95);
  color: #fff;
}

/* Responsivo: no mobile a ilustração vai pra baixo e fica menor */
@media (max-width: 991.98px) {
  .iph-auth-wrap {
    min-height: auto;
  }

  .iph-auth-hero-inner {
    min-height: auto;
  }

  .iph-auth-illustration img {
    max-width: 100%;
  }
}

/* ===== LOGIN – identidade da igreja ===== */

.iph-login-church {
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}

.iph-login-slogan {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* navbar: layout controlado */
.iph-nav-wrap {
  display: flex;
  align-items: center;
}

/* garante que o botão fica clicável em cima de tudo */
.iph-nav-toggle {
  position: relative;
  z-index: 2;
}

/* MOBILE: centraliza o brand de verdade */
@media (max-width: 576px) {
  .iph-nav-wrap {
    position: relative;
    min-height: 64px;
  }

  .iph-nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 !important;
    white-space: nowrap;
    text-align: center;
  }

  /* evita que o brand “brigue” com o toggler */
  .iph-nav-brand i {
    margin-right: 8px;
  }
}

@media (max-width: 576px) {

  /* navbar com altura consistente */
  .iph-navbar {
    min-height: 64px;
  }

  .iph-nav-wrap {
    position: relative;
    min-height: 64px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* botão sanduíche: alinhado no centro vertical e com área menor */
  .iph-nav-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
    padding: 6px 8px !important;
    line-height: 1 !important;
    z-index: 3;
  }

  /* brand centralizado e sem colidir com o toggler */
  .iph-nav-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    padding: 0 !important;
    max-width: calc(100% - 120px);
    /* sobra espaço para botão/ícones */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
  }

  /* opcional: deixa o texto um tiquinho menor no iPhone */
  .iph-nav-brand {
    font-size: 1.05rem;
  }
}

/* ===== MENU MOBILE: header interno com logo + texto central ===== */
.iph-mobile-menu-header {
  text-align: center;
  padding: 14px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 10px;
}

.iph-mobile-menu-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.iph-mobile-menu-title {
  color: #fff;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.4px;
  font-size: 1.2rem;
}

/* quando o menu abrir no mobile, esconde o brand do topo
   (evita ficar por cima do menu como na img2) */
@media (max-width: 576px) {

  .navbar-collapse.show~.iph-nav-brand,
  .navbar-collapse.show+.iph-nav-brand {
    display: none !important;
  }

  /* como o brand está fora do collapse, usamos seletor direto pelo id do collapse */
  #navbarMain.show~.iph-nav-brand {
    display: none !important;
  }

  /* fallback (mais seguro): esconder o brand quando o collapse estiver aberto */
  .iph-nav-wrap:has(#navbarMain.show) .iph-nav-brand {
    display: none !important;
  }

  /* melhora aparência do menu aberto */
  #navbarMain {
    background: linear-gradient(90deg, var(--verde-escuro), #0b2f4a);
    padding: 10px 12px 14px;
    border-radius: 0 0 14px 14px;
  }

  #navbarMain .nav-link {
    padding: 10px 6px;
    font-size: 1.05rem;
  }
}

@media (max-width: 576px) {

  /* quando o menu estiver aberto */
  #navbarMain.show {
    position: relative;
  }

  /* joga o botão sanduíche para o canto superior esquerdo do painel aberto */
  .iph-nav-wrap:has(#navbarMain.show) .iph-nav-toggle {
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    transform: none !important;
    z-index: 10 !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.10) !important;
  }

  .iph-nav-wrap:has(#navbarMain.show) .iph-nav-toggle:focus {
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, 0.18) !important;
  }
}

@media (max-width: 576px) {
  .iph-mobile-menu-header {
    padding-top: 20px;
    /* cria espaço para o botão */
  }
}

/* caminho: C:\portal_iph\static\css\style.css
   ação: COLE ESTE BLOCO NO FINAL do arquivo */

/* estado do menu aberto no mobile */
@media (max-width: 576px) {

  /* garante que o collapse não “tampa” o botão */
  #navbarMain.show {
    position: relative;
  }

  /* quando a navbar estiver com classe "iph-menu-open", reposiciona o toggler */
  .iph-menu-open .iph-nav-toggle {
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    transform: none !important;
    z-index: 9999 !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.10) !important;
  }

  /* dá espaço pro header do menu não colar no botão */
  .iph-menu-open .iph-mobile-menu-header {
    padding-top: 24px !important;
  }
}

/* caminho: C:\portal_iph\static\css\style.css
   ação: COLE ESTE BLOCO NO FINAL */

.section-title {
  font-weight: bold;
  color: var(--azul-link);
  margin-bottom: 12px;
}

.pending-label {
  color: #dc3545 !important;
  font-weight: 600;
}

.required-label::after {
  content: " *";
  color: #dc3545;
}

.photo-upload {
  width: 140px;
  height: 140px;
  background: #e9ecef;
  border-radius: 8px;
  border: 2px dashed #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 10px;
  overflow: hidden;
}

.photo-upload:hover {
  background: #dee2e6;
}

/* =============== NOTIFICAÇÕES TOAST =============== */
.toast-container {
  z-index: 9999;
}

.toast {
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

.toast.hide {
  animation: slideOutRight 0.3s ease-in;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-body {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
}

.toast .btn-close {
  font-size: 0.75rem;
}

/* Cores específicas para cada tipo de mensagem */
.toast.bg-success {
  background-color: #28a745 !important;
}

.toast.bg-danger {
  background-color: #dc3545 !important;
}

.toast.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.toast.bg-warning .btn-close {
  filter: invert(1);
}

.toast.bg-info {
  background-color: #17a2b8 !important;
}