@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');
/* <button class="toggle-theme" onclick="document.body.classList.toggle('dark-mode')">🌓</button> */

:root {
  /* MD3 Light Theme Colors */
  --md-sys-color-primary: #506da4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: rgb(114, 97, 161);
  --md-sys-color-on-primary-container: #222;

  --md-sys-color-secondary: #5b6071;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #ffffff;
  --md-sys-color-on-secondary-container: #1D192B;

  --md-sys-color-tertiary: #7D5260;
  --md-sys-color-on-tertiary: #FFFFFF;
  --md-sys-color-tertiary-container: #d8dcff;
  --md-sys-color-on-tertiary-container: #370B1E;

  --md-sys-color-error: #B3261E;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #F9DEDC;
  --md-sys-color-on-error-container: #410E0B;

  --md-sys-color-background: #FFFFFF;
  --md-sys-color-on-background: #1C1B1F;

  /* Background */
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #1C1B1F;

  --md-sys-color-outline: #74767e;

  /* Shape */
  --md-sys-shape-corner-none: 0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 6px;
  --md-sys-shape-corner-medium: 8px;
  --md-sys-shape-corner-large: 12px;
  --md-sys-shape-corner-extra-large: 16px;
  --md-sys-shape-corner-full: 9999px;

  /* Shadows (elevation) */
  --md-sys-elevation-level1: 0px 1px 2px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12);
  --md-sys-elevation-level2: 0px 2px 4px rgba(0, 0, 0, 0.14), 0px 3px 6px rgba(0, 0, 0, 0.12);
}

body {
  background: linear-gradient(to right,rgb(255, 255, 255),rgb(60, 42, 110));
  color: #222222;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  transition: background 0.3s ease, color 0.3s ease;
}



nav.main-nav {
  background: linear-gradient(to right,rgb(255, 255, 255),rgb(255, 255, 255));
  padding: 1rem 2rem;
  border-radius: 32px;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* animation: bubbleMorphColor 10s infinite ease-in-out, pulseGlow 2.5s infinite ease-in-out; */
  animation: fadeInNav 1s ease forwards, morph 10s infinite ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  margin: 2rem auto;
  max-width: 1100px;
  width: 90%;
  flex-wrap: wrap;
}
    @keyframes bubbleMorphColor {
      0% {
        border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
        background-color: rgba(255, 255, 255, 0.75);
      }
      25% {
        border-radius: 55% 45% 40% 60% / 60% 50% 45% 55%;
        background-color: rgba(255, 255, 255, 0.75);
      }
      50% {
        border-radius: 60% 40% 50% 50% / 45% 60% 40% 55%;
        background-color: rgba(255, 255, 255, 0.75);
      }
      75% {
        border-radius: 45% 55% 55% 45% / 55% 45% 55% 45%;
        background-color: rgba(255, 255, 255, 0.75);
      }
      100% {
        border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
        background-color: rgba(255, 255, 255, 0.75);
      }
    }

    @keyframes pulseGlow {
      0% {
        box-shadow: 0 0 10px rgba(235, 95, 52, 0.73), 0 0 20px rgba(80, 109, 164, 0.2);
      }
      50% {
        box-shadow: 0 0 20px rgba(201, 88, 88, 0.75), 0 0 40px rgba(80, 109, 164, 0.3);
      }
      100% {
        box-shadow: 0 0 10px rgba(230, 127, 30, 0.7), 0 0 20px rgba(80, 109, 164, 0.2);
      }
    }
nav.main-nav a {
  color: #212121;
  text-decoration: none;
  /*background-color: rgba(255, 255, 255, 0.9);*/
  padding: 0.6rem 1.4rem;
  /*border-radius: 30px;*/
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.3s ease;
  /*box-shadow: 0 2px 5px rgba(0,0,0,0.1);*/
}

nav.main-nav a.active {
  background-color: rgba(255, 255, 255, 0.3);
  font-weight: bold;
  border-radius: 12px;
}

nav.main-nav a:hover {
  /*background-color: #793b3b;*/
  color: rgb(77, 28, 110);
  /* transform: scale(1.05); */
}

