/* ======== GLOBAL ======== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #eecfcf;
  --card-color: #c99a89;
  --accent-blue: #1976D2;
  --accent-red: #E53935;
  --text-color: #F1F1F1;
  --text-muted: #A0A7B4;
  --border-radius: 14px;
  --transition-speed: 0.35s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ======== HEADER FLEXÍVEL ======== */
header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 5%;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-red) 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  gap: 15px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.logo {
  height: 50px;
  width: auto;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

header h1 {
  color: white;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  flex: 1;
  min-width: 200px;
  margin: 0 20px;
}

.user-info {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logout-btn {
  background: linear-gradient(90deg, var(--accent-red), #B71C1C);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.logout-btn:hover {
  background: linear-gradient(90deg, #C62828, var(--accent-red));
  transform: translateY(-2px);
}

/* ======== MAIN CONTENT ======== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

main h2 {
  color: var(--accent-blue);
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 5px;
  text-align: center;
  width: 100%;
}

main h3.menu-title {
  color: #1565C0;
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 500;
  margin-bottom: 40px;
  text-align: center;
  width: 100%;
}

/* ======== MENU GALLERY PC ======== */
.menu-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  gap: 30px;
}

.menu-card {
  background-color: var(--card-color);
  border-radius: var(--border-radius);
  width: 300px;
  overflow: hidden;
  position: relative;
  gap:60px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.image-container {
  width: 100%;
  height: 120px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.menu-card:hover img {
  transform: scale(1.05);
}

.menu-label {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.2), rgba(229, 57, 53, 0.2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-weight: 600;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  min-height: 60px;
  
}

.menu-label span {
  color: var(--text-color);
  font-size: 1.1rem;
}

.toggle {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 2.6rem;
  cursor: pointer;
  transition: transform var(--transition-speed), color var(--transition-speed);
  width: 20%;
  height: 40px;
  display: flex;
   justify-content: end; /* Aligns content to the right */
   align-items: center;
}

.toggle:hover {
  color: var(--accent-red);
  transform: scale(1.1);
}

.submenu {
  position: relative;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #1C2433;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-speed) ease;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.submenu.open {
  max-height: 550px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.submenu a {
  display: block;
  color: var(--text-muted);
  padding: 30px 20px;
  font-size: 1.2rem;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-speed), color var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 10px;
}

.submenu a:hover {
  background: linear-gradient(90deg, rgba(25, 118, 210, 0.15), rgba(229, 57, 53, 0.15));
  color: white;
}

.submenu a i {
  font-size: 1.1rem;
  width: 200px;
  text-align: center;
}

/* ======== MOBILE VIEW ======== */
@media (max-width: 612px) {
  /* HEADER MOBILE MELHORADO */
  header {
    padding: 12px 15px;
    gap: 10px;
    justify-content: center;
  }
  
  .header-left {
    justify-content: center;
    width: 100%;
    order: 1;
  }
  
  header h1 {
    order: 2;
    margin: 5px 0;
    font-size: 1.4rem;
    min-width: auto;
    width: 100%;
  }
  
  .user-info {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 5px;
  }
  
  .logout-btn {
    padding: 10px 25px;
    font-size: 1rem;
  }

  /* MAIN MOBILE */
  main {
    padding: 25px 15px;
  }
  
  main h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
  
  main h3.menu-title {
    font-size: 1.2rem;
    margin-bottom: 30px;
  }

  /* MENU GALLERY MOBILE - CARDS MUITO MAIORES */
  .menu-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .menu-card {
    width: 100%;
    max-width: 100%;
    min-height: 180px;
  }
  
  .image-container {
    height: 150px; /* Aumentado significativamente */
  }
  
  .menu-label {
    padding: 18px 20px;
    min-height: 70px; /* Muito maior */
  }
  
  .menu-label span {
    font-size: 1.3rem; /* Texto maior */
    font-weight: 600;
  }

  /* TOGGLE BUTTON MOBILE - ÍCONES MUITO MAIORES */
  .toggle {
    font-size: 4rem;
    width: 100px;
    height: 55px;
  }
  
  .toggle:hover {
    transform: scale(1.2);
  }

  /* SUBMENU MOBILE */
  .submenu {
    position: relative;
    max-height: 0;
    opacity: 0;
  }
  
  .submenu.open {
    max-height: 550px;
    opacity: 1;
    transform: none;
  }
  
  .submenu a {
    padding: 16px 20px;
    min-height: 60px;
    font-size: 1.1rem;
    gap: 15px;
  }

  /* ÍCONES DENTRO DO SUBMENU MUITO MAIORES */
  .submenu a i {
    font-size: 1.6rem; /* Muito maior */
    width: 30px;
  }
}

/* ======== MOBILE MUITO PEQUENO ======== */
@media (max-width: 480px) {
  header {
    padding: 10px 12px;
  }
  
  .logo {
    height: 45px;
  }
  
  header h1 {
    font-size: 1.3rem;
  }
  
  .logout-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .menu-gallery {
    gap: 20px;
  }
  
  .image-container {
    height: 140px;
  }
  
  .menu-label {
    padding: 16px 18px;
    min-height: 65px;
  }
  
  .menu-label span {
    font-size: 1.2rem;
  }
  
  .toggle {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
  }
  
  .submenu a {
    padding: 14px 18px;
    min-height: 55px;
    font-size: 1rem;
  }
  
  .submenu a i {
    font-size: 1.4rem;
    width: 25px;
  }
}

/* ======== FOOTER ======== */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ======== LOGIN ======== */
#loginWrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  padding: 20px;
}

.loginBox {
  background: linear-gradient(135deg, #1c2433, #3c2a3a);
  padding: 35px 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-logo {
  height: 70px;
  width:auto;
  max-width: 100%;
  margin-bottom: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.loginBox h2 {
  color: var(--text-color);
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.loginBox p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.pw-container {
  position: relative;
  margin-bottom: 25px;
}

#passwordInput {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border-radius: 8px;
  border: 1px solid #A0A7B4;
  background-color: rgba(0, 0, 0, 0.2);
  color: var(--text-color);
  font-size: 1rem;
  min-height: 50px;
}

.submitBtn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--accent-blue), #1565C0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 50px;
}

.submitBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}
body.mobile-device header {
  padding: 12px 15px;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

body.mobile-device .header-left {
  justify-content: center;
  width: 100%;
  order: 1;
}

body.mobile-device header h1 {
  order: 2;
  margin: 5px 0;
  font-size: 1.4rem;
  min-width: auto;
  width: 100%;
}

body.mobile-device .user-info {
  order: 3;
  width: 100%;
  justify-content: center;
  margin-top: 5px;
}

body.mobile-device .logout-btn {
  padding: 12px 30px;
  font-size: 1.1rem;
  min-height: 50px;
}

/* MAIN MOBILE */
body.mobile-device main {
  padding: 20px 15px;
}

body.mobile-device main h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

body.mobile-device main h3.menu-title {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

/* MENU GALLERY MOBILE - 1 CARD POR LINHA OCUPANDO TODO O ECRÃ */
body.mobile-device .menu-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 95%;
  max-width: 100%;
  margin-top: 40px;
  padding: 0 5px;
}

body.mobile-device .menu-card {
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  margin-top: 55px;

}

body.mobile-device .image-container {
  height: 180px; /* Muito maior para mobile */
}

body.mobile-device .menu-label {
  padding: 20px 25px;
  min-height: 80px; /* Muito maior */
}

body.mobile-device .menu-label span {
  font-size: 1.4rem; /* Texto muito maior */
  font-weight: 600;
}

/* TOGGLE BUTTON MOBILE - ÍCONES MUITO MAIORES */
body.mobile-device .toggle {
    font-size: 4rem;
    width:15%;
    height: 55px;
    justify-content: end; /* Aligns content to the right */
      padding-right: 6%;
  }

body.mobile-device .toggle:hover {
  transform: scale(1.2);
}

/* SUBMENU MOBILE */
body.mobile-device .submenu {
  position: relative;
  max-height: 0;
  opacity: 0;
}

body.mobile-device .submenu.open {
  max-height: 550px;
  opacity: 1;
  transform: none;
}

body.mobile-device .submenu a {
  padding: 50px 25px;
  min-height: 65px;
  font-size: 1.8rem;
  gap: 15px;
}

/* ÍCONES DENTRO DO SUBMENU MUITO MAIORES */
body.mobile-device .submenu a i {
  font-size: 1.8rem; /* Muito maior */
  width: 35px;
}

/* ======== MOBILE MUITO PEQUENO ======== */
@media (max-width: 480px) {
  body.mobile-device header {
    padding: 10px 12px;
  }
  
  body.mobile-device .logo {
    height: 45px;
  }
  
  body.mobile-device header h1 {
    font-size: 1.3rem;
  }
  
  body.mobile-device .logout-btn {
    padding: 10px 25px;
    font-size: 1rem;
  }

  body.mobile-device .menu-gallery {
    gap: 15px;
  }
    body.mobile-device .menu-card {
      gap:100px;
  }
  body.mobile-device .image-container {
    height: 160px;
  }
  
  body.mobile-device .menu-label {
    padding: 18px 20px;
    min-height: 75px;
  }
  
  body.mobile-device .menu-label span {
    font-size: 1.3rem;
  }
  
  body.mobile-device .toggle {
    font-size: 2rem;
    width: 55px;
    height: 55px;
  }
  
  body.mobile-device .submenu a {
    padding: 16px 20px;
    min-height: 60px;
    font-size: 1.1rem;
  }
  
  body.mobile-device .submenu a i {
    font-size: 1.6rem;
    width: 30px;
  }
}
body.mobile-device #loginWrap {
  padding: 15px;
}

body.mobile-device .loginBox {
  padding: 30px 25px;
  max-width: calc(80% - 30px); /* Ajusta para ocupar quase toda a largura, considerando o padding do #loginWrap */
}

body.mobile-device .login-logo {
  height: 65px;
  margin-bottom: 20px;
}

body.mobile-device .loginBox h2 {
  font-size: 1.5rem;
}

body.mobile-device .loginBox p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

body.mobile-device .pw-container {
  margin-bottom: 20px;
}

body.mobile-device #passwordInput {
  min-height: 48px;
}

body.mobile-device .submitBtn {
  font-size: 1rem;
  min-height: 48px;
}

body.mobile-device footer {
  padding: 18px;
}