/* =========================
   RESET + BASE
   Last updated: 2026-01-25 - sidebar fix v2
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* =========================
   NAVBAR
========================= */
.navbar {
  background: linear-gradient(135deg, #0b2239 0%, #1a3f52 50%, #2d5a73 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 26px;
  height: 70px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar .menu {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.navbar .menu a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 10px 6px;
  position: relative;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.navbar .menu a:hover{ 
  color: #fff; 
  transform: translateY(-2px);
  text-shadow: 0 2px 8px rgba(255,255,255,0.3);
}

/* sublinhado no item ativo (ex: "INICIO") */
.navbar .menu a.active::after{
  content:"";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 999px;
}

/* Ícone do hambúrguer */
.navbar .menu .icon {
  display: none;
  color: rgba(255,255,255,.88);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
}

/* logo da empresa contas à vida */
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img{
  height: 50px;
  width: auto;
}

.name{
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
}


/* === MENU FULLSCREEN OVERLAY === */
.overlay{
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.92);
  overflow-x: hidden;
  transition: 0.5s;
}

.overlay-content{
  position: relative;
  top: 25%;
  width: 100%;
  text-align: center;
}

.overlay a{
  padding: 12px;
  text-decoration: none;
  font-size: 36px;
  color: #888;
  display: block;
  transition: 0.3s;
}

.overlay a:hover{
  color: #fff;
}

.overlay .closebtn{
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 60px;
}

/* Ajustes de telemovel */
@media (max-height: 450px){
  .overlay a{ font-size: 22px; }
  .overlay .closebtn{
    font-size: 40px;
    top: 15px;
    right: 25px;
  }
}



/* =========================
   HERO (imagem + texto por cima)
========================= */
.hero{
  position: relative;
  height: 420px;
  background: #cbd3da;
  background-image: url("../imagens/Inicio/Equipa.png");
  background-size: cover;
  background-position: center;
}

/* overlay suave para dar contraste ao texto */
.hero::before{
  content:"";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(11,34,57,.65) 0%, rgba(26,63,82,.35) 45%, rgba(0,0,0,0) 75%);
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-overlay {
  display: none;
}

/* bloco do texto à esquerda */
.hero .hero-content{
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-55%);
  max-width: 420px;
  color: rgba(255,255,255,.95);
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px) translateY(-55%);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(-55%);
  }
}

.hero h1{
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 2px 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  font-weight: 900;
}

.hero p{
  font-size: 14px;
  line-height: 1.6;
  opacity: .90;
  max-width: 360px;
}

/* botão “Sobre Nós" azul e as letras brancas */
.hero .btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 14px;
  padding: 6px 16px !important;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px !important;
  line-height: 1.2 !important;
  letter-spacing: .02em;
  text-align: center !important;
  color: #fff;
  background: #2e87c6;
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.18);
}

.hero .btn:hover{ filter: brightness(1.07); }

/* =========================
   SECÇÃO AZUL CLARA (serviços + why)
========================= */
.content{
  background: linear-gradient(180deg, #e8f4f8 0%, #d4e9f2 50%, #c8dfe8 100%);
  border-top: 1px solid rgba(15, 15, 15, 0.08);
  padding: 40px 26px 40px;
  width: 100%;
}

/* Título centrado */
.section-title{
  text-align: center;
  font-weight: 900;
  letter-spacing: .16em;
  color: rgba(15,27,36,.75);
  text-transform: uppercase;
  font-size: 20px;
  margin: 10px 0 18px;
}

/* cards de serviços */
.cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  justify-items: center;
  margin: 0 auto;
  padding: 6px 0 18px;
  max-width: 860px;
}

.card{
  width: 100%;
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px 24px;
  text-align: center;
  border: 1px solid rgba(11,34,57,.08);
  box-shadow: 0 4px 15px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  transition: all 0.4s ease;
  transform: translateY(0);
  animation: cardFadeIn 0.6s ease-out backwards;
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho sutil no canto */
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(46,135,198,.05),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.card:hover::before {
  top: 100%;
  right: 100%;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 16px 40px rgba(46,135,198,.18), 0 8px 20px rgba(0,0,0,.1);
  border-color: rgba(46,135,198,.25);
}

/* Container do conteúdo do card */
.card .card-content {
  position: relative;
  z-index: 1;
}

/* Divisor decorativo */
.card-divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2e87c6, transparent);
  margin: 10px auto 14px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.card:hover .card-divider {
  width: 60px;
  background: linear-gradient(90deg, #2e87c6, #1a5a8e, #2e87c6);
  box-shadow: 0 2px 8px rgba(46,135,198,.3);
}

.card .servico-lista{
  text-align: left;
}


.card .icon{
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(46,135,198,.1), rgba(26,90,142,.15));
  border: 2px solid rgba(46,135,198,.2);
  color: rgba(13,45,69,.85);
  font-size: 26px;
  transition: all 0.4s ease;
  position: relative;
  box-shadow: 0 4px 12px rgba(46,135,198,.1);
}

.card:hover .icon {
  background: linear-gradient(135deg, rgba(46,135,198,.2), rgba(26,90,142,.25));
  transform: scale(1.15) rotate(-8deg);
  border-color: rgba(46,135,198,.4);
  box-shadow: 0 8px 20px rgba(46,135,198,.25);
}

.card .icon img{
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
  transition: filter 0.3s ease;
}

.card:hover .icon img {
  filter: drop-shadow(0 4px 8px rgba(46,135,198,.3));
}

.card h3{
  font-size: 16px;
  font-weight: 800;
  color: rgba(11,34,57,.88);
  margin-bottom: 0;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  text-transform: uppercase;
  position: relative;
}

/* =========================
   TOPBAR (quando incluído pelo sidebar Contabilista)
   Adiciona padding ao body para evitar sobreposição do conteúdo
========================= */


body.has-topbar{
  padding-top: 64px; /* espaço reservado para o topbar fixo */
}

@media (max-width:480px){
  body.has-topbar{ padding-top: 54px; }
  .site-topbar .top-logo{ height:36px !important; }
}


.card:hover h3 {
  color: #2e87c6;
  letter-spacing: 0.04em;
  transform: scale(1.02);
}

.card p{
  font-size: 14px;
  color: rgba(15,27,36,.68);
  line-height: 1.6;
  transition: all 0.3s ease;
  margin: 0;
}

.card:hover p {
  color: rgba(15,27,36,.82);
}

.card .servico-desc{
  text-align: center;
}



