/*************************************************************************************************************** 
*                        Responsive styles for tablets and smaller devices até 900px tablet                    *
****************************************************************************************************************/

@media (max-width: 900px) {
  .main-layout {
    max-width: 700px;
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .sidebar-menu {
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    border-radius: 12px;
  }
  .rightbar {
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    border-radius: 12px;
  }
  .main-content {
    width: 100%;
  }
}

/*************************************************************************************************************** 
*                        Responsive styles for tablets and smaller devices até 600px mobile                    *
****************************************************************************************************************/

@media (max-width: 600px) {

/* Body */
body {
  padding: 8px;
  margin: 0;
  box-sizing: border-box;
}

/* Main layout */
.main-layout {
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  box-sizing: border-box;
}

/* Sidebar e rightbar */
.sidebar-menu {
  display: none !important;
}
.rightbar {
  display: none !important;
}

/* Main content */
.main-content {
  width: 100vw;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 2vw;
  box-sizing: border-box;
}
.main-content.menu-open {
  transition: margin-top 0.2s;
}

/* Navbar */
.navbar {
  position: relative;
  padding: 4px;
  width: 100vw;
  max-width: 420px;
  min-width: 0;
  border-radius: 0;
  margin: 0 auto;
  z-index: 101;
  box-sizing: border-box;
}

/* Navbar left (logo) */
.navbar-left {
  position: static;
  width: 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0px;
  flex: none;
  
}
.navbar-left a i {
  margin-left: 4px;
  margin-right: 12px;
  font-size: 2em;
  color: #2d3e50;
  padding: 0;
}

/* Hamburguer button */
.hamburger {
  display: block;
  margin-left: 12px;
  margin-right: 12px;
}

/* Navbar center (search) */
.navbar-center {
  width: 60vw;
  max-width: 60vw;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  gap: 4px;
}
.search-area {
  width: 32px;
  max-width: 32px;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}
.search-area input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 1em;
}

/* Navbar right (menu hamburguer) */
.navbar-right {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  width: 100vw;
  background: #fff;
  z-index: 999;
  box-shadow: 0 2px 8px #eee;
  padding: 16px 0 24px 0;
  border-radius: 0 0 12px 12px;
}
.navbar-right.active {
  display: block;
}

/* Navbar links */
.navbar-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  margin: 0;
}
.navbar-links > li {
  width: 90vw;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
}
.navbar-links > li > a {
  display: block;
  width: 100%;
  padding: 14px 0;
  font-size: 1.15em;
  background: #f6f8fa;
  border-radius: 12px;
  box-shadow: 0 2px 8px #e0e7ef;
  color: #2d3e50;
  font-weight: 500;
  border: none;
  text-align: center;
  margin-bottom: 0;
  transition: background 0.2s;
}
.navbar-links > li > a:hover {
  background: #e9edf3;
}

/* Navbar actions */
.navbar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 90vw;
  max-width: 400px;
  margin: 16px auto 0 auto;
  align-items: center;
  box-sizing: border-box;
}
.lang-select {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.login-link {
  width: 100%;
  display: block;
  text-align: center;
  padding: 10px 0;
  font-size: 1em;
  border-radius: 8px;
  background: #f6f8fa;
  box-shadow: 0 2px 8px #e0e7ef;
  margin-bottom: 0;
  color: #2d3e50;
  font-weight: 500;
  border: none;
  transition: background 0.2s;
}
#idLogOut {
  width: 100%;
  display: block;
  text-align: center;
  padding: 10px 0;
  font-size: 1em;
  border-radius: 8px;
  background: #f6f8fa;
  box-shadow: 0 2px 8px #e0e7ef;
  margin-bottom: 0;
  color: #2d3e50;
  font-weight: 500;
  border: none;
  transition: background 0.2s;
}
.login-link:hover {
  background: #e9edf3;
}
#idLogOut:hover {
  background: #e9edf3;
}

/* Bem-vindo box centralizada */
.bem-vindo {
  width: 100vw;
  max-width: 420px; /* Limite máximo para centralizar */
  margin: 0 auto 4px auto; /* Centraliza e afasta do rodapé */
  padding: 0 8px;
  box-sizing: border-box;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff; /* Opcional: cor de fundo para destacar */
  border-radius: 16px; /* Opcional: borda arredondada */
  box-shadow: 0 2px 8px #e0e7ef; /* Opcional: sombra leve */
}


.bem-vindo-text {
  width: 100%;
  max-width: 92vw;
  text-align: justify;
  margin: 0 auto 18px auto;
  padding: 0 2vw;
  box-sizing: border-box;
}
.text-Cursivo {
  width: 100%;
  text-align: center;
  margin: 0 auto 18px auto;
  font-size: 1.05em;
  box-sizing: border-box;
}

.divDasEstrelas {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  box-sizing: border-box;
}

.crud-box {
  width: 40px;
  height: 40px;
  margin: 0 2px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  border-radius: 12px;
  background: #f6f8fa;
  box-shadow: 0 2px 8px #e0e7ef;
}

.divDoCrud {
  width: 100%;
  max-width: 100vw;
  margin: 18px 0;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container-crud {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 !important;
  box-sizing: border-box;
}



/* Footer centralizado */
footer {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100vw;
  max-width: 420px; /* Limite máximo para centralizar */
  margin: 0 auto;
  box-sizing: border-box;
}
.footer {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100vw;
  max-width: 420px; /* Limite máximo para centralizar */
  margin: 0 auto;
  box-sizing: border-box;
}
#footer {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100vw;
  max-width: 420px; /* Limite máximo para centralizar */
  margin: 0 auto;
  box-sizing: border-box;
}

/* Menu mobile hamburguer */
#menuMobile {
  position: absolute;
  top: 85px; /* ajuste conforme a altura do botão hamburguer */
  left: 0;
  width: 100vw;
  background: #fff;
  z-index: 999;
  box-shadow: 0 2px 8px #eee;
  padding: 16px 0 24px 0;
  border-radius: 0 0 12px 12px;
}

/* Nível 1: menu principal */
#menuMobile > ul {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
}
#menuMobile > ul > li {
  padding: 12px 0;
  text-align: left;
  font-size: 1.15em;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  width: 100%;
  padding-left: 16px;
}

/* Nível 2: primeiro dropdown */
#menuMobile ul.dropdown-menu > li {
  padding: 8px 0 8px 32px;
  text-align: left;
  font-size: 1em;
  font-weight: normal;
  border-bottom: none;
  width: 100%;
}

/* Nível 3: segundo dropdown */
#menuMobile ul ul.dropdown-menu > li {
  padding: 8px 0 8px 48px;
  text-align: left;
  font-size: 1em;
  font-weight: normal;
  border-bottom: none;
  width: 100%;
}

/* Links do menu */
#menuMobile a {
  color: #2d3e50;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  width: 100%;
}

/* Dropdown menus */
#menuMobile ul.dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: 16px;
  width: 100%;
  margin: 0;
  box-shadow: none !important;
  background: none !important;
  position: static !important;
}
#menuMobile li.dropdown.open > ul.dropdown-menu {
  display: flex;
}
}