/* Stylesheet.css - Shared Styles */

.hidden {
  display: none !important;
}


body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
}

.page-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 9px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#pageContent {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}


.page-container-movenote {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.welcome-header {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  padding: 10px 10px 20px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 9px;
  box-sizing: border-box;
}

.welcome-header img {
  max-width: 90px;
  width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.welcome-header h1 {
  margin-bottom: 10px;
  font-size: 1.8em;
}

.welcome-header p {
  color: #666;
  font-size: 1.1em;
  margin: 0;
}

/* ========== Dashboard: My Class List ========== */
.dashboard-section {
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.hidden {
  display: none;
}

.class-card {
  margin-bottom: 16px;
}

.class-card button {
  padding: 6px 12px;
  background: #d5d1c3;
  color: rgb(114, 82, 82);
  border: none;
  border-radius: 4px;
}

.warning-message {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 1em;
  border-radius: 8px;
  margin: 1em 0;
}

/* File: Dashboard.html */

/* Remove default markers */
#upcomingSection .dash-summary::-webkit-details-marker,
#completedSection .dash-summary::-webkit-details-marker { display: none; }
#upcomingSection .dash-summary::marker,
#completedSection .dash-summary::marker { content: ""; }

/* Shared layout */
.dash-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 0;
}
.dash-heading {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}
/* Base capsule style */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

/* Closed state → "View" */
#upcomingSection:not([open]) .toggle-label,
#completedSection:not([open]) .toggle-label {
  background-color: #d6f5e3;   /* light mint */
  color: #055d39;              /* darker mint text */
}

/* Open state → "Hide" */
#upcomingSection[open] .toggle-label,
#completedSection[open] .toggle-label {
  background-color: #ffe0b3;   /* warm amber */
  color: #8a4b08;              /* darker amber text */
}

/* Text flips based on open/closed state */
#upcomingSection:not([open]) .toggle-label::before { content: "View >"; }
#upcomingSection[open]       .toggle-label::before { content: "Hide >"; }

#completedSection:not([open]) .toggle-label::before { content: "View >"; }
#completedSection[open]       .toggle-label::before { content: "Hide >"; }
/* ========== Dashboard Footer ========== */
.footer {
  max-width: 1000px;
  margin: 40px auto 20px;
  padding-top: 20px;
  border-top: 3px solid #cac5af;
  text-align: center;
  font-size: 0.9em;
  color: #666;
  box-sizing: border-box;
}
.footer a {
  color: #666;
  text-decoration: none;
}
.footer a:hover {
  color: #000;
}
/* ===================================== */

/* ========== Member Content Footer ========== */
.member-footer {
  max-width: 1000px;
  margin: 40px auto 20px;
  padding-top: 20px;
  text-align: center;
  box-sizing: border-box;
}
.member-footer-line {
  border: none;
  height: 4px;
  background-color: #8B0000; /* Deep red */
  width: 90%;
  margin: 0 auto 10px;
  border-radius: 2px;
}
.member-footer-text {
  font-size: 1rem;
  color: #333;
}
/* ============================================== */