.main-nav a div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

@keyframes morph {
  0% {
    border-radius: 20px 50px 20px 50px;
  }
  50% {
    border-radius: 50px 20px 50px 20px;
  }
  100% {
    border-radius: 20px 50px 20px 50px;
  }
}

button,
input[type="submit"] {
  background: linear-gradient(135deg, #dddddd, #cacaca);
  color: #292929;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

button:hover,
input[type="submit"]:hover {
  background: linear-gradient(to right, rgba(80, 102, 173, 1), rgba(215, 192, 252, 1));
  color: #ffffff;
  transform: scale(1.05);
}

.card-link {
  background: #fff;
  color: #212121;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.card-link:hover {
  transform: perspective(800px) rotateY(2deg);
  background: linear-gradient(to right,rgb(81, 80, 173),rgb(186, 144, 255));
  color: #222;
}

header {
  /* background: linear-gradient(to right,rgb(173, 102, 80),rgb(255, 201, 22)); */
  padding: 2rem 2rem 0rem 2rem;
  text-align: center;
  color: #292525;
  /*box-shadow: 0 2px 10px rgba(0,0,0,0.15);*/
}

header h1{
  padding-bottom: 2rem;
  animation-delay: 0.2s;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

li{
  animation-delay: 0.2s;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

h2{
  animation-delay: 0.2s;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

footer {
  /* background: linear-gradient(to right, #fd3737, #e6cf00); */
  padding: 1rem;
  text-align: center;
  color: #212121;
  /* margin-top: 2rem; */
  /* box-shadow: 0 -2px 10px rgba(0,0,0,0.15); */
}

/* Dark mode toggle */
.toggle-theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: #ffffff;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  z-index: 999;
}

body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

body.dark-mode nav.main-nav,
body.dark-mode header,
body.dark-mode footer {
  background: linear-gradient(to right,rgb(255, 160, 176),rgb(192, 87, 148));
}

body.dark-mode .card-link {
  background: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode nav.main-nav a,
body.dark-mode button,
body.dark-mode input[type="submit"] {
  background-color: #333;
  color: #fff;
}

body.dark-mode nav.main-nav a:hover,
body.dark-mode button:hover,
body.dark-mode input[type="submit"]:hover {
  background-color: #79002e;
  color: #fff;
}

.container {
    position: relative;
    max-width: 80%;
    margin: auto;
    padding: 2rem;
    /* background-color: var(--md-sys-color-surface); */
    /* box-shadow: var(--md-sys-elevation-level1); */
    border-radius: var(--md-sys-shape-corner-medium);
    /* animation: glowPulse 3s ease-in-out infinite; */
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-extra-small);
  font-weight: 500;
  color: #fff;
}

.status-underweight { background-color: #E53935; }
.status-correct     { background-color: #43A047; }
.status-overweight  { background-color: #FB8C00; }

.grade-blue   { background-color: #1E88E5; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }
.grade-green  { background-color: #43A047; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }
.grade-orange { background-color: #fbea00; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card-link {
  display: block;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  padding: 1rem;
  border-radius: var(--md-sys-shape-corner-medium);
  text-decoration: none;
  font-weight: 500;
  box-shadow: var(--md-sys-elevation-level1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-elevation-level2);
}


.settings-group {
  margin-top: 2rem;
}

.settings-group h3 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.animated {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  /*animation: fadeInUp 0.5s ease-in-out both;*/
}

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

  .toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #43a047;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 20px;
    position: fixed;
    z-index: 999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
  }
  .toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
  }

  /* .form-group {
    margin-bottom: 1rem;
  } */

  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
  }
  .form-group select,
  .form-group input {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
  }

  .button-cancel {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #e53935;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
  }

  @media (max-width: 768px) {
  .main-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav a {
    display: block;
    margin: 0.5rem 0;
  }
  header h1 {
    font-size: 1.2rem;
    text-align: center;
  }
}

/* NEW */
.welcome-screen {
  text-align: center;
  padding: 4rem 1rem;
  color: #222222;
}

.welcome-screen h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.app-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
}

.app-card {
  /* background-color: var(--md-sys-color-secondary-container); */
  background: linear-gradient(to right,rgb(255, 160, 176),rgb(192, 87, 148));
  color: #222222;
  border-radius: 32px;
  padding: 2rem;
  width: 280px;
  text-align: center;
  text-decoration: none;
  animation: morph 10s infinite ease-in-out;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.app-card:hover {
  transform: translateY(-6px);
}

.material-symbols-outlined {
  font-size: 48px;
  margin-bottom: 1rem;
}

.animated-card {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.animated-card:nth-child(1) { animation-delay: 0.3s; }
.animated-card:nth-child(2) { animation-delay: 0.6s; }

.container.transparent {
  background-color: rgba(255, 255, 255, 0.137); /* semi-transparent white */
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); /* nice depth shadow */
}

.podium {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.podium-item {
  text-align: center;
  padding: 1rem;
  background: #f0f0f0;
  border-radius: 1rem;
  min-width: 120px;
  flex-grow: 1;
}
.podium-item .circle {
  background-color: #1E88E5;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}
.podium-item.rank-1 .circle { background: gold; }
.podium-item.rank-2 .circle { background: silver; }
.podium-item.rank-3 .circle { background: #cd7f32; } 

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  animation-delay: 0.2s;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--md-sys-color-outline);
}

th {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-extra-small);
  font-weight: 500;
  color: #fff;
}

.status-underweight { background-color: #E53935; }
.status-correct     { background-color: #43A047; }
.status-overweight  { background-color: #FB8C00; }

.grade-blue   { background-color: #1E88E5; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }
.grade-green  { background-color: #43A047; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }
.grade-orange { background-color: #fbea00; color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--md-sys-shape-corner-extra-small); }

.card-selection {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.card-option-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.card-option {
  cursor: pointer;
  padding: 1rem 1.5rem;
  border: 2px solid #ccc;
  border-radius: 12px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  background: linear-gradient(to right, #ffffff, #ffffff);
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.card-option:hover {
  transform: scale(1.05);
  border-color: rgb(110, 88, 28);
}

.card-option.selected {
  border-color: #c07e5f;
  background: #d39a31;
  color: white;
  box-shadow: 0 4px 12px rgba(128, 36, 0, 0.3);
}

@keyframes bounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ✅ Toast animation */
.toast {
  visibility: hidden;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #4caf50;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: visibility 0s, opacity 0.3s ease-in-out;
  opacity: 0;
  z-index: 9999;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

.welcome-banner {
  background: #e0f7fa;
  color: #004d40;
  padding: 1rem;
  margin: 1rem auto;
  border-radius: 12px;
  max-width: 800px;
  text-align: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInSlide 0.8s ease-out forwards;
}

@keyframes fadeInSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-out {
  animation: fadeOutSlide 0.8s ease-out forwards;
}

@keyframes fadeOutSlide {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

    #welcome-screen,
    #welcome-screen .container,
    #main-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    @keyframes glowPulse {
      0% {
        box-shadow: 0 0 10px rgba(255, 153, 0, 0.89), 0 0 20px rgba(255, 0, 123, 0.2);
      }
      50% {
        box-shadow: 0 0 20px rgba(255, 230, 0, 0.7), 0 0 40px rgba(255, 0, 123, 0.4);
      }
      100% {
        box-shadow: 0 0 10px rgba(255, 145, 0, 0.4), 0 0 20px rgba(255, 0, 123, 0.2);
      }
    }

    #welcome-screen,
    #main-content {
      /* animation: glowPulse 3s ease-in-out infinite; */
      border-radius: 1rem;
      padding: 3rem;
    }

        a {
      text-decoration: none;
      color:#222;
    }
    .cards {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
      margin-top: 2rem;
      animation-delay: 0.2s;
      opacity: 0;
      animation: fadeInUp 0.6s ease forwards;
    }
    .card {
      background: white;
      border-radius: 1rem;
      border: 2px solid #ccc;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      padding: 2rem;
      text-align: center;
      width: 240px;
      transition: transform 0.2s ease;
    }
    .card:hover {
      transform: scale(1.05);
      border-color:rgb(255, 255, 255);
      background: linear-gradient(to right,rgb(104, 102, 173),rgb(104, 102, 173));
      color:#fff;
    }
    .card span {
      font-size: 48px;
      margin-bottom: 10px;
      display: block;
    }

form {
  max-width: 1000px;
  margin: 10px auto;
  /* padding: 2rem; */
  /* background: #fff; */
  border-radius: 16px;
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation-delay: 0.2s;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

@media (max-width: 768px) {
  form {
    padding: 1rem;
    margin: 1rem;
    width: 90%;
  }

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

  .form-group label {
    margin-bottom: 0.5rem;
  }
}

.form-centered {
  all: unset;
  display: block; /* necessary for form to behave normally after unset */
}

.size-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  margin-bottom: 0.4rem; /* reduce vertical gap */
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.size-form span {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
  flex-grow: 1;
}

.size-form:hover {
  border-color: #f35b14;
  transform: translateY(-1px);
}

.size-form input[type="text"] {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex-grow: 1;
}

@media (max-width: 600px) {
  .size-form {
    flex-direction: column;
    align-items: stretch;
  }

  .size-form span,
  .size-form input,
  .size-form button {
    width: 100%;
    text-align: center;
  }
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.size-table th,
.size-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.size-table th {
  background-color: var(--md-sys-color-primary-container);
  color: white;
}

.size-table tr:hover {
  background-color: #f9f9f9;
}

.size-table button {
  background: #bb2e2b;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.size-table button:hover {
  background: #db2424;
}

.size-form {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.size-form input[type="text"] {
  flex-grow: 1;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.size-form button {
  background: #242424;
  color: white;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.size-form button:hover {
  background: #2e7d32;
}

    .tab-nav {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      padding-top: 0.5rem;
    }

    .logo-grab {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 0.5rem;
      transform: translateY(26px);
      z-index: 10;
    }

    .logo-img {
      height: 64px;
      width: auto;
      object-fit: contain;
      max-width: 160px;
      pointer-events: none;
      user-select: none;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
      transition: height 0.3s ease;
    }

    .tab-menu {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .tab-menu a div {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .tab-menu a {
      background: linear-gradient(to right,rgb(104, 102, 173),rgb(104, 102, 173));
      color: white;
      padding: 0.75rem 1.25rem;
      text-decoration: none;
      border-radius: 12px 12px 0 0;
      font-weight: bold;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.3s ease;
    }

    .tab-menu a:hover {
      background: #fff;
      color: #242424;
      /* border: 2px solid #ccc; */
      border-bottom: none;
    }

    .tab-nav .tab-menu a.active {
      background: rgb(255, 255, 255);
      border: 2px solid #ccc;
      border-bottom: none;
      font-weight: bold;
      color: #242424;
    }

    /* Mobile & portrait */
    @media (max-width: 768px) {
      .tab-menu {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        padding-bottom: 1rem;
      }

      .tab-menu a {
        width: 90%;
        max-width: 300px;
        text-align: center;
      }

      .logo-img {
        height: 56px;
      }

      .logo-grab {
        transform: translateY(6px);
      }
    }

    .back-link {
      display: block;
      text-align: center;
      margin-bottom: 1.5rem;
      font-weight: bold;
    }

    .bottom-logo {
      position: absolute;
      bottom: -1.2rem;
      left: 1.5rem;
      height: 200px;
      pointer-events: none;
      user-select: none;
    }

    /* Smooth collapse driven by a class on <body> */
    .sidebar{ transform: translateX(0); transition: transform .25s ease; }
    body.sidebar-collapsed #sidebar{ transform: translateX(-100%) !important; }

    .content{ margin-left: 220px; transition: margin-left .25s ease; }
    body.sidebar-collapsed .content{ margin-left: 0 !important; }

    /* Ensure the button is always clickable */
    .toggle-btn{ pointer-events: auto; }
