#app {
  display: none;
}

#bar {
  display: none;
}

#status {
  display: none;
}

#info {
  display: none;
}

.payment-info {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
}

h2 {
  font-size: 2.25rem;
}

.green-text {
  color: green;
  font-weight: bold;
}

.red-text {
  color: red;
  font-weight: bold;
}

.blue-label {
  color: blue;
  font-weight: bold;
}

.purple-label {
  color: purple;
  font-weight: bold;
}



@media (max-width: 431px) {
  .payment-info {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 415px) {
  .payment-info {
    font-size: 0.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 394px) {
  .payment-info {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 391px) {
  .payment-info {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 376px) {
  .payment-info {
    font-size: 0.67rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}


.language-switcher {
  position: fixed;
  top: 0;
  right: 0;
  background-color: #0e42bb (0, 0, 0, 0.8);
  padding: 8px 12px;
  border-bottom-left-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 9999;
}

.language-switcher select {
  font-size: 16px;
  padding: 4px 6px;
}



.back-button {
  position: absolute;
  top: 20px;
  left: 100px;
  background-color: #827bbab5;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Default: show buttons side by side if space allows */
.button-container button {
  padding: 15px 110px;
  text-align: center;
  min-width: 100px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #0e42bb;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease;
}


.back-button {
  top: 10px;
  left: 5px;
  padding: 10px 18px;
  font-size: 12px;
  margin-bottom: 40px;
}

.spacer {
  height: 1rem;
  /* Adjust as needed */
}

ul {
  font-size: 0.8rem;
}

.back-button:hover {
  background-color: #404c62;
}




.dashboard-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  font-family: Arial, sans-serif;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.05);
  font-size: 1rem;
  text-align: center;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}


.external-student-name {
  background-color: #fff9c4;
}

.hybrid-student-name {
  background: linear-gradient(to top right, #fff9c4 0%, #fff9c4 50%, #ffffff 50%, #ffffff 100%);
  padding: 6px 12px;
  border-radius: 6px;
}

.orphan-border {
  box-shadow: 0 0 0 3px #ff0000 inset; /* orphan */
  border-radius: 5px;
}

.divorced-shadow {
  box-shadow: 0 0 0 3px #2200ff inset; /* parents_divorced */
  border-radius: 5px;
}

.male-gender {
  color: darkblue;
}

.female-gender {
  color: deeppink;
}



.vip-rainbow {
  animation: rainbowText 3s infinite linear;
}

@keyframes rainbowText {
  0% { color: red; }
  14% { color: orange; }
  28% { color: yellow; }
  42% { color: green; }
  57% { color: blue; }
  71% { color: indigo; }
  85% { color: violet; }
  100% { color: red; }
}



.vip-twinkle {
  animation: twinkle 1.8s infinite ease-in-out;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.6;
    filter: brightness(1.5);
  }
}



canvas {
  max-width: 100% !important;
  height: auto !important;
  background: #fafafa;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f0f2f5;
  color: #333;
}

header {
  background: #0052cc;
  color: white;
  padding: 1rem;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 1rem;
  background: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: center;
}

th {
  background: #0052cc;
  color: white;
}

button {
  cursor: pointer;
  background: #0052cc;
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  margin: 0 0.2rem;
  border-radius: 3px;
  transition: background 0.3s;
}

button:hover {
  background: #003d99;
}

input, select {
  padding: 0.3rem 0.5rem;
  margin: 0.3rem 0.6rem 0.3rem 0;
  border: 1px solid #ccc;
  border-radius: 3px;
  min-width: 100px;
}

nav {
  margin-bottom: 1rem;
  text-align: center;
}

nav button {
  background: #666;
  margin: 0 0.5rem;
}

nav button.active {
  background: #0052cc;
}

.unpaid {
  color: rgb(0, 0, 0);
  background-color: #ffb7b2;
  /* red */
  font-weight: bold;
}

.half_paid {
  color: rgb(0, 0, 0);
  background-color: #ffda95;
  /* yellow */
  font-weight: bold;
}

.full_paid {
  color: rgb(255, 255, 255);
  background-color: #00ae09;
  /* green */
  font-weight: bold;
}

.small-text {
  font-size: 0.85rem;
  color: #555;
}

.flex-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.flex-grow {
  flex-grow: 1;
}

.center-text {
  text-align: center;
}

@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  tr {
    margin-bottom: 5rem;
  }

  th, td {
    border: none;
    padding-left: 25%;
    position: relative;
  }

  th::before, td::before {
    position: absolute;
    left: 0;
    width: 25%;
    padding-left: 0.5rem;
    white-space: nowrap;
    font-weight: bold;
  }

  td:nth-of-type(1)::before {
    content: "លេខសម្គាល់ ID";
  }

  td:nth-of-type(2)::before {
    content: "នាម ត្រកូល";
  }

  td:nth-of-type(3)::before {
    content: "ថ្នាក់";
  }

  td:nth-of-type(4)::before {
    content: "ភេទ";
  }

  td:nth-of-type(5)::before {
    content: "ថ្ងៃខែឆ្នាំកំណើត";
  }

  td:nth-of-type(6)::before {
    content: "បង់ថ្លៃអាហារ";
  }

  td:nth-of-type(7)::before {
    content: "បង់ថ្លៃសិក្សា";
  }

  td:nth-of-type(8)::before {
    content: "ផ្សេងៗ";
  }
}

@media (max-width: 390px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  tr {
    margin-bottom: 5rem;
  }

  th, td {
    border: none;
    padding-left: 10%;
    position: relative;
  }

  th::before, td::before {
    position: absolute;
    left: 0;
    width: 10%;
    padding-left: 0.5rem;
    white-space: nowrap;
    font-weight: bold;
  }

  td:nth-of-type(1)::before {
    content: "លេខសម្គាល់ ID";
  }

  td:nth-of-type(2)::before {
    content: "នាម ត្រកូល";
  }

  td:nth-of-type(3)::before {
    content: "ថ្នាក់";
  }

  td:nth-of-type(4)::before {
    content: "ភេទ";
  }

  td:nth-of-type(5)::before {
    content: "ថ្ងៃខែឆ្នាំកំណើត";
  }

  td:nth-of-type(6)::before {
    content: "បង់ថ្លៃអាហារ";
  }

  td:nth-of-type(7)::before {
    content: "បង់ថ្លៃសិក្សា";
  }

  td:nth-of-type(8)::before {
    content: "ផ្សេងៗ";
  }
}

@media (max-width: 375px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  tr {
    margin-bottom: 5rem;
  }

  th, td {
    border: none;
    padding-left: 16%;
    position: relative;
  }

  th::before, td::before {
    position: absolute;
    left: 0;
    width: 9%;
    padding-left: 0.5rem;
    white-space: nowrap;
    font-weight: bold;
  }

  td:nth-of-type(1)::before {
    content: "លេខសម្គាល់ ID";
  }

  td:nth-of-type(2)::before {
    content: "នាម ត្រកូល";
  }

  td:nth-of-type(3)::before {
    content: "ថ្នាក់";
  }

  td:nth-of-type(4)::before {
    content: "ភេទ";
  }

  td:nth-of-type(5)::before {
    content: "ថ្ងៃខែឆ្នាំកំណើត";
  }

  td:nth-of-type(6)::before {
    content: "បង់ថ្លៃអាហារ";
  }

  td:nth-of-type(7)::before {
    content: "បង់ថ្លៃសិក្សា";
  }

  td:nth-of-type(8)::before {
    content: "ផ្សេងៗ";
  }
}



.status-container {
  position: fixed;
  top: 8%;
  right: 1%;
  background: rgba(255, 255, 255, 0.07);  /* translucent white */
  backdrop-filter: blur(1px);  /* blur background behind */
  -webkit-backdrop-filter: blur(1px);  /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.4);  /* subtle white border */
  padding: 0.1px 5px;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); /* soft shadow */
  z-index: 1000;
  width: 174.55px;
  font-family: sans-serif;
  font-size: 14px;
}

.status-container h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
  text-align: center;
}