.header {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.header img {
  max-height: 90px;
  height: auto;
}

.header h1 {
  font-size: 1.8rem;
  margin: 0;
  white-space: nowrap;
  color: #3c382a;
}

h1, h2, h3 {
  color: #3c382a;
}

a {
  color: #0066cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button, .nav-button {
  padding: 6px 8px;
  font-size: .75em;
  cursor: pointer;
  background-color: #d5d1c3;
  color: rgb(83, 65, 65);
  border: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  margin: 5px;
}
button:hover:not(:disabled), .nav-button:hover:not(:disabled) {
  background-color: #b1ab96;
}
button:disabled, .nav-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.link-style {
  color: #0056b3;
  text-decoration: underline;
  font-weight: bold;
}
.link-style:hover {
  color: #003d80;
}


/* ================= Transport Icons ================= */

.transport-icons i {
  margin: 0 6px;
  font-size: 1.2em;
  color: #444;
}
.transport-icons i:hover {
  color: #007bff;
}





/* ================= MENU STYLES ================= */
#menuContainer {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.menu-outer-container {
  width: 100%;
  border-radius: 9px;
  overflow: visible;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-menu {
  width: 100%;
  background-color: #d5d1c3;
  font-family: sans-serif;
  font-size: 0.95em;
  border-radius: 9px;
   overflow-x: visible;                /* Enable scroll only if needed */
  -ms-overflow-style: none;        /* IE/Edge */
  scrollbar-width: none;           /* Firefox */
  box-sizing: border-box;
}

.main-menu::-webkit-scrollbar {
  display: none;                   /* Chrome/Safari */
}

.main-menu > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.main-menu > ul > li {
  position: relative;
  white-space: nowrap;
  margin-right: 10px;
}

.main-menu > ul > li > a,
.main-menu > ul > li > button {
  display: block;
  padding: 12px 18px;
  text-decoration: none;
  color: #4b463d;
  font-weight: bold;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #bbadad;
  min-width: 220px;
  border: 1px solid #b81515;
  z-index: 9999 ! Important;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.main-menu li.dropdown:hover > .dropdown-content,
.main-menu li.dropdown.open > .dropdown-content {
  display: block;
}

/* Submenu links */
.dropdown-content a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
}

.dropdown-content a:hover {
  background-color: #f0f0f0;
}

/* === Nested Dropdowns === */
.dropdown-content .dropdown {
  position: relative;
}

.dropdown-content .dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 110;
  background: #fff;
  min-width: 220px;
  border: 1px solid #ccc;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.dropdown-content .dropdown:hover .dropdown-content {
  display: block;
}

/* ✅ Align Logout link to far right */
.main-menu > ul > li.logout-link {
  margin-left: auto;
}
.dropdown-content li {
  background: #fff !important;
}


/* =============FoundationsLessonPlan layout styles================= */
/* FoundationsLessonPlan layout styles */
.lesson-form-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-top: 20px;
}

.lesson-form-grid label,
.lesson-form-grid input,
.lesson-form-grid textarea,
.lesson-form-grid select,
.lesson-form-grid button {
  width: 100%;
  box-sizing: border-box;
}

.lesson-form-grid textarea {
  min-height: 80px;
}

.lesson-form-grid button {
  grid-column: span 2;
  width: auto;
  justify-self: left;
}



/* =============Accordion Styles=================================== */

/* --- Accordion Sections --- */
.info-section-details {
    margin-bottom: 20px;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.info-section-summary {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
    border-bottom: 1px solid #eee;
}
.info-section-details[open] > .info-section-summary {
    border-bottom: 1px solid #ddd;
}
.info-section-summary::-webkit-details-marker {
    display: none;
}
.info-section-summary::before {
    content: '▶ ';
    font-size: 0.8em;
    margin-right: 5px;
    display: inline-block;
    transition: transform 0.2s;
}
.info-section-details[open] > .info-section-summary::before {
    transform: rotate(90deg);
}
.info-section-content {
  margin: 20px auto;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9; 
  max-width: 900px;
}

.info-section-summary h2 {
    margin: 0;
    display: inline;
    font-size: 1.2em;
    color: #0056b3;
}


.info-section-summary h4 {
  margin: 0;
  display: inline;
  font-size: 1.2em;
  color: #0056b3;
}



/* =================== Unified Modal Popup Styles =================== */

.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 998;
}

.modal {
  background-color: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 640px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal label {
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 4px;
}

.modal input[type="text"],
.modal input[type="url"],
.modal input[type="number"],
.modal select,
.modal textarea {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  resize: vertical;
}

.modal textarea {
  min-height: 80px;
}

.modal .form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.2em;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
}

.close-button:hover {
  color: #000;
}

.modal code {
  font-family: monospace;
  background: #f8f8f8;
  padding: 2px 4px;
  display: inline-block;
  margin-top: 2px;
}
.modal p {
  margin-bottom: 0.5em;
}

/* Modal base */
.ctca-modal__overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9998;
}
.ctca-modal {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 50px rgba(0,0,0,.35);
  padding: 16px 20px;
  z-index: 10001; /* keep above overlay */
}
.ctca-modal__overlay { z-index: 10000; }

.ctca-modal__lock { overflow: hidden; }
.ctca-modal[hidden], .ctca-modal__overlay[hidden] { display: none !important; }