/*Bloco botão de *ver todos os serviços*/
.servico-cta{
  max-width: 860px;
  margin: 26px auto 60px;
  padding: 26px;
  border-radius: 22px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.servico-cta h2{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(15,27,36,.75);
  margin-bottom: 10px;
}

.servico-cta p{
  font-size: 14px;
  color: rgba(15,27,36,.65);
  margin-bottom: 18px;
}

.servico-cta .btn-servicos{
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e87c6, #1a5a8e);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(46,135,198,.25), 0 4px 10px rgba(0,0,0,.12);
  transition: all 0.3s ease;
  transform: translateY(0);
}

.servico-cta .btn-servicos:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(46,135,198,.35), 0 6px 15px rgba(0,0,0,.15);
  background: linear-gradient(135deg, #3a9de0, #2068a5);
}

/*Fim do bloco botão de serviços*/


/*bloco relativo as listas dos diversos serviços*/
.servico{
  width: 100%;
  background: var(--card);
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-soft);
  text-align: center; 
}

.servico h3{
  font-size: 13px;                 
  font-weight: 800;
  color: rgba(15,27,36,.8);
  margin-bottom: 6px;
}

.servico p{
  font-size: 11px;                 
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.45;
  margin-bottom: 10px;
}


.servico-lista{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.servico-lista li{
  font-size: 11px;                 
  color: rgba(15, 15, 15, 0.55);
  line-height: 1.45;
  padding-left: 16px;
  position: relative;
}

.card .servico-lista li{
  color: #000;
}

.servico-lista li::before{
  content: "•";
  position: absolute;
  left: 0;
  color: rgba(13,45,69,.85); 
}

/* bloco “POR QUE NOS ESCOLHER?” */
.why{
  max-width: 860px;
  margin: 10px auto 6px;
  text-align: center;
  padding-top: 6px;
}

.why h2{
  margin-top: 10px;
  font-size: 24px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(15,27,36,.72);
  font-weight: 900;
}

.why ul{
  list-style: none;
  margin-top: 10px;
  display: grid;
  gap: 8px;
  justify-content: center;
}

.why li{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: rgba(15,27,36,.65);
}

/* “mini ícones” (podes trocar por SVG/FontAwesome) */
.why li::before{
  content: "✓";
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
  color: rgba(13,45,69,.75);
  font-weight: 900;
}

/* =========================
   CTA – QUER CONTACTAR-NOS?
========================= */
.contacto-cta{
  max-width: 860px;
  margin: 30px auto 10px;
  padding: 35px 30px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, rgba(46,135,198,.08), rgba(26,90,142,.12));
  border: 1px solid rgba(46,135,198,.15);
  box-shadow: 0 6px 20px rgba(46,135,198,.1);
  animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.contacto-cta h2{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(11,34,57,.85);
  margin-bottom: 18px;
  text-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.contacto-cta p{
  font-size: 15px;
  color: rgba(15,27,36,.7);
  margin-bottom: 18px;
}

/* BOTÃO */
.contacto-cta .btn-contacto{
  display: inline-block;
  padding: 14px 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e87c6, #1a5a8e);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(46,135,198,.3), 0 4px 10px rgba(0,0,0,.15);
  transition: all 0.3s ease;
  transform: translateY(0);
  border: 1px solid rgba(255,255,255,.2);
}

.contacto-cta .btn-contacto:hover{
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(46,135,198,.4), 0 6px 15px rgba(0,0,0,.2);
  background: linear-gradient(135deg, #3a9de0, #2068a5);
}


/* =========================
   FOOTER (escuro, 3 colunas)
========================= */
.footer{
  background: linear-gradient(135deg, #2a2d31 0%, #3c3f44 50%, #4a4d52 100%);
  color: rgba(255,255,255,.85);
  padding: 40px 26px 20px;
  margin: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(46,135,198,.5), 
    transparent
  );
}

.footer .footer-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 70px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 0;
}

.footer .footer-grid > div {
  animation: slideInUp 0.6s ease-out backwards;
}

.footer .footer-grid > div:nth-child(1) { animation-delay: 0.1s; }
.footer .footer-grid > div:nth-child(2) { animation-delay: 0.2s; margin-top: 3px; }
.footer .footer-grid > div:nth-child(3) { animation-delay: 0.3s; margin-top: 3px; }
.footer .footer-grid > div:nth-child(4) { animation-delay: 0.4s; margin-top: 3px; }

.footer .footer-grid > div:last-child{
  text-align: center;
}

.footer h4{
  font-size: 15px;
  letter-spacing: .06em;
  margin-bottom: 18px;
  color: rgba(255,255,255,.95);
  font-weight: 800;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 10px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: linear-gradient(90deg, #2e87c6, #1a5a8e);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.footer h4:hover {
  color: #3a9de0;
}

.footer h4:hover::after {
  width: 100%;
}

.footer p, .footer a{
  font-size: 13px;
  color: rgba(255,255,255,.75);
  line-height: 2;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a {
  position: relative;
  padding-bottom: 2px;
}

.footer a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #2e87c6;
  transition: width 0.3s ease;
}

.footer a:hover{ 
  color: #3a9de0;
  transform: translateX(3px);
}

.footer a:hover::after {
  width: 100%;
}

.footer-brand {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: -20px;
  padding-top: 0;
}

.footer-brand a {
  display: inline-block;
  position: relative;
  margin-bottom: 10px;
  margin-top: 0;
}

.footer-brand .logo-img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
  display: block;
  line-height: 1;
}

.footer-brand a:hover .logo-img {
  transform: scale(1.05);
  /* Tint towards blue on hover for footer logos */
  filter: hue-rotate(180deg) saturate(1.6) brightness(0.95);
}

.footer .footer-grid > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.footer .footer-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.footer .footer-brand .mark{
  font-weight: 900;
  font-size: 38px;
  opacity: .9;
}

.footer .footer-grid > div:first-child p {
  margin-top: 10px;
  color: rgba(255,255,255,.68);
  line-height: 1.7;
}

.footer .social{
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.footer .social a{
  width: 40px; 
  height: 40px;
  border-radius: 50%;
  display: grid; 
  place-items: center;
  background: linear-gradient(135deg, rgba(46,135,198,.15), rgba(26,90,142,.2));
  border: 1.5px solid rgba(46,135,198,.3);
  transition: all 0.3s ease;
  transform: translateY(0);
  font-weight: 800;
  color: rgba(255,255,255,.8);
  font-size: 14px;
}

.footer .social a:hover {
  background: linear-gradient(135deg, #2e87c6, #1a5a8e);
  transform: translateY(-5px) scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(46,135,198,.4);
  color: #fff;
  border-color: #2e87c6;
}

.footer .bottom{
  margin-top: 30px;
  padding: 20px 0 10px;
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  animation: fadeIn 0.8s ease-out 0.5s backwards;
}

.footer .bottom a {
  color: rgba(255,255,255,.85);
  transition: all 0.3s ease;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.3);
  padding-bottom: 1px;
}

.footer .bottom a:hover {
  color: #3a9de0;
  border-bottom-color: #3a9de0;
}



/* =========================
   RESPONSIVO
========================= */
@media (max-width: 920px){
  .hero { height: 380px; }
  .hero .hero-content{ left: 26px; right: 26px; max-width: 520px; }
  .cards{ grid-template-columns: 1fr; max-width: 520px; }
  .footer .footer-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .navbar{ padding: 0 16px; height: auto; padding-top: 14px; padding-bottom: 14px; }
  .navbar .menu{ flex-direction: column; gap: 12px; position: relative; }
  .navbar .menu a:not(.icon){ display: none; }
  .navbar .menu .icon{ display: block; float: right; }
  .navbar .menu.responsive a:not(.icon){ display: block; }
  .navbar .menu.responsive{ flex-direction: column; }
  .hero h1{ font-size: 26px; }
}





/* =========================
   Página dos Serviços
========================= */

/* Container geral dos serviços */
.servicos-detalhe{
  max-width: 980px;     /* limita a largura para não ficar “espalhado” */
  margin: 40px auto;    /* centra o bloco e dá espaço em cima/baixo */
  padding: 0 26px;      /* espaço lateral para não colar às bordas */
  display: grid;        /* permite espaçamento vertical fácil */
  gap: 40px;            /* distância entre cada serviço */
}

/* Cada “linha” de serviço (imagem + texto) */
.servico-item{
  display: flex;        /* coloca imagem e texto lado a lado */
  align-items: center;  /* alinha verticalmente ao centro */
  gap: 40px;            /* espaço entre imagem e texto */
}

/* Área da imagem */
.servico-imagem{
  flex: 0 0 180px;      /* largura fixa da coluna da imagem */
  display: flex;
  justify-content: center;
}

/* A própria imagem */
.servico-imagem img{
  width: 450px;         /* tamanho do ícone/imagem */
  height: auto;         /* mantém proporção */
  object-fit: contain;  /* garante que não “corta” */
}

/* Área do texto */
.servico-texto{
  flex: 1;              /* ocupa o restante espaço disponível */
}

/* Título do serviço */
.servico-texto h2{
  font-size: 23px;
  font-weight: 900;
  margin-bottom: 8px;
  color: rgba(15,27,36,.85);
}

/* Descrição do serviço */
.servico-texto p{
  font-size: 18px;
  line-height: 1.6;
  color: rgba(15,27,36,.65);
  max-width: 520px;     /* evita linhas demasiado compridas */
}

/* Alternar lados: quando tiver a classe "invertido" a imagem passa para a direita e o texto para a esquerda */
.servico-item.invertido{
  flex-direction: row-reverse;
}

/*Serviço Pontos*/

.servico-pontos{
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.servico-pontos li{
  font-size: 16px;
  color: rgba(15,27,36,.65);
  display: flex;
  gap: 8px;
}

.servico-pontos li::before{
  content: "✓";
  color: #2e87c6;
  font-weight: 700;
}




/* =========================
   RESPONSIVO – Serviços
========================= */
@media (max-width: 720px){
  .servico-item,
  .servico-item.invertido{
    flex-direction: column;   /* empilha imagem e texto */
    text-align: center;       /* centra o texto no mobile */
    gap: 18px;                
  }

  /* a imagem deixa de ter “coluna fixa” */
  .servico-imagem{
    flex: none;
  }

  /* permite que o texto use a largura toda no telemovel */
  .servico-texto p{
    max-width: 100%;
  }
}

/* ===========
   SOBRE NÓS — 
===============*/

main.content.sobre .sobre-detalhe {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 26px;
}

/*linha (imagem + texto) centrada*/
main.content.sobre .sobre-detalhe .sobre-item{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  padding: 40px;
  background: rgba(255,255,255,.7);
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  border: 1px solid rgba(11,34,57,.08);
  animation: slideInItem 0.6s ease-out;
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main.content.sobre .sobre-detalhe .sobre-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(46,135,198,.12);
  background: rgba(255,255,255,.9);
  border-color: rgba(46,135,198,.15);
}

/*coluna da imagem maior e centrada*/
main.content.sobre .sobre-detalhe .sobre-item .servico-imagem{
  flex: 0 0 420px;
  max-width: 420px;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(46,135,198,.05), rgba(26,90,142,.08));
  padding: 20px;
  transition: all 0.4s ease;
}

main.content.sobre .sobre-detalhe .sobre-item:hover .servico-imagem {
  background: linear-gradient(135deg, rgba(46,135,198,.1), rgba(26,90,142,.12));
}

main.content.sobre .sobre-detalhe .sobre-item .servico-imagem img {
  transition: transform 0.4s ease;
}

main.content.sobre .sobre-detalhe .sobre-item:hover .servico-imagem img {
  transform: scale(1.05);
}

main.content.sobre .sobre-detalhe .sobre-item .servico-texto {
  flex: 1;
}

main.content.sobre .sobre-detalhe .sobre-item .servico-texto h2 {
  font-size: 28px;
  font-weight: 800;
  color: rgba(11,34,57,.85);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

main.content.sobre .sobre-detalhe .sobre-item .servico-texto p{
  max-width: 650px;
  font-size: 15px;
  color: rgba(15,27,36,.72);
  line-height: 1.8;
}


/*Cartões da Missão e Vissão*/

.cartoes{
  display: grid; /*Organiza os cartões em grelha*/
  grid-template-columns: repeat(2, 1fr); /*Duas colunas de largura igual*/
  gap: 18px; /*Espaçamento entre os cartões*/
  margin: 0 auto; /*Centraliza o bloco*/
  padding: 20px; /*Espaçamento externo*/
}

.cartao{
  background: rgba(255,255,255,0.92); /*Fundo branco semi-transparente*/
  border-radius: 22px; /*Cantos arredondados*/
  padding: 18px; /*Espaçamento interno*/
  text-align: center; /*Centraliza o texto*/
  border: 1px solid rgba(0,0,0,.08); /*Borda suave*/
  box-shadow: 0 10px 25px rgba(0,0,0,.1); /*Sombra suave*/
}

.icon1{
  width: 60px; /*cria um quadrado de 60px de largura*/
  height: 60px; /*cria um quadrado de 60px de altura*/
  margin: 0 auto 10px; /*centraliza o ícone e adiciona margem inferior*/
  border-radius: 14px; /*Cantos arredondados*/
  display: grid; /*Usa grid para centralizar o conteúdo*/
  place-items: center; /*Centraliza o conteúdo do ícone*/
  background: rgba(13,45,69,.06); /*Fundo suave*/
  border: 1px solid rgba(13,45,69,.10); /*Borda suave*/
}

.icon1 img{
  width: 44px; /*Largura da imagem dentro do ícone*/
  height: 44px; /*Altura da imagem dentro do ícone*/
  object-fit: contain; /*Mantém a proporção da imagem*/
  display: block; /*Garante que a imagem é tratada como bloco*/
}

.cartao h3{
  font-size: 16px; /*Tamanho da fonte*/
  font-weight: 900; /*Peso da fonte*/
  letter-spacing: .04em; /*Espaçamento entre letras*/
  color: rgba(15,27,36,.8); /*Cor do texto*/
  margin: 8px 0 10px; /*Margem superior e inferior*/
}

/* Sobre Nós — título mais discreto "Conheça-nos melhor" */
main.content.sobre .section-title{
  font-size: 20px;
  letter-spacing: .12em;
  margin-bottom: 12px;
}

/*Missão e Valores*/
.missao-valores{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 980px;
  margin: 40px auto;
  padding: 20px;
}

/* cada cartão */
.missao-valores .missao{
  background: rgba(255,255,255,0.92);
  border-radius: 22px;
  padding: 28px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 25px rgba(0,0,0,.1);
  display: flex;
  /* stack icon above text and center content */
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* ícone reutilizado (icon1) */
.missao-valores .missao .icon1{
  width: 72px;
  height: 72px;
  margin: 0 0 12px 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13,45,69,.06);
  border: 1px solid rgba(13,45,69,.10);
  flex-shrink: 0;
}

.missao-valores .missao .icon1 img{
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

/* ensure content block is full-width and text centered */
.missao-valores .missao .missao-content{
  width: 100%;
  display: block;
  text-align: center;
}

/* título mesmo por baixo do ícone */
.missao-valores .missao h3{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
  color: rgba(15,27,36,.8);
}

/* texto */
.missao-valores .missao p{
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(15,27,36,.65);
  text-align: justify;
}



/* =========================
   RESPONSIVO – Sobre NÓS
========================= */

/* Telemmovel: empilha e centra */
@media (max-width: 900px){
  main.content.sobre .sobre-detalhe .sobre-item{
    flex-direction: column;
    text-align: center;
  }

  main.content.sobre .sobre-detalhe .sobre-item .servico-imagem{
    flex: none;
    max-width: 100%;
  }

  main.content.sobre .sobre-detalhe .sobre-item .servico-imagem img{
    height: 240px;
  }

  main.content.sobre .sobre-detalhe .sobre-item .servico-texto p{
    max-width: 100%;
  }
}

/*Responsividade dos cartões Missão e Valores*/
@media (max-width: 900px){
  .cartoes{
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}


/* =========================
   Responsivo Missão e Valores
========================= */
@media (max-width: 900px){
  .missao-valores{
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

/* =========================
   ESTILOS PARA PÁGINA DE CONTACTOS
========================= */

.contactos-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.contactos-section h2 {
  font-size: 2.5rem;
  color: var(--navy-1);
  margin-bottom: 40px;
}

.contactos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.contacto-item {
  background: var(--card);
  padding: 30px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.3s ease;
}

.contacto-item:hover {
  transform: translateY(-5px);
}

.contacto-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: var(--ice-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.contacto-item h3 {
  font-size: 1.3rem;
  color: var(--navy-1);
  margin-bottom: 10px;
}

.contacto-item p {
  color: var(--muted);
  line-height: 1.6;
}

/* FORMULÁRIO */
.form-section {
  background: var(--ice-1);
  padding: 60px 20px;
  margin: 40px 0;
}

.form-section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--navy-1);
  margin-bottom: 40px;
}

.contacto-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: var(--navy-1);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--ice-2);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy-1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  background: var(--navy-1);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
}

.btn-submit:hover {
  background: var(--navy-2);
}

/* MAPA */
.mapa-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.mapa-section h2 {
  font-size: 2.5rem;
  color: var(--navy-1);
  margin-bottom: 40px;
}

.mapa-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.mapa-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* RESPONSIVO PARA CONTACTOS */
@media (max-width: 768px) {
  .contactos-section h2,
  .form-section h2,
  .mapa-section h2 {
    font-size: 2rem;
  }

  .contactos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contacto-item {
    padding: 20px 15px;
  }

  .form-section {
    padding: 40px 20px;
  }

  .mapa-container iframe {
    height: 300px;
  }
}



/*=======================
  LOGIN — Cartão central
======================*/

.login-area{
  min-height: calc(100vh - 82px); /* tira a altura da navbar */
  display: grid;
  place-items: center;
  padding: 36px 26px 60px;
  background: linear-gradient(180deg, var(--ice-1), #eef3f6);
}

.login-card{
  width: fit-content;            
  max-width: 560px;              
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.08);
  padding: 28px 30px;            
  text-align: left;
}

.login-card h1{
  font-size: 34px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 10px;
}

.login-card p{
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
}

/* botão principal */
.btn-login{
  display: inline-block;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: #2e87c6; /* já usas isto no site */
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,.16);
}

.btn-login:hover{
  filter: brightness(1.07);
}

/* mobile: card mais confortável */
@media (max-width: 520px){
  .login-card{
    padding: 26px 22px 22px;
    text-align: center;
  }

  .login-card h1{
    font-size: 26px;
  }

  .btn-login{
    width: 100%;
  }
}

/*=======================
  LOGIN — Página dedicada
======================*/

.login-page{
  min-height: calc(100vh - 82px); /* altura total menos navbar */
  display: grid;
  place-items: center;
  padding: 48px 26px 70px;
  background: linear-gradient(180deg, var(--ice-1), #eef3f6);
}

/* cartão do login */
.login-box{
  width: min(420px, 100%);
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,.08);
  padding: 26px 26px 22px;
}

/* título */
.login-box h1{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 18px;
  color: rgba(15,27,36,.88);
}

/* formulário */
.login-form{
  display: grid;
  gap: 14px;
}

/* campo */
.field label{
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15,27,36,.70);
  margin-bottom: 6px;
}

.field input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(13,45,69,.18);
  background: rgba(231,241,255,.55);
  font-size: 14px;
  color: var(--ink);
}

.field input:focus{
  outline: none;
  border-color: rgba(46,135,198,.90);
  box-shadow: 0 0 0 4px rgba(46,135,198,.18);
}

/* botão principal */
.btn-primary{
  margin-top: 6px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy-1), var(--navy-2));
  color: #fff;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,.14);
}