.status-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
}

.legend-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 4px;
  border: 2px solid;
  vertical-align: middle;
}

/* Different border colors for each */
.legend-box.inner {
  border-color: #787575e0; 
  background-color: transparent;       /* Black */
}

.legend-box.external {
  border-color: #fff9c4;       /* Yellow */
  background-color: #fff9c4;
}

.legend-box.hybrid {
  background: linear-gradient(to top right, #fff3b0 50%, #ffffff 50%);
  border: 2px solid #ffffff;
}

.legend-box.divorced {
  border-color: #2200ff;       /* Blue */
  background-color: transparent; 
}

.legend-box.orphan {
  border-color: #ff0000;
  background-color: transparent;       /* Red */
}

.status-legend div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}


.food-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* Checkbox item */
.food-month-checkbox {
  display: inline-block;
  width: 100px;
  font-size: 14px;
}

/* 📱 Small screens (phones) */
@media screen and (max-width: 600px) {
  .food-month-checkbox {
    width: 45%;
    font-size: 13px;
  }
}

/* 💻 Medium screens (tablets) */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  .food-month-checkbox {
    width: 30%;
  }
}

/* 🖥️ Large screens (desktops) */
@media screen and (min-width: 1025px) {
  .food-month-checkbox {
    width: 120px;
  }
}



/* Add this media query for mobile */
@media screen and (max-width: 390px) {

  .status-container {
    position: fixed;
    top: 8%;
    right: 2%;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 133px;
    font-family: Arial, sans-serif;
  }

  .back-button {
    top: 10px;
    left: 5px;
    padding: 10px 18px;
    font-size: 12px;
    margin-bottom: 40px;
  }

  .spacer {
    height: 1rem;
    /* Adjust as needed */
  }

  ul {
    font-size: 0.8rem;
  }

}

.back-button:hover {
  background-color: #404c62;
}

/* Mobile screens: only one button per line */
@media (max-width: 430px) {

  .status-container {
    position: fixed;
    top: 10%;
    right: 2%;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    padding: 0.1px 3px;
    border-radius: 5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 174.55px;
    font-family: Arial, sans-serif;
  }

  .button-container {
    flex-direction: column;
    align-items: center;
  }

  .button-container button {
    width: 90%;
    /* or 100% if preferred */
    min-width: unset;
  }
}