.ctca-modal__close {
  position: sticky; top: 0; float: right;
  font-size: 26px; line-height: 1; border: none; background: transparent; cursor: pointer;
}
.ctca-modal__title { margin: 0 0 8px; font-weight: 700; }
.ctca-modal__body { margin: 8px 0 12px; }
.ctca-modal__media { display: grid; gap: 12px; }
.ctca-modal__figure { margin: 0; }
.ctca-modal__img, .ctca-modal__video { display: block; width: 100%; height: auto; border-radius: 10px; }
.ctca-modal__caption { font-size: 0.9rem; opacity: 0.8; margin-top: 6px; }


/* Optional decorative cursor */
/*.modal {*/
 /* cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='50%' x='50%' dy='.35em' text-anchor='middle' font-size='26'>☯</text></svg>") 16 16, auto;*/
/*}*/

/* ================= Pagination Controls ================= */

.pagination-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

/* Consistent Table Sizing */
.data-table {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border: 1px solid #ccc;
  padding: 8px 10px;
  text-align: left;
}

.data-table th {
  background-color: #f0f0f0;
  font-weight: bold;
}

#attendanceTableHead th {
  text-align: left;
}

th {
  text-align: left;
}
/* Left-align only the Student column */
table th:nth-child(2),
table td:nth-child(2) {
  text-align: left;
}

/* Light green highlight for present rows */
.present-row {
  background-color: #d4edda;
  transition: background-color 0.2s ease;
}
/* ================= TOAST STYLES ================= */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.95em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, bottom 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  bottom: 50px;
}

.toast.success {
  background-color: #28a745;
}

.toast.error {
  background-color: #dc3545;
}


/* =================Notes CSS=============== */

/* Notes quick add helpers */
.meta-row { display:flex; align-items:center; gap:8px; margin-top:2px; }
.date-row { margin-top:4px; }

/* You already have .class-card and .nav-button — these reuse your existing styles */


/* =============Yin Yang Bullet=========== */
.yinyang-symbol-bullet {
  display: inline-block;
  transform: rotate(-90deg) scaleY(-1);
  font-weight: bold;
  color: #444;
  font-size: 1.5em;
}

/* =============Yin Yang Header=========== */
.yinyang-symbol-header {
  display: inline-block;
  transform: rotate(-90deg) scaleY(-1);
  font-weight: bold;
  color: #444;
  font-size: 90px;
}

/* === Moves Table Styling === */
.moves-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.95em;
}

.moves-table th,
.moves-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.moves-table th {
  background-color: #f2f2f2;
  font-weight: bold;
  font-size: 0.9em;
  color: #333;
}

.moves-table td button {
  padding: 4px 8px;
  font-size: 0.85em;
  color: #666;
  background-color: #eee;
  border: none;
  border-radius: 3px;
  cursor: not-allowed;
}
/*----------Print Styles------*/

@media print {
  body * {
    visibility: hidden;
  }
  #printableReceipt, #printableReceipt * {
    visibility: visible;
  }
  #printableReceipt {
    position: absolute;
    left: 0;
    top: 0;
  }
}

/* ==================== edit 108 moves styles ==================== */

/* --- Card-style edit form layout --- */
#moveFormContainer {
background: #fff;
border: 1px solid #ccc;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
padding: 2rem;
max-width: 100%;
margin: 0 auto;
}

/* --- Form Row Styling --- */
.form-row {
display: flex;
flex-direction: column;
margin-bottom: 1.25rem;
}

.form-row label {
font-weight: 600;
margin-bottom: 0.3rem;
}

.form-row input,
.form-row textarea {
font-size: 1rem;
padding: 0.5rem 0.75rem;
border: 1px solid #ccc;
border-radius: 6px;
width: 100%;
box-sizing: border-box;
}

/* --- Specific input style for Chinese field --- */
input#chinese {
color: red;
font-weight: bold;
}

/* --- Buttons --- */
button.btn-primary,
button.btn-secondary {
padding: 0.6rem 1.2rem;
font-size: 1rem;
border-radius: 6px;
cursor: pointer;
}