.btn-primary:hover{
  filter: brightness(1.06);
}

/* rodapé do login */
.login-footer{
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}



/* botão cancelar */
.btn-secondary{
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(13,45,69,.25);
  background: rgba(13,45,69,.06);
  color: rgba(15,27,36,.72);
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-secondary:hover{
  background: rgba(13,45,69,.10);
}

/* link */
.login-footer .link{
  color: rgba(13,45,69,.95);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.login-footer .link:hover{
  text-decoration: underline;
}

/* mobile */
@media (max-width: 520px){
  .login-box{
    padding: 22px;
  }

  .login-footer{
    flex-direction: column;
    align-items: stretch;
  }

  .btn-secondary{
    width: 100%;
  }

  .login-footer .link{
    text-align: center;
  }
}


/*========================
Dashboard - Área privada do Contabilista
=========================*/

/* ===== Layout geral ===== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #f8f9fc;
  color: #0b2239;
}

/* ===== Sidebar (legacy - não usar) ===== */
.sidebar {
  display: none;
}

.sidebar h2 {
  font-size: 18px;
  text-align: center;
  margin-bottom: 26px;
  font-weight: 900;
  letter-spacing: .04em;
}

.sidebar a {
  color: #cdd5df;
  text-decoration: none;
  padding: 10px 0;
  display: block;
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ===== Área de Conteúdo (Contabilista) ===== */
body.has-sidebar .content-area {
  background-color: #f8f9fc;
  padding: 30px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  box-sizing: border-box;
  margin-left: 260px;
}

/* ===== Cabeçalho ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 24px;
  color: #0b2239;
}

.header .user {
  font-weight: 700;
  color: #6c757d;
}

/* ===== Botão de adicionar ===== */
.add-btn {
  display: inline-block;
  margin-bottom: 14px;
  background: #2e87c6;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 5px 12px rgba(0,0,0,.15);
}

.add-btn:hover {
  filter: brightness(1.08);
}

/* ===== Tabela ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size: 14px;
}

th {
  background: #e8f0fa;
  font-weight: 800;
  color: #0b2239;
}

tr:hover td {
  background: rgba(46,135,198,.06);
}

/* ===== Links de ações ===== */
.actions a {
  text-decoration: none;
  margin-right: 8px;
  font-weight: 700;
  color: #2e87c6;
}

.actions a:hover {
  text-decoration: underline;
}

/* ===== Rodapé ===== */
footer {
  margin-top: 40px;
  text-align: center;
  color: rgba(15,27,36,.45);
  font-size: 12px;
}



/* ===== ===================
Formulário de Inserção 
=============================== */
.form-card {
  max-width: 600px;
  margin: 50px auto;
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  text-align: center;
}

.form-card h2 {
  font-size: 20px;
  color: var(--navy-1);
  margin-bottom: 20px;
}

.form-card input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

.linha {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.coluna50 {
  flex: 1;
  min-width: 48%;
}

.btnform {
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.btnform.azul {
  background-color: #2e87c6;
  color: #fff;
}

.btnform.azul:hover {
  filter: brightness(1.1);
}

.btnform.cinza {
  background-color: #f1f1f1;
  color: #333;
}

.btnform.cinza:hover {
  background-color: #e3e3e3;
}

.btn-voltar {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  color: #2e87c6;
  font-weight: bold;
  transition: 0.2s;
}

.btn-voltar:hover {
  text-decoration: underline;
}

.botoes {
  justify-content: center;
  margin-top: 10px;
}

/* ===============================
   FORMULÁRIOS (Empresas, Clientes, etc.)
   =============================== */

.formulario {
  background: var(--card, #fff);
  box-shadow: var(--shadow-soft, 0 2px 10px rgba(0,0,0,.1));
  border-radius: var(--radius-lg, 8px);
  padding: 30px 40px;
  width: 60%;
  margin: 20px auto;
}

.formulario .linha {
  margin-bottom: 15px;
}

.formulario input,
.formulario select,
.formulario textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: Arial, sans-serif;
}

.formulario textarea {
  resize: vertical;
  min-height: 100px;
  font-size: 14px;
}

.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
  border-color: #2e87c6;
  box-shadow: 0 0 0 3px rgba(46, 135, 198, 0.1);
}

.btnform {
  background-color: #2e87c6;
  color: #fff;
  border: none;
  padding: 10px 22px;
  margin: 5px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btnform:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn {
  background: #0b2239;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  filter: brightness(1.1);
}

label {
  display: block;
  margin-bottom: 6px;
  color: #0b2239;
  font-weight: 700;
}

/* Botões centralizados e alinhados na mesma linha */
.botoes-centro {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Botão de voltar estilizado */
.btn-voltar {
  background-color: #0b2239;
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-voltar:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* =========================
   RESPONSIVIDADE COMPLETA
   Mobile-first approach
========================= */

/* Tablet pequeno e abaixo (até 768px) */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: auto;
    padding: 16px;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .sidebar h2 {
    flex: 1;
    min-width: 100%;
    margin-bottom: 12px;
    font-size: 16px;
  }

  .sidebar a {
    padding: 8px 12px;
    font-size: 13px;
    flex: 0 1 auto;
    margin-right: 8px;
  }

  .content-area {
    padding: 20px;
    min-height: auto;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .header h1 {
    font-size: 20px;
  }

  .header .user {
    font-size: 13px;
  }

  .formulario {
    width: 100%;
    padding: 20px 16px;
    margin: 15px 0;
  }

  .formulario input,
  .formulario select {
    font-size: 16px;
    padding: 12px;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 10px 8px;
  }

  .botoes-centro {
    flex-wrap: wrap;
    gap: 8px;
  }

  .btnform {
    padding: 10px 16px;
    font-size: 13px;
    flex: 1;
    min-width: 120px;
  }

  .add-btn {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cartoes {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }

  .missao-valores {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }

  .footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Telemóvel (até 480px) */
@media (max-width: 480px) {
  .sidebar {
    padding: 12px;
  }

  .sidebar h2 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .sidebar a {
    padding: 6px 8px;
    font-size: 12px;
    margin-right: 4px;
  }

  .content-area {
    padding: 12px;
  }

  .header {
    margin-bottom: 15px;
  }

  .header h1 {
    font-size: 18px;
  }

  .header .user {
    font-size: 12px;
  }

  .formulario {
    padding: 16px 12px;
    width: 100%;
  }

  .formulario input,
  .formulario select {
    font-size: 16px;
    padding: 12px 8px;
    width: 100%;
  }

  .linha input {
    width: 100% !important;
  }

  .linha {
    margin-bottom: 12px;
  }

  .linha label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .linha small {
    font-size: 11px;
    margin-top: 3px;
  }

  .botoes-centro {
    flex-direction: column;
    gap: 8px;
  }

  .btnform {
    width: 100%;
    padding: 12px 10px;
    font-size: 12px;
    margin: 4px 0;
  }

  .add-btn {
    width: 100%;
    padding: 12px;
    font-size: 12px;
  }

  button {
    font-size: 14px;
    padding: 12px;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 8px 4px;
  }

  .actions a {
    display: block;
    margin: 4px 0;
  }

  .cards {
    gap: 10px;
  }

  .cartoes {
    padding: 12px;
    gap: 10px;
  }

  .cartao {
    padding: 16px;
  }

  .cartao h3 {
    font-size: 14px;
  }

  .missao-valores {
    padding: 12px;
    gap: 10px;
  }

  .missao-valores .missao {
    padding: 16px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 12px;
  }

  .section-title {
    font-size: 16px;
  }

  .servico-item,
  .servico-item.invertido {
    flex-direction: column;
    gap: 12px;
  }

  .servico-imagem {
    flex: none;
  }

  .servico-imagem img {
    max-width: 100%;
    height: auto;
  }

  footer {
    margin-top: 20px;
    padding: 16px;
    font-size: 11px;
  }

  .contactos-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contacto-item {
    padding: 16px 12px;
  }

  .mapa-container iframe {
    height: 250px;
  }

  .login-box {
    width: 100%;
    padding: 16px;
  }

  .login-box h1 {
    font-size: 18px;
  }

  .form-section {
    padding: 30px 12px;
  }

  .form-section h2 {
    font-size: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 12px;
    padding: 10px 12px;
    width: 100%;
  }

  .login-footer {
    flex-direction: column;
    gap: 10px;
  }

  .login-footer .link {
    text-align: center;
    font-size: 11px;
  }
}

/* Smartphones muito pequenos (até 360px) */
@media (max-width: 360px) {
  .sidebar a {
    padding: 4px 4px;
    font-size: 11px;
  }

  .header h1 {
    font-size: 16px;
  }

  .formulario {
    padding: 12px 8px;
  }

  .btnform {
    padding: 10px 8px;
    font-size: 11px;
  }

  table {
    font-size: 11px;
  }

  th, td {
    padding: 6px 3px;
  }

  footer {
    font-size: 10px;
  }
}

/* Otimizações adicionais para Safari Mobile */
@supports (-webkit-appearance:none) {
  input,
  textarea,
  select {
    font-size: 16px;
    border-radius: 6px;
  }

  button {
    border-radius: 6px;
  }
}

/* Touch targets adequados para móvel (mínimo 44px) */
button,
.btnform,
.btn,
.btn-primary,
.btn-secondary,
a.add-btn,
a.btn-voltar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overflow seguro para tabelas em móvel */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table thead {
    display: none;
  }

  table tbody,
  table tr {
    display: block;
  }

  table tr {
    border-bottom: 2px solid #f1f1f1;
    margin-bottom: 15px;
    display: block;
  }

  table td {
    display: block;
    text-align: right;
    padding-left: 50%;
    position: relative;
    border: none;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    font-weight: 700;
    width: 45%;
    text-align: left;
    color: #0b2239;
  }
}

/* =========================
   LOGIN DO CONTABILISTA
========================= */
.auth-body { 
  margin: 0; 
  font-family: 'Segoe UI', sans-serif; 
  background: radial-gradient(circle at 20% 20%, #e0f2ff, #f5f7fb); 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.auth-shell { 
  width: min(1100px, 92vw); 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: 32px; 
  background: #fff; 
  border-radius: 16px; 
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15); 
  padding: 32px; 
}

.auth-panel { 
  background: linear-gradient(145deg, #0f172a, #1e293b); 
  color: #e2e8f0; 
  border-radius: 12px; 
  padding: 32px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
}

.auth-panel h1 { 
  margin: 0 0 12px 0; 
  font-size: 26px; 
}

.auth-panel p { 
  margin: 0 0 10px 0; 
  color: #cbd5e1; 
}

.auth-panel ul { 
  padding-left: 18px; 
  color: #cbd5e1; 
  line-height: 1.6; 
}

.auth-form { 
  padding: 12px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
}

.auth-card { 
  background: #f8fafc; 
  border: 1px solid #e2e8f0; 
  border-radius: 12px; 
  padding: 24px; 
}

.auth-card h2 { 
  margin: 0 0 8px 0; 
}

.auth-card .field { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  margin-bottom: 16px; 
}

.auth-card .field label { 
  font-weight: 600; 
  color: #0f172a; 
}

.auth-card .field input { 
  padding: 12px; 
  border: 1px solid #cbd5e1; 
  border-radius: 8px; 
  font-size: 15px; 
  background: #fff; 
}

.auth-card .field input:focus { 
  outline: 2px solid #0ea5e9; 
  border-color: #0ea5e9; 
}

.auth-card .btn-primary { 
  width: 100%; 
  padding: 12px; 
  border: none; 
  border-radius: 10px; 
  background: linear-gradient(120deg, #0ea5e9, #2563eb); 
  color: white; 
  font-weight: 700; 
  font-size: 15px; 
  cursor: pointer; 
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35); 
}

.auth-card .btn-primary:hover { 
  filter: brightness(0.98); 
}

.status { 
  padding: 12px; 
  border-radius: 8px; 
  margin-bottom: 12px; 
  font-weight: 600; 
}

.status.ok { 
  background: #ecfdf3; 
  color: #166534; 
  border: 1px solid #bbf7d0; 
}

.status.err { 
  background: #fef2f2; 
  color: #b91c1c; 
  border: 1px solid #fecdd3; 
}

.helper { 
  color: #475569; 
  font-size: 14px; 
  margin-top: 6px; 
}

@media (max-width: 720px) { 
  .auth-body { padding: 16px; } 
  .auth-shell { padding: 20px; } 
}

/* =========================
   LOGIN DAS EMPRESAS
========================= */
.login-page {
  background: linear-gradient(180deg, var(--ice-1), var(--ice-2));
  padding: 60px 26px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  max-width: 420px;
  width: 100%;
  background: var(--card);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(0,0,0,.06);
}

.login-box h1 {
  font-size: 24px;
  font-weight: 900;
  color: rgba(15,27,36,.85);
  margin-bottom: 24px;
  text-align: center;
}

.login-form .field {
  margin-bottom: 20px;
}

.login-form .field label {
  display: block;
  font-weight: 600;
  color: rgba(15,27,36,.85);
  margin-bottom: 8px;
  font-size: 14px;
}

.login-form .field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.2s;
}

.login-form .field input:focus {
  outline: 2px solid #0ea5e9;
  border-color: #0ea5e9;
}

.login-form .btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #0ea5e9, #2563eb);
  color: white;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
  margin-top: 8px;
  transition: filter 0.2s;
}

.login-form .btn-primary:hover {
  filter: brightness(1.1);
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.login-footer .link {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
}

.login-footer .link:hover {
  text-decoration: underline;
}

/* =========================
   PAINEL ADMINISTRATIVO
========================= */
.admin-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-header h1 {
  font-size: 28px;
  font-weight: 900;
  color: rgba(15,27,36,.85);
  margin: 0;
}

.btn-adicionar, .btn-voltar {
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: filter 0.2s;
}

.btn-adicionar {
  background: linear-gradient(120deg, #0ea5e9, #2563eb);
  color: white;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.btn-adicionar:hover {
  filter: brightness(1.1);
}

.btn-voltar {
  background: rgba(15,27,36,.08);
  color: rgba(15,27,36,.85);
  border: 1px solid rgba(15,27,36,.12);
}

.btn-voltar:hover {
  background: rgba(15,27,36,.12);
}

.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.admin-table thead {
  background: rgba(13,45,69,.08);
  border-bottom: 2px solid rgba(13,45,69,.12);
}

.admin-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 700;
  color: rgba(15,27,36,.85);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  color: rgba(15,27,36,.75);
}

.admin-table tbody tr:hover {
  background: rgba(13,45,69,.03);
}

.admin-table .acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-mini {
  padding: 8px 12px;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-mini:hover {
  filter: brightness(1.15);
}

.btn-mini.btn-danger {
  background: #dc2626;
}

.btn-secondary {
  padding: 12px 24px;
  border-radius: 10px;
  background: rgba(15,27,36,.08);
  color: rgba(15,27,36,.85);
  text-decoration: none;
  border: 1px solid rgba(15,27,36,.12);
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-secondary:hover {
  background: rgba(15,27,36,.12);
}

.admin-form {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(0,0,0,.06);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: rgba(15,27,36,.85);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid #0ea5e9;
  border-color: #0ea5e9;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-group.checkbox label {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.form-actions .btn-primary {
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(120deg, #0ea5e9, #2563eb);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
  transition: filter 0.2s;
}

.form-actions .btn-primary:hover {
  filter: brightness(1.1);
}

.admin-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.admin-card {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(0,0,0,.06);
}

.admin-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: rgba(15,27,36,.85);
  margin: 0 0 20px 0;
}

.texto-vazio {
  color: rgba(15,27,36,.55);
  font-style: italic;
  text-align: center;
  padding: 30px;
}

/* =========================
   SIDEBAR DO CONTABILISTA
========================= */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 260px;
  background: linear-gradient(180deg, var(--navy-1), var(--navy-2));
  background-color: #0b2239; /* fallback sólido no mesmo tom de azul */
  color: rgba(255,255,255,.92);
  padding: 0;
  margin: 0;
  overflow-y: auto;
  z-index: 900;
  box-shadow: 2px 0 8px rgba(0,0,0,.15);
  display: none;
}

body.has-sidebar .sidebar {
  display: block !important;
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, var(--navy-1), var(--navy-2));
  background-color: #0b2239;
  color: rgba(255,255,255,.92);
  padding: 0;
  margin: 0;
  overflow-y: auto;
  z-index: 900;
  box-shadow: 2px 0 8px rgba(0,0,0,.15);
}

.sidebar.active {
  display: block;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 12px; /* Reduzido para 0px */
  border-bottom: 1px solid rgba(255,255,255,.10);
  gap: 4px; /* Reduzido ainda mais para 4px */
  position: relative; /* garante que elementos absolutos dentro fiquem posicionados relativamente */
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sidebar-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.sidebar-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  background: none;
  border: none;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Ajuste do botão toggle dentro do header para evitar sobreposição do logo */
.sidebar-header .sidebar-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1300;
  background: transparent;
  color: rgba(255,255,255,.95);
  border: none;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar-header .sidebar-toggle {
    right: 10px;
    top: 12px;
    transform: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2e87c6, #1a5a8e);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }
}

.sidebar-close-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  background: none;
  border: none;
  padding: 4px 8px;
  transition: all 0.2s ease;
  font-weight: bold;
}

.sidebar-close-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

/* Botão de menu hamburguer */
.menu-toggle-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2e87c6, #1a5a8e);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: all 0.2s ease;
  font-weight: bold;
  padding: 0;
  line-height: 1;
}

.menu-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(46,135,198,.3);
}

.menu-toggle-btn:active {
  transform: scale(0.95);
}

.sidebar-menu {
  padding: 16px 0;
  padding-bottom: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  justify-content: flex-start;
  text-align: left;
}

.menu-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: #0ea5e9;
}

.menu-item.active {
  background: rgba(14, 165, 233, .15);
  color: #0ea5e9;
  border-left-color: #0ea5e9;
  font-weight: 600;
}

.menu-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.menu-item .label {
  flex: 1;
  text-align: left;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-info {
  padding: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
}

.user-name {
  margin: 0 0 4px 0;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.user-role {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sidebar-link {
  padding: 10px 12px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
}

.sidebar-link:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.sidebar-link.logout {
  background: rgba(220, 38, 38, .2);
  color: #fca5a5;
  font-weight: 600;
}

.sidebar-link.logout:hover {
  background: rgba(220, 38, 38, .3);
  color: #fff;
}

/* Ativar sidebar nas páginas com Colaboradores */
body.has-sidebar {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.has-sidebar .sidebar {
  display: block !important;
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
}

/* =========================
   DASHBOARD DAS EMPRESAS
========================= */

/* Cards do dashboard */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dashboard-card.blue {
  border-left-color: #0ea5e9;
}

.dashboard-card.green {
  border-left-color: #10b981;
}

.dashboard-card.orange {
  border-left-color: #f59e0b;
}

.dashboard-card.purple {
  border-left-color: #8b5cf6;
}

.dashboard-card .card-icon {
  font-size: 32px;
  min-width: 50px;
  text-align: center;
}

.dashboard-card .card-info {
  flex: 1;
}

.dashboard-card h3 {
  font-size: 28px;
  font-weight: 900;
  color: rgba(15, 27, 36, 0.9);
  margin: 0 0 4px 0;
}

.dashboard-card p {
  font-size: 13px;
  color: rgba(15, 27, 36, 0.6);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dashboard-card .card-link {
  display: inline-block;
  margin-top: 12px;
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  transition: color 0.2s;
}

.dashboard-card .card-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Seções do Dashboard */
.dashboard-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.dashboard-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.dashboard-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: rgba(15, 27, 36, 0.85);
  margin: 0;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.dashboard-table thead {
  background: rgba(14, 165, 233, 0.08);
}

.dashboard-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: rgba(15, 27, 36, 0.85);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: rgba(15, 27, 36, 0.75);
  font-size: 14px;
}

.dashboard-table tbody tr:hover {
  background: rgba(14, 165, 233, 0.03);
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: rgba(15, 27, 36, 0.55);
}

.empty-state p {
  margin: 0 0 15px 0;
  font-size: 16px;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(15, 27, 36, 0.08);
  color: rgba(15, 27, 36, 0.75);
  border: 1px solid rgba(15, 27, 36, 0.12);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(15, 27, 36, 0.12);
  color: rgba(15, 27, 36, 0.85);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: rgba(14, 165, 233, 0.05);
  border-radius: 8px;
  border-left: 3px solid #0ea5e9;
  min-height: fit-content;
}

.info-item strong {
  font-size: 11px;
  font-weight: 700;
  color: rgba(15, 27, 36, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item span {
  font-size: 15px;
  color: rgba(15, 27, 36, 0.85);
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
}

.btn-mini {
  padding: 8px 16px;
  background: #0ea5e9;
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-mini:hover {
  filter: brightness(1.1);
}

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  color: rgba(15, 27, 36, 0.45);
  font-size: 12px;
}

@media (max-width: 768px) {
  /* ===== SIDEBAR HEADER RESPONSIVA ===== */
  .sidebar-header {
    padding: 14px 10px;
    gap: 10px;
  }

  .sidebar-logo {
    width: 80px;
    height: 80px;
  }

  .sidebar-title {
    font-size: 13px;
  }

  .sidebar-close-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  /* ===== SIDEBAR RESPONSIVA ===== */
  body.has-sidebar .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 260px;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  body.has-sidebar.sidebar-open .sidebar {
    left: 0;
  }

  .menu-toggle-btn {
    display: block;
  }

  body.has-sidebar .content-area {
    margin-left: 0 !important;
    width: 100%;
    padding-top: 30px !important;
    padding-left: 30px !important;
  }

  body.has-sidebar .content-area::before {
    display: none;
  }

  .sidebar-toggle {
    display: block !important;
  }

  /* Overlay para fechar sidebar */
  body.has-sidebar.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  /* ===== TABELAS RESPONSIVAS ===== */
  table {
    width: 100%;
    font-size: 13px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  table thead {
    display: none;
  }

  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 15px;
    border: 1px solid rgba(46,135,198,.2);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }

  table td {
    padding: 12px 16px;
    position: relative;
    padding-left: 120px;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  table td:last-child {
    border-bottom: none;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    font-weight: 700;
    color: rgba(46,135,198,.8);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100px;
  }

  th {
    padding: 12px 16px;
    text-align: left;
  }

  tr:hover td {
    background: transparent;
  }

  /* ===== FORMULÁRIOS RESPONSIVOS ===== */
  .formulario {
    width: 100%;
  }

  .formulario .linha {
    margin-bottom: 18px;
    width: 100%;
  }

  .formulario label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
  }

  .formulario input,
  .formulario textarea,
  .formulario select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 6px;
  }

  .botoes-centro {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .botoes-centro .btnform,
  .botoes-centro .btn-voltar {
    width: 100%;
  }

  /* ===== DASHBOARD ===== */
  .dashboard-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dashboard-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-header h1 {
    font-size: 20px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-item {
    padding: 12px;
    font-size: 13px;
  }

  .dash-card {
    flex-direction: column;
    padding: 16px;
  }

  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .card-value {
    font-size: 24px;
  }

  .card-title {
    font-size: 12px;
  }

  /* ===== SECÇÕES ===== */
  .admin-section {
    padding: 16px;
  }

  .admin-section h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .admin-section h2 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 16px;
  }

  .admin-section h3 {
    font-size: 14px;
  }

  .info-box {
    padding: 12px 16px;
    font-size: 13px;
  }

  /* ===== BOTÕES ===== */
  .btn-adicionar,
  .btn-mini,
  .btn-secondary,
  .btn-voltar,
  .btnform {
    padding: 10px 16px;
    font-size: 12px;
    width: 100%;
  }

  /* ===== LOGIN/FORM ===== */
  .login-box {
    width: 100%;
    margin: 20px;
    padding: 24px 16px;
  }

  .login-box h1 {
    font-size: 22px;
  }

  .login-form .field {
    margin-bottom: 14px;
  }

  .login-form input {
    padding: 12px 14px;
    font-size: 14px;
  }

  /* ===== FOOTER ===== */
  footer {
    font-size: 11px;
    padding: 20px 16px;
    margin-top: 20px;
  }

  /* ===== EMPTY STATE ===== */
  .empty-state {
    padding: 20px 16px;
    font-size: 14px;
  }

  .status {
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
    border-radius: 6px;
  }
}

/* =========================
   Botao de Chatbot
   ========================= */
   .chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #2e87c6, #1a5a8e);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(46,135,198,.35), 0 4px 12px rgba(0,0,0,.2);
    z-index: 9999;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(46,135,198,.35), 0 4px 12px rgba(0,0,0,.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(46,135,198,.45), 0 6px 18px rgba(0,0,0,.25);
    }
}

.chatbot-button:hover {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #3a9de0, #2068a5);
    box-shadow: 0 12px 35px rgba(46,135,198,.5), 0 8px 20px rgba(0,0,0,.3);
}

.chatbot-window {
    position: fixed;
    bottom: 115px;
    right: 30px;
    width: 380px;
    height: 550px;
    display: none;
    background: white;
    border-radius: 16px;
    border: 2px solid rgba(46,135,198,.2);
    box-shadow: 0 10px 40px rgba(0,0,0,.2), 0 4px 15px rgba(46,135,198,.15);
    z-index: 9998;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Impedir estilos globais de afetarem o iframe do chatbot */
.chatbot-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: white !important;
}

/* Correção para containers do layout não invadirem o chatbot */
.chatbot-window iframe {
    background-color: white !important;
}

/* Prevenir que estilos globais mexam no body dentro do iframe */
.chatbot-window * {
    box-sizing: border-box;
}

/* Override mobile: posicionamento e visibilidade do botão hamburguer */
@media (max-width: 768px) {
  /* mover botão para o canto direito para não tapar o nome da empresa */
  .menu-toggle-btn {
    left: auto !important;
    right: 12px !important;
    top: 12px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    border-radius: 50% !important;
    z-index: 1200 !important; /* ficar acima do conteúdo, mas... */
  }

  /* quando a sidebar estiver aberta escondemos o botão para evitar sobreposição */
  body.sidebar-open .menu-toggle-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* aumentar o logo em mobile para maior destaque */
  .sidebar-logo {
    width: 128px !important;
    height: 128px !important;
  }

  /* garantir que o cabeçalho da sidebar esteja acima por z-index quando aberto */
  .sidebar-header {
    position: relative;
    z-index: 1250; /* acima do botão, se necessário */
  }
}

/* Banner de cookies (global) */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2c3e50;
  color: #fff;
  padding: 20px;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cookie-banner-text {
  margin: 0 0 15px 0;
  font-size: 14px;
}

.cookie-banner-link {
  color: #3498db;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 25px;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
}

.cookie-btn-accept { background: #27ae60; }
.cookie-btn-reject { background: #e74c3c; }