* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #EAEAEA;
  color: #333;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: auto;
}
body.layout-master { min-width: 1370px; }
body.layout-slave { min-width: 1000px; }

a { color: inherit; }

button {
  background: #5BA3D9;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 16px;
}
button:hover { background: #4A90C4; }

.container {
  margin: 0 auto;
  max-width: 1370px;
  width: 100%;
}

header {
  background-color: #FFFFFF;
  height: 100px;
}
.header-content {
  align-items: center;
  display: flex;
  height: 100px;
  justify-content: space-between;
  padding: 0 20px;
}
.linha-topo {
  background-color: #A0A0A0;
  height: 1px;
  left: 0;
  position: absolute;
  top: 100px;
  width: 100%;
}

.logo {
  display: block;
  height: 56px;
  max-width: 280px;
  object-fit: contain;
  width: auto;
}
.logo-condo-header {
  background: #fff;
  border-radius: 8px;
  display: block;
  height: 60px;
  max-width: 150px;
  object-fit: contain;
  width: auto;
}
.user-info {
  align-items: center;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  gap: 12px;
}
.user-info a {
  color: #5BA3D9;
  margin-left: 15px;
  text-decoration: none;
}
.user-info a:hover { text-decoration: underline; }

.menu-botoes {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 25px 20px;
}
.menu-botoes-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  width: max-content;
}
.menu-botoes a {
  background-color: #5BA3D9;
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: bold;
  padding: 12px 22px;
  text-decoration: none;
  white-space: nowrap;
}
.menu-botoes a:hover { background-color: #4A90C4; }
.menu-botoes a.ativo { background-color: #333; }

main {
  flex: 1;
  padding: 30px 20px 40px;
}

.subtitulo {
  color: #666;
  font-size: 14px;
  margin-bottom: 18px;
}
.texto-vazio {
  color: #888;
  font-size: 13px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
  padding: 22px;
}
.card h2,
.card-title,
.card-titulo {
  color: #333;
  font-size: 18px;
  margin: 0 0 12px;
}

.grid-2 {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
}

.pos { color: #27ae60; }
.neg { color: #e74c3c; }

.aviso-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}
.aviso-data {
  color: #5BA3D9;
  font-size: 13px;
  font-weight: bold;
}
.aviso-titulo {
  font-size: 14px;
  margin-top: 2px;
}

footer {
  background: #fff;
  border-top: 1px solid #ddd;
  color: #666;
  font-size: 13px;
  margin-top: auto;
  padding: 16px 20px;
  text-align: center;
}

/* =========================================================
   MOBILE — somente slave (master continua bloqueado)
   ========================================================= */
@media (max-width: 900px) {
  /* Master: tela de bloqueio */
  body.layout-master > *:not(.aviso-mobile-master) {
    display: none !important;
  }
  body.layout-master .aviso-mobile-master {
    display: flex !important;
  }

  body.layout-slave { min-width: 0 !important }

  /* Slave: layout responsivo */
  body.layout-slave {
    min-width: 0 !important;
    overflow-x: hidden;
  }

  body.layout-slave .linha-topo {
    display: none;
  }

  body.layout-slave header {
    height: auto;
  }

  body.layout-slave .header-content {
    flex-wrap: wrap;
    gap: 8px 12px;
    height: auto;
    padding: 12px 14px;
  }

  body.layout-slave .logo {
    height: 42px;
    max-width: 160px;
  }

  body.layout-slave .logo-condo-header {
    height: 40px;
    max-width: 90px;
  }

  body.layout-slave .user-info {
    font-size: 13px;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
  }

  body.layout-slave .user-info a {
    margin-left: 0;
    background: #f1f7fc;
    border: 1px solid #d8e9f6;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
  }

  /* Menu: scroll horizontal, sem quebrar layout */
  body.layout-slave .menu-botoes {
    padding: 10px 0;
    overflow: hidden;
  }

  body.layout-slave .menu-botoes .container {
    padding: 0;
    max-width: none;
  }

  body.layout-slave .menu-botoes-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    max-width: none;
    padding: 0 14px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.layout-slave .menu-botoes a {
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 20px;
  }

  body.layout-slave main {
    padding: 16px 14px 32px;
  }

  body.layout-slave .container {
    max-width: 100%;
    padding: 0;
  }

  body.layout-slave .card {
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 12px;
  }

  body.layout-slave .card h2,
  body.layout-slave .card-title,
  body.layout-slave .card-titulo {
    font-size: 16px;
  }

  body.layout-slave .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }

  body.layout-slave footer {
    padding: 14px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body.layout-slave .logo {
    max-width: 140px;
    height: 36px;
  }

  body.layout-slave .menu-botoes a {
    font-size: 11px;
    padding: 9px 12px;
  }
}

/*------------- botoes superior icones
/*------------- botoes superior icones

/* Menu com ícone + texto (desktop) */
.menu-botoes a.menu-link,
.menu-botoes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.menu-botoes .menu-ico {
  display: none;
  line-height: 0;
  align-items: center;
  justify-content: center;
}
.menu-botoes .menu-ico svg {
  display: block;
  margin: 0 auto;
}

/* Slave mobile: só ícone, centralizado no botão */
@media (max-width: 900px) {
  body.layout-slave .menu-botoes {
    padding: 10px 0;
  }
  body.layout-slave .menu-botoes-inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.layout-slave .menu-botoes a {
    flex: 1 1 0;
    min-width: 48px;
    max-width: 64px;
    height: 48px;
    padding: 0;
    border-radius: 12px;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  body.layout-slave .menu-botoes .menu-txt {
    display: none;
  }
  body.layout-slave .menu-botoes .menu-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 100%;
    height: 100%;
  }
  body.layout-slave .menu-botoes a.ativo {
    background: #333;
  }
}