button.btn-primary {
background-color: #0055aa;
color: #fff;
border: none;
margin-left: 0.75rem;
}

button.btn-secondary {
background-color: #eee;
border: 1px solid #bbb;
color: #333;
margin-left: 0.75rem;
}

/* --- Header and search inputs --- */
.page-container > h1 {
text-align: center;
font-size: 1.75rem;
margin-top: 1rem;
margin-bottom: 2rem;
}

#searchInput,
#moveNumberInput {
padding: 0.5rem 0.75rem;
font-size: 1rem;
border-radius: 6px;
border: 1px solid #ccc;
}

.readonly-field {
background-color: #dbdada !important;
}

/* --- Top input layout styles (updated to match bottom row) --- */
.top-row-group {
display: flex;
gap: .75rem;
flex-wrap: wrap;
margin-bottom: .25rem;
}

.top-row-group input {
padding: 0.6rem 0.8rem;
border: 1px solid #ccc;
border-radius: 6px;
font-size: .9rem;
width: 212px;
box-sizing: border-box;
background-color: #dbdada;
}

/* --- Bottom row group layout --- */
.bottom-row-group {
display: flex;
gap: .75rem;
flex-wrap: wrap;
margin-bottom: 1.5rem;
}

.bottom-row-group .form-field {
flex: 1 1 100px;
display: flex;
flex-direction: column;
margin-bottom: .25rem; /*space after bottom row form fields */
}

.bottom-row-group label {
font-weight: 600;
margin-bottom: 0.3rem;
}

.bottom-row-group input {
padding: 0.6rem 0.8rem;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 1rem;
width: 100%;
box-sizing: border-box;
background-color: #dbdada;
}

/* --- Mobile responsiveness --- */
@media (max-width: 600px) {
  .top-row-group,
  .bottom-row-group {
    flex-direction: column;
  }

  .top-row-group input {
    width: 100%;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    height: 2.2rem; /* Add this to reduce height */
  }
}
.search-suggestions {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  max-height: 200px;
  overflow-y: auto;
  /*border: 1px solid #ccc;*/
  border-radius: 6px;
  background: #fff;
  position: absolute;
  width: 300px;
  z-index: 10;
}

.search-suggestions li {
  padding: 0.5rem;
  cursor: pointer;
}

.search-suggestions li:hover {
  background-color: #eee;
}

.form-row.button-group {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.form-row.button-group button {
  margin-left: 0 !important;
}

button.btn-primary {
  background-color: #ddd; /* match hover-like neutral tone */
  color: #333;
  border: 1px solid #bbb;
}
.button-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

button.btn-update {
  background-color: #ddd;
  font-size: 1rem;
  color: #222;
  border: 1px solid #bbb;
  font-weight: bold;
}

button.btn-update:hover {
  background-color: #bbb;
  color: #000;
}

.search-bar-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-bar-row .search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-bar-row input[type="text"] {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 200px;
}

.search-bar-row button {
  padding: 0.5rem 0.9rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #bbb;
  background-color: #eee;
  color: #333;
  cursor: pointer;
}


/*-------------workshop notes--------*/
 form#workshopNoteForm {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  form#workshopNoteForm label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
  }

  form#workshopNoteForm input[type="text"],
  form#workshopNoteForm select {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
  }

  form#workshopNoteForm input[type="checkbox"] {
    margin-right: 6px;
  }

  form#workshopNoteForm .primary-button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
  }

  #quillEditor {
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    min-height: 150px;
    margin-top: 6px;
    padding: 8px;
  }

  h1 {
    text-align: center;
    margin-top: 30px;
  }

  small.privacy-note {
    color: #666;
    display: block;
    margin-bottom: 12px;
    font-size: 0.85em;
  }

form#workshopNoteForm label + input,
form#workshopNoteForm label + select,
form#workshopNoteForm label + textarea,
form#workshopNoteForm label + div {
  margin-bottom: 16px;
}

  
    .filter-controls {
      background: #f9f9f9;
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 20px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
    }

    .filter-controls label {
      font-weight: 600;
      display: flex;
      flex-direction: column;
    }

    .filter-controls select,
    .filter-controls input[type="checkbox"] {
      margin-top: 6px;
    }

    table.data-table {
      width: 100%;
      border-collapse: collapse;
      background: #fff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    table.data-table th,
    table.data-table td {
      padding: 12px;
      border: 1px solid #ddd;
      text-align: left;
    }

    table.data-table th {
      background-color: #f0f0f0;
      font-weight: bold;
    }

    #noteDetailModal {
      background: #fff;
      border-radius: 12px;
      padding: 24px;
      max-width: 600px;
      width: 90%;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .modal-close-btn {
      position: absolute;
      top: 10px;
      right: 14px;
      font-size: 1.2em;
      background: none;
      border: none;
      cursor: pointer;
    }

    .note-content {
      white-space: pre-wrap;
      margin-top: 16px;
    }

    h1 {
      text-align: center;
      margin-top: 30px;
    }
  /*===============Badge Toasts==================*/
  /* Centered red toast for earned badge */
.badge-toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #b30000;
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  font-size: 1.2em;
  z-index: 9999;
  text-align: center;
}


@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -40%); }
  10% { opacity: 1; transform: translate(-50%, -50%); }
  90% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -60%); }
}

/* Attendance.css Enhancements */

/* General layout */
.page-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Class selector and week info */
#classSelect {
  padding: 0.5em;
  font-size: 1em;
  width: 100%;
  margin-bottom: 1em;
}

#overrideContainer {
  background-color: #f9f9f9;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 0.5em;
}

/* Student search input */
#studentSearch {
  padding: 0.5em;
  margin-top: 1em;
  margin-bottom: 1em;
  width: 100%;
  font-size: 1em;
  border: 1px solid #aaa;
  border-radius: 4px;
}

.search-results {
  border: 1px solid #ccc;
  background-color: #fff;
  max-height: 150px;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.search-result-item {
  padding: 0.5em;
  cursor: pointer;
}
.search-result-item:hover { 
  background-color: #eee;
}

/* Ensure the dropdown is clickable above the table */
.search-results {
  z-index: 1000; /* Higher z-index to appear above other elements */
  background: #fff;
  border: 1px solid #ddd;
}

.search-result-item {
  padding: 6px 8px;
}

.search-result-item:hover {
  background: #f5f5f5;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  font-size: 0.95em;
}
th, td {
  padding: 0.5em;
  text-align: center;
  border-bottom: 1px solid #ddd;
}
th {
  background-color: #f0f0f0;
}
tr:nth-child(even) {
  background-color: #fafafa;
}

/* Buttons */
.actions {
  margin-top: 1em;
  text-align: right;
}

button {
  padding: 0.6em 1em;
  font-size: 0.95em;
  margin-right: 0.5em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button#saveBtn {
  background-color: #2b7a78;
  color: white;
}
button#saveBtn:hover {
  background-color: #226c6a;
}

button#addGuestBtn {
  background-color: #999;
  color: white;
}
button#addGuestBtn:hover {
  background-color: #777;
}

.small-edit-button {
  background-color: #eee;
  border: 1px solid #ccc;
  padding: 2px 6px;
  font-size: 0.85em;
  cursor: pointer;
  border-radius: 4px;
}


/* Guest entry inputs */
#guestFirstName,
#guestLastName,
#guestRegion {
  padding: 0.5em;
  margin-right: 0.5em;
  margin-bottom: 0.5em;
  width: calc(30% - 1em);
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ====== Shared Form Layout Utilities ====== */

form.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.form-grid label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid select {
  padding: 10px;
  font-size: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
  background-color: #fff;
}

.form-grid .button-primary {
  margin-top: 1rem;
  width: 100%;
  padding: 12px;
  font-size: 1.1em;
}

@media (max-width: 600px) {
  form.form-grid {
    padding: 15px;
    border-radius: 8px;
  }

  .form-grid input,
  .form-grid select {
    font-size: 16px;
    width: 100%;
  }

  .form-grid label {
    margin-bottom: 5px;
  }
}

/* ========== Member Management Pages ========== */

.mm-search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

/* Results should anchor to the name input */
.mm-search-group { position: relative; display: inline-block; min-width: 240px; }

/* Results dropdown (hidden by default) */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;                 /* makes it as wide as the input */
  display: none;            /* 🔑 hide until we have matches */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-height: 180px;
  overflow-y: auto;
  z-index: 5;
}

.search-result-item { padding: 8px 10px; cursor: pointer; }
.search-result-item:hover { background: #f6f6f6; }

/* Compact inline status checkboxes */
.status-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2em;
  border: none;
  padding: 0.3em 0;
  margin: 0.2em 0 0.6em 0;
}

.status-filter-row legend {
  font-weight: 600;
  margin-right: 1em;
}

.status-filter-row label {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.95em;
  white-space: nowrap;
  margin-right: 10px;
  white-space: nowrap
}
/* Petty cash: checkbox row helpers */
 .grid-span-2 { grid-column: 1 / -1; }        /* span both columns */
.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-weight: normal;                           /* matches other labels visually */
} 
/* Align GST/HST checkbox with other inputs */
.lesson-form-grid .gst-row {
  align-self: center;
}

.lesson-form-grid .gst-checkbox {
  justify-self: start;
  margin-left: 1px;   /* subtle nudge to align with other inputs */
  transform: none;
  width: 16px;
  height: 16px;
}
/* ================= Petty Cash Status Chips (added) ================= */
.data-table { table-layout: fixed; }
.data-table th, .data-table td { word-break: break-word; }
.status-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.85em;
  line-height: 1.2;
  background: #eee;
  color: #333;
  white-space: nowrap;
  font-weight: 600;
}
.status-entered { background: #e6f4ea; color: #0b5; }
.status-pending { background: #fff3cd; color: #8a4b08; }
.status-reimbursed { background: #e1f0ff; color: #0a58ca; }
.status-rejected { background: #fde2e1; color: #a61; }
/* Narrow select checkbox column and prevent status wrapping (petty cash) */
.data-table th:first-child, .data-table td:first-child { width: 28px; }
.status-chip { white-space: nowrap; }

/* ================= Transaction Audit page layout ================= */
/* Let this page go full width */
.page-container.audit-page{
  max-width: none;
  width: 100%;
}

/* Allow table to breathe; scroll instead of crushing cells */
.table-wrap{
  width: 100%;
  overflow-x: auto;
}

/* Audit table: behave like a spreadsheet */
table.audit-table{
  width: 100%;
  table-layout: auto;           /* key: don't crush columns into letter-stacks */
}

/* If your global CSS forces weird wrapping, override it here */
.audit-table th,
.audit-table td{
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Column sizing (tweak these numbers as you like) */
.audit-table th.col-date,   .audit-table td.col-date   { width: 110px; white-space: nowrap; }
.audit-table th.col-type,   .audit-table td.col-type   { width: 90px;  white-space: nowrap; }
.audit-table th.col-name,   .audit-table td.col-name   { width: 220px; white-space: nowrap; } /* keeps names horizontal */
.audit-table th.col-amount, .audit-table td.col-amount { width: 95px;  }
.audit-table th.col-method, .audit-table td.col-method { width: 140px; }
.audit-table th.col-cheque, .audit-table td.col-cheque { width: 95px;  }
.audit-table th.col-save,   .audit-table td.col-save   { width: 90px;  white-space: nowrap; }

/* Description column - 20% wider than previous 360px = 432px */
.audit-table th.col-desc, .audit-table td.col-desc{
  width: 750px;
}

/* Critical: prevent inputs/selects from overflowing their cells */
.audit-table input,
.audit-table select{
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;                 /* THIS fixes the cheque field bleeding */
}

/* Optional: make description input a bit tighter so it doesn't dominate */
.audit-table .edit-desc{
  width: 100%;
}

/* AccountingReport table styling - smaller fonts */
#reportTableContainer table {
  font-size: 0.85em;
}

#reportTableContainer th,
#reportTableContainer td {
  padding: 6px 10px;
}

#reportTableContainer th {
  font-size: 0.9em;
  font-weight: 600;
}

#reportTableContainer th:first-child,
#reportTableContainer td:first-child {
  min-width: 110px;
  width: 110px;
}

#reportTableContainer th:nth-child(2),
#reportTableContainer td:nth-child(2) {
  max-width: 80px;
  width: 80px;
}