/* Reset some default styles */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  box-sizing: border-box;
  color: #333;
}


main {
  padding-top: 0;
  margin-top: 0;
}

body {
  background-repeat: no-repeat;
  background-size: cover;
  margin-top: 0 !important;
  padding: 0 !important;
}
/* ✅ Apply the tall background only to pages that need it */
body.tall-background {
  background-image: url('images/background/tallBackground.png');
  background-repeat: no-repeat;
  background-size: cover;
}
* {
  background: transparent;
  box-shadow: none;
}

/* App container */
.app {
  max-width: 400px;
  margin: 0px auto;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}


/* Logo */
.logo {
  width: 50%; /* increase this as needed */
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
}

/* Form inputs */
form input {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

/* Buttons */
button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background-color: #00477d;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #00345c;
}

/* Footer */
footer {
  margin-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

/* Error message */
#loginError, #signupError {
  margin-top: 15px;
  font-size: 0.9rem;
  color: red;
}

/* Home Page Layout*/

.avatar-badge {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.avatar {
  width: 120px;
  height: auto;
  border-radius: 1rem;
  object-fit: cover;
  display: block;
  background: transparent;
}

.badge {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #00477d;
  text-align: center;
}

#progressCard h3 {
  color: white;
}


/*Progress Bar Styles*/

.progress-card {
  width: 90%;
  background-color: #3bb4c7;
  border: 5px solid #238cb8;
  border-radius: 30px;
  padding: 0rem 0.5rem;
  position: relative;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
}

.progress-label {
  font-size: 25px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.progress-container {
  background-color: white;
  border: 2px solid #00477d;
  border-radius: 10px;
  max-width: 80%;
  overflow: hidden;
  height: 20px;
  margin: 0 auto -5px auto;
}

.progress-bar {
  height: 100%;
  transition: width 0.3s ease-in-out, background 0.3s ease;
  border-top-left-radius: 8px;   /* ✅ matches inner curve of container */
  border-bottom-left-radius: 8px;
  border-top-right-radius: 8px;  /* keeps rounded on right */
  border-bottom-right-radius: 8px;
}

.percent-text {
  text-align: center;
  font-size: 20px;
  margin-top: 3px;
  color: white;
  font-weight: bold;
}

/* Role-based buttons */

#myPointsBtn,
#reviewLogsBtn,
#manageUsersBtn {
  display: none;
}

/* Override wide default for mobile layout */
@media (max-width: 480px) {
  .nav-button {
    min-width: unset;
    width: 100%;
    max-width: 130px;
    font-size: 1rem;
    margin: .5rem;
  }

  .button-row {
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
  }

  .button-col {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }
}
body.student-mode #myPointsBtn {
  display: flex;
}
body.admin-mode #reviewLogsBtn,
body.teacher-mode #reviewLogsBtn {
  display: flex;
}
body.admin-mode #manageUsersBtn {
  display: flex;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* wrapper and rows*/

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 0;
}

.button-area {
  width: 100%;
  max-width: 360px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invisible {
  visibility: hidden;
  position: absolute;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 1rem;
}

.button-col {
  flex: 1;
  display: flex;
  justify-content: center;
}
.button-col.visible {
  display: flex;
  justify-content: center;
}

.button-row.flex-center {
  justify-content: center !important;
}

/*colored button variants*/

.nav-button.log { 
  background-color: #157dab;
  height: 75px;}

.nav-button.points,
.nav-button.review { 
  background-color: #2bb8d6 !important;
  height: 60px;
  color: white;
  align-items: center;
  justify-content: center;
 }

.nav-button.review .btn-text,
.nav-button.points .btn-text {
  color: white;
}

.highlight-button.leaderboard { 
  background-color: #fcb738; }

  .nav-button.settings { 
  background-color: #38b9f0;
  height: 70px;
 }

  .nav-button.faq { 
  background-color: #21a4ff;
  height: 60px;
 }

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  color: white;
  cursor: pointer;
  text-align: center;
  margin: .5rem;

}
.nav-button .btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-button:hover {
  transform: scale(1.03);
}

.button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.highlight-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  height: 80px;
  width: 100%;
  max-width: 280px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

.highlight-button:hover {
  transform: scale(1.03);
}
.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-text {
  display: inline-block;
  font-weight: bold;
}

.btn-icon img,
.nav-button img {
  height: 40px;
  width: auto;
  margin-right: 6px;
}

/* Login Page Styling */
body.white-page {
  background-color: white !important; 
  background-image: none !important;
  min-height: 100%;
  color:#3eb7f8; /* Button Blue */
}

/* Logo specific on login */
body.white-page .logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 20px auto;
}

/* Buttons */
body.white-page button {
  background-color: #3eb7f8;
  color: white;
  font-weight: bold;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  margin: 10px;
}

.faq-section {
  position: relative;
  width: 100%;
  border-radius: 20px;
  padding: 40px 16px 16px;
  border: 6px solid;
  background-color: white;
  color: inherit;
  box-sizing: border-box;
}
.faq-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ Ensures all children (boxes) are centered */
  gap: 40px;
  padding: 20px;
  width: 100%;
  max-width: 700px; /* ✅ Controls max width of the column */
  margin: 0 auto;
  box-sizing: border-box;
}

.settings-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

#avatarImage {
  display: block;
  margin: 0  auto 20px;
  width: 120px;
  height: auto;
  border-radius: 20px;
  cursor: pointer;
}

body.white-page button {
  background-color: #3eb7f8;
  color: white;
}
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#categoryPreview {
  display: block;
  margin: 20px auto;
  max-width: 100px;
  height: auto;
}
.white-page select,
.white-page textarea,
.white-page input[type="date"],
.white-page input[type="number"] {
  width: 100%;
  padding: px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}
.white-input,
.white-input select,
.white-input input,
.white-input textarea {
  padding: 14px 16px !important;   /* Makes all fields taller */
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  width: 100%;
}
/* ===== MY POINTS PAGE STYLING ===== */

/* Page title (dark blue like home page) */
#myPointsTitle {
  color: #00477d;
  text-align: center;
  font-size: 2rem;
  margin-top: 10px;
  font-weight: bold;
}

/* My Log Entries title */
#logEntriesTitle {
  color: #00477d;
  text-align: center;
  font-size: 1.5rem;
  margin: 20px 0 10px 0;
}

/* Container for category summary */
#categorySummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin: 15px auto;
  width: 95%;
}
#pointsSummary {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #00477d;
}

/* Category Summary */
.category-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 800px;
}
.category-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px;
  width: 140px;
  text-align: center;
}
.category-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
}

.category-card h3 {
  margin: 5px 0;
  color: #00477d;
  font-size: 1.2rem;
}

.category-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
}

/* Logs Table */
.log-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Total card stands out slightly */
.total-card {
  border: 2px solid #00477d;
}

/* Log table styling */
.logs-container {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: 95%;
  max-width: 1000px;
  margin: 0 auto 30px;
}

#logsTable thead th {
  background: #3eb7f8;   /* ✅ Full blue */
  color: white;
  text-align: center;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #00477d;
  padding: 8px;
}

#logsTable td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
#logsTable tr:nth-child(even) {
  background: #f7f7f7;
}

/* Alternating row colors */
.log-row-even {
  background: #f9f9f9;
}

.log-row-odd {
  background: #eeeeee;
}

/* Buttons stay consistent */
.blue-button {
  background: #3eb7f8;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.blue-button:hover {
  background: #00325a;
}


/* Responsive tweaks */
@media (max-width: 600px) {
  .category-card {
    width: 100px;
    padding: 8px;
  }
  #logsSection {
    overflow-x: auto;
  }
  #logsTable th, #logsTable td {
    font-size: 0.8rem;
    padding: 6px;
  }
  #levelBadge {
    width: 100px !important;
    height: auto !important;
  }
}

/* Level badge style */
#levelBadge {
  width: 120px;    /* larger on desktop */
  height: auto;
}
/* ---- Review Logs Page Styles ---- */

/* ✅ Ensure the main container takes full width */
main.app {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ✅ Review Logs Header */
main.app > header h2 {
  flex: 1;
  text-align: center;
  color: #00477d; /* ✅ Dark blue */
  margin: 0;
}

/* ✅ Category Summary Layout */
#categorySummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: 95%;
  margin: 15px auto;
  padding: 0 10px;
}
.category-card {
  width: 100%;
  max-width: 170ps;
  background: #f4f4f4;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ✅ Search bar */
#searchInput {
  background: white;
  padding: 8px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  margin: 10px auto;
  display: block;
}




/* ✅ Table Cells */
#logsTable th, #logsTable td {
  padding: 6px 8px; /* ✅ smaller padding */
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

/* ✅ Compact Column Widths */
#logsTable th:nth-child(2),
#logsTable td:nth-child(2) { width: 120px; } /* Category */
#logsTable th:nth-child(3),
#logsTable td:nth-child(3) { width: 130px; } /* Date */
#logsTable th:nth-child(4),
#logsTable td:nth-child(4) { width: 80px; }  /* Points */

/* ✅ Inputs */
#logsTable input,
#logsTable select,
#logsTable textarea {
  width: 100%;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.85rem;
}
#logsTable textarea {
  min-height: 40px;
  resize: vertical;
  line-height: 1.2;
}

/* ✅ Row Styles */
#logsTable tr:nth-child(even) { background: #f9f9f9; }
#logsTable tr:hover { background: #eef7ff; }
/* ---- Layout Adjustments ---- */
#pageHeader {
  display: flex;
  align-items: center;
  padding: 10px 20px;
}
#pageHeader h2 {
  flex: 1;
  text-align: center;
  color: #00477d;
  margin: 0;
}

/* ✅ Action Bar */
#actionBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  margin: 10px auto;
}
#actionBar #searchInput {
  width: 300px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

/* ✅ Summary Cards Narrower */
#categorySummary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  width: 95%;
  margin: 15px auto;
}
.category-card {
  width: 140px;  /* ✅ fixed narrower width */
  background: #f4f4f4;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ✅ Fixed Header Table (just column titles) */
#logsHeaderTable {
  width: 95%;
  margin: 0 auto;
  border-collapse: collapse;
}
#logsHeaderTable th {
  background: #3eb7f8;
  color: white;
  border-bottom: 2px solid #00477d;
  padding: 6px;
  text-align: left;
}

/* ✅ Scrollable Table Body */
#logsTable td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
}

/* ✅ Compact Column Widths */
#logsHeaderTable th:nth-child(2),
#logsTable td:nth-child(2) { width: 120px; }
#logsHeaderTable th:nth-child(3),
#logsTable td:nth-child(3) { width: 120px; }
#logsHeaderTable th:nth-child(4),
#logsTable td:nth-child(4) { width: 80px; }

/* ✅ Inputs */
#logsTable input, #logsTable select, #logsTable textarea {
  width: 100%;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.85rem;
}
#logsTable textarea {
  min-height: 40px;
  resize: vertical;
  line-height: 1.2;
}

/* ✅ Pagination */
#paginationControls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}
/* ✅ Summary Cards Centered */
#categorySummary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;  /* ✅ center horizontally */
  gap: 10px;
  width: 100%;
  margin: 15px auto;
}
.category-card {
  width: 140px;
  background: #f4f4f4;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ✅ Action Bar Under Cards */
#actionBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  margin: 10px auto 15px;
}
#actionBar #searchInput {
  width: 300px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

/* ✅ Rounded Table Header */
#logsHeaderTable {
  width: 95%;
  margin: 0 auto;
  border-collapse: collapse;
}
#logsHeaderTable th {
  background: #3eb7f8;
  color: white;
  border-bottom: 2px solid #00477d;
  padding: 6px;
  text-align: left;
}
#logsHeaderTable thead tr th:first-child {
  border-top-left-radius: 8px;
}
#logsHeaderTable thead tr th:last-child {
  border-top-right-radius: 8px;
}

/* ✅ Scrollable Table Body */
/* ---- My Points Table Layout ---- */

/* ✅ Fixed Header Table */
#pointsHeaderTable th {
  background: #3eb7f8;
  color: white;
  border-bottom: 2px solid #00477d;
  padding: 6px;
  text-align: left;
}
#pointsHeaderTable thead tr th:first-child {
  border-top-left-radius: 8px;
  width: 60px; /* ✅ narrow category column */
}
#pointsHeaderTable thead tr th:last-child {
  border-top-right-radius: 8px;
}

/* ✅ Scrollable Table Body */
#logsTable td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
}

/* ✅ Column Widths */
#logsTable td:nth-child(1) { width: 60px; text-align: center; }  /* category icon */
#logsTable td:nth-child(2) { width: 130px; }                     /* date */
#logsTable td:nth-child(3) { width: 80px; }                      /* points */
#logsTable td:nth-child(4) { width: auto; }                      /* note expands */
#logsTable td:nth-child(5) { width: 100px; text-transform: capitalize; }

/* ✅ Progress Label White */
.progress-label {
  color: white;
}

/* ✅ Welcome Title Styling */
#welcomeTitle {
  font-size: 2rem;
  font-weight: bold;
  color: #00477d;
  text-align: center;
  margin-bottom: 1rem;
}

/* ✅ Tighten Button Spacing */
#topButtonRow {
  margin-bottom: 0.3rem;
}
.button-row.center {
  margin-top: 0.3rem;
}
/* ===== LEADERBOARD STYLING (Scoped to Leaderboard Page) ===== */

body.leaderboard-page .level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 95%;
  max-width: 900px;
}

body.leaderboard-page .level-badge-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25); /* soft shadow */
  border: none;                               /* remove any outline */
  border-radius: 50%;    }

/* Allow avatars to extend */
body.leaderboard-page .level-track {
  position: relative;
  flex: 1;
  min-width: 1200px;
  height: 80px;
  border-radius: 50px;
  background: #3eb7f8;
  border: 4px solid #222;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  overflow: visible;
  padding-right: 80px;  /* ✅ ensures scroll bar allows full avatar view */
}
body.leaderboard-page .avatar-track {
  position: relative;
  overflow: visible;
  width: 100%;
  height: 100%;
}

/* ✅ Scoped avatar style to leaderboard only */
body.leaderboard-page .avatar {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

body.leaderboard-page .avatar:hover {
  transform: scale(1.1);
  z-index: 10;
}
/* ===== MANAGE USERS PAGE ===== */

body.manage-users {
  background: white;
  color: #333;
}

/* Table wrapper */
#usersSection {
  background: white;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

/* Table styling */
#userTable {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.9rem;
  background: white;
}

#userTable thead th {
  background: #3eb7f8;
  color: white;
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid #00477d;
}


#userTable tr:nth-child(even) {
  background: #f9f9f9;
}

#userTable tr:hover {
  background: #eef7ff;
}

/* Inputs in table */
#userTable input[type="text"],
#userTable input[type="email"] {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Avatar upload styling */
#userTable img {
  display: block;
  margin-bottom: 4px;
}

#userTable .avatar-upload {
  font-size: 0.8rem;
}

/* Blue buttons inside table */
#userTable button.blue-button {
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}

/* Save button */
#userTable button[id^="save-"] {
  background: #28a745;
  color: white;
  display: none;
}

#userTable button[id^="save-"]:hover {
  background: #1e7e34;
}

/* Add User Button */
#addUserBtn {
  background: #3eb7f8;
  font-size: 1rem;
  padding: 8px 14px;
  border-radius: 6px;
}

#addUserBtn:hover {
  background: #00325a;
}

/* Modal styling */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.modal-box h3 {
  margin-top: 0;
  color: #00477d;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.multi-check-option {
  display: block;
  margin: 5px 0;
}
/* ===== Manage Users Table Scroll & Layout ===== */

/* ✅ Table Layout */
#userHeaderTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;    /* consistent column widths */
  min-width: 900px;       /* prevent squishing */
}

#userHeaderTable thead tr th:first-child {
  border-top-left-radius: 6px;   /* only left edge rounded */
}

#userHeaderTable thead tr th:last-child {
  border-top-right-radius: 6px;  /* only right edge rounded */
}

#usersScrollSection {
  width: 95%;
  margin: 0 auto 10px auto;
  max-height: 600px;  /* ✅ increased height to fit 7–8 rows */
  overflow-y: visible;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#userTable {
  width: 100%;
  border-collapse: collapse;
}


#userTable tr:nth-child(even) {
  background: #f9f9f9;
}

/* Pagination */
#paginationControls button {
  background: #00477d;
  color: white;
  border: none;
  margin: 0 3px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
#paginationControls button.active {
  background: #3eb7f8;
}
/* Match header and body column widths */
#userHeaderTable th:nth-child(5),
#userTable td:nth-child(5) {
  width: 10%; /* Roles */
}
#userHeaderTable th:nth-child(6),
#userTable td:nth-child(6) {
  width: 15%; /* Teachers */
}
#userHeaderTable th:nth-child(8),
#userTable td:nth-child(8) {
  width: 7%; /* Save button */
}
/* Hide "No file chosen" text */
.avatar-upload::-webkit-file-upload-button {
  color: white;
  background: #3eb7f8;
  border: none;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.avatar-upload::before {
  content: "Change";
  color: white;
  position: absolute;
}
/* Fix Avatar Upload Styling */
.avatar-cell {
  position: relative;
}
.avatar-preview {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: block;
  margin-bottom: 4px;
}
.upload-btn {
  background: #3eb7f8;
  color: white;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}
.upload-btn input[type="file"] {
  display: none;
}

/* Adjust Manage Users column widths */
#userHeaderTable th:nth-child(1),
#userTable td:nth-child(1) { width: 15%; }   /* First */
#userHeaderTable th:nth-child(2),
#userTable td:nth-child(2) { width: 15%; }   /* Last */
#userHeaderTable th:nth-child(3),
#userTable td:nth-child(3) { width: 25%; }   /* Email */
#userHeaderTable th:nth-child(4),
#userTable td:nth-child(4) { width: 12%; }   /* Avatar */
#userHeaderTable th:nth-child(5),
#userTable td:nth-child(5) { width: 10%; }   /* Roles */
#userHeaderTable th:nth-child(6),
#userTable td:nth-child(6) { width: 13%; }   /* Teachers */
#userHeaderTable th:nth-child(7),
#userTable td:nth-child(7) { width: 15%; }   /* Instrument */
#userHeaderTable th:nth-child(8),
#userTable td:nth-child(8) { width: 5%; }    /* Save button */
#userTable td input[type="text"],
#userTable td input[type="email"] {
  width: calc(100% - 10px);  /* ✅ leaves space on both sides */
  padding: 6px 10px;         /* ✅ comfortable inner padding */
  margin: 2px 5px;           /* ✅ space between input and cell border */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  box-sizing: border-box;    /* ✅ ensures padding doesn’t break layout */
}
/* Add more breathing room inside table cells */
#userTable td {
  padding: 10px 12px;        /* ✅ more space between inputs and cell edges */
}

.plus-icon {
  width: 28px !important;
  height: 28px !important;
  vertical-align: middle;
  margin-right: 6px;
}
/* Add spacing to Add User modal fields */
.modal-box label {
  display: block;
  margin-top: 8px;
  font-weight: bold;
  color: #00477d;
}

.modal-box input {
  width: 100%;
  padding: 6px 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}
#teacherSelectBox label {
  display: block;
  font-size: 0.9rem;
  margin: 3px 0;
}
#teacherSelectBox input[type="checkbox"] {
  margin-right: 6px;
}
#newTeachers {
  font-size: 0.9rem;
  background: #fff;
  overflow-y: auto;
}
#newTeachers option {
  padding: 4px 6px;
}
/* Tag Container */
.tag-container {
  display: flex;
  flex-wrap: wrap;       /* ✅ allows multiple rows */
  gap: 3px;
  max-width: 100%;       /* ✅ prevents overflow */
  overflow-x: auto;      /* ✅ adds scroll if needed */
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px;
  position: relative;
  background: #fff;
}
/* Individual Tags */
.tag {
  background: #3eb7f8;
  color: white;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.remove-tag {
  margin-left: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* Dropdown Options */
.tag-options {
  display: none;
  position: fixed;           /* ✅ detach from table cell flow */
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 180px;          /* ✅ give it more width */
  max-height: 200px;         /* ✅ more space */
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* ✅ floating look */
  z-index: 9999;             /* ✅ stays above table */
  padding: 4px 0;
}
.tag-options.show {
  display: block;
}
.tag-option {
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;       /* ✅ prevent wrapping */
}
.tag-option:hover {
  background: #eef;
}

.tag-add-icon {
  width: 14px;
  height: 14px;
  cursor: pointer;
  opacity: 0.7;
}
.tag-add-icon:hover {
  opacity: 1;
}
/* Round only the outer edges */
#userHeaderTable th:first-child {
  border-top-left-radius: 6px;
}
#userHeaderTable th:last-child {
  border-top-right-radius: 6px;

}

body.white-page .app {
  max-width: 400px;       /* ✅ center form */
  margin: 30px auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.white-page form input {
  width: 100%;            /* ✅ only fill container */
  max-width: 100%;       /* ✅ prevent stretching */
  margin: 10px auto;
  display: block;
  box-sizing: border-box;
}

.teacher-tag {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px;
  border: 1px solid #00477d;
  border-radius: 6px;
  cursor: pointer;
  background: #3eb7f8;   /* ✅ Button Blue */
  color: white;          /* ✅ White text */
  font-weight: 500;
  transition: background 0.2s;
}

.teacher-tag:hover {
  background: #3399e8;   /* ✅ Slightly darker on hover */
}

.teacher-tag.selected {
  background: #00477d;   /* ✅ Dark Blue when selected */
  color: white;
  border: 1px solid #00477d;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000; /* ✅ ensure it overlays everything */
}
.modal-overlay.show {
  display: flex !important;
}

.level-row {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.level-scroll-box {
  overflow-x: auto;
  flex: 1;
  background: transparent;
  white-space: nowrap;
}


/* Make the entire leaderboard scroll horizontally */
.scroll-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 10px;      /* gives a little breathing room */
}
/* Keep rows side-by-side alignment */
.level-row {
  display: flex;
  align-items: center;
  min-width: 1200px; /* ensures scrolling */
}

.leaderboard-header {
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1000;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* ✅ allows natural stacking */
}

/* Home button normally stays left */
.leaderboard-header .blue-button {
  order: 1;
  margin-right: auto;
  transform: none;
  position: relative;
}

/* Title next to button on desktop */
.leaderboard-title {
  order: 2;
  margin: 0 auto;
  font-size: 20px;
  color: #00477d;
}

/* ✅ On mobile: force two rows */
@media (max-width: 480px) {
  .leaderboard-header {
    flex-direction: column; /* ✅ stacks button and title */
    text-align: center;
  }
  .leaderboard-header .blue-button {
    margin-bottom: 5px;
  }
  .leaderboard-title {
    font-size: 18px;
  }
  body.white-page .app {
  max-width: 300px;       /* ✅ center form */
  margin: 30px auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}}
/*force*/

/* Extend scrollable area slightly */
.scroll-wrapper .level-bars {
  display: block;
  min-width: calc(1200px + 80px); /* ✅ adds extra scroll room */
}

/* ✅ Restrict FAQ, Login, and Log Points container widths to be slightly narrower */
body.white-page main.app {
  width: 95%;             /* ✅ leaves a small margin on both sides */
  max-width: 480px;       /* ✅ slightly narrower than Settings (500px) */
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 12px;
  background: white;
}

/* ✅ On very small screens, allow full width with small padding */
@media (max-width: 480px) {
  body.white-page main.app {
    width: 92%;           /* ✅ still leaves breathing room */
    max-width: none;
    margin: 10px auto;
    border-radius: 8px;
    padding: 12px;
  }
}

/* ✅ Make Review Logs table scroll horizontally on small screens */
@media (max-width: 768px) {
  #logsSection {
    overflow-x: auto;          /* allows horizontal scroll */
    overflow-y: auto;
    white-space: nowrap;       /* prevent columns from wrapping */
  }
  #logsTable {
    min-width: 800px;          /* ensures table doesn't squish */
    width: auto;
  }
  #logsHeaderTable {
    min-width: 800px;
    width: auto;
  }
}

/* ✅ Make Manage Users table scroll horizontally on small screens */
@media (max-width: 768px) {
  #usersScrollSection {
    overflow-x: auto;
    white-space: nowrap;
  }
   #usersScrollWrapper {
    overflow-x: auto;
    display: block;
  }
  #userTable,
  #userHeaderTable {
    min-width: 900px;          /* keep columns readable */
    width: auto;
  }
}
/* ✅ Make Review Logs scrollable as one unit */
@media (max-width: 768px) {
  #logsWrapper {
    overflow-x: auto;   
    overflow-y: hidden;          /* allows horizontal scroll for everything */
    display: block;
    -webkit-overflow-scrolling: touch;

  }
  #logsHeaderTable,
  #logsTable {
    min-width: 900px;             /* ensures readability */
    width: auto;
  }
}
/* ✅ Single scroll container for Review Logs */
body.review-logs {
  height: 100vh;               /* ✅ full viewport */
  overflow: hidden;            /* ✅ no page scroll */
  display: flex;
  flex-direction: column;
}

#logsWrapper {
  flex: 1;                     /* ✅ take remaining height */
  overflow-y: auto;            /* ✅ only inner scroll */
  overflow-x: auto;
  max-height: calc(100vh - 200px); /* ✅ adjust based on header/footer */
}

/* Make sure table is wide enough and scrolls */
#logsWrapper table {
  min-width: 900px;
  width: 100%;
}

#usersScrollWrapper table {
  min-width: 950px;
  width: auto;
}

/* ✅ Align log points table perfectly */
#logForm table {
  margin: 0 auto;
  width: 96%;
  box-sizing: border-box;
}

#logForm td {
  padding: 5px;
}
/* ✅ Make the action bar responsive */
@media (max-width: 600px) {
  #actionBar {
    flex-wrap: wrap;          /* allow wrapping to multiple lines */
    justify-content: center;  /* center items when wrapped */
    gap: 8px;                 /* add spacing */
  }

  #actionBar #searchInput {
    width: 100%;              /* full width on mobile */
    max-width: 260px;         /* prevent excessive size */
    margin-bottom: 5px;
  }

  #actionBar button {
    flex: 1 1 auto;           /* buttons scale evenly */
    min-width: 120px;
    text-align: center;
  }
}

/* ✅ Fix Log Points content alignment on mobile */
body.white-page #logForm table {
  margin: 0 auto !important;
  width: 100% !important;
}

body.white-page #logForm td {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ✅ Make Review Logs header stick to the top of the screen */
#logsHeaderTable thead th {
  position: sticky;
  top: 0;
  z-index: 50;              /* ensure it stays above content */
  background: #3eb7f8;      /* keep header color */
  color: white;
  border-bottom: 2px solid #00477d;
}

/* ✅ Also fix the header container */
#logsHeaderTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

/* ✅ Sticky Header */
#userHeaderTable thead th {
  position: sticky;
  top: 0;
  background: #3eb7f8;
  color: white;
  z-index: 50;
  border-bottom: 2px solid #00477d;
  padding: 6px;
  text-align: center;
}/* ✅ Sticky Header for My Points */
#pointsHeaderTable thead th {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #3eb7f8;
  color: white;
  border-bottom: 2px solid #00477d;
}
/* ✅ Limit table body height to ~6 rows */
#myPointsLogsWrapper {
  overflow-x: auto;
  overflow-y: hidden; /* ✅ only horizontal scroll here */
  -webkit-overflow-scrolling: touch;
  display: block;
}

#logsTable {
  min-width: 800px;                /* ✅ ensures horizontal scrolling works */
  width: 100%;                     /* ✅ allows table to stretch */
  border-collapse: collapse;       /* ✅ correct property */
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-radius: 8px;
  table-layout: auto;              /* ✅ use auto for proper column width */
  overflow: hidden;
}

#childButtons button {
  display: block;
  width: 90%;
  margin: 5px auto;
  text-align: center;
}

.modal-button {
  display: block;
  width: 90%;
  margin: 8px auto !important;
  font-size: 1.1rem;
  padding: 6px;
}
/* ==== FIX CHILD SELECTION MODAL ==== */
#childButtons {
  display: flex;
  flex-direction: column;
  gap: 12px;               /* ✅ vertical spacing */
}

#childButtons .blue-button {
  display: block !important;
  width: 95% !important;
  margin: 10px auto !important;
  padding: 10px !important;
  font-size: 1.2rem !important;
  white-space: normal !important;
}
/* ✅ Also add spacing to parent option and cancel button */
#childButtons .blue-button:first-child {
  margin-top: 5px;
}

#childSelectModal .modal-actions {
  display: none;           /* ✅ remove cancel button area */
}

#childSelectModal .modal-box {
  width: 420px !important;
  max-width: 95% !important;
  padding: 20px;
}/* === FIX: Prevent horizontal white strip on Review Logs (Mobile) === */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;   /* ✅ prevents body from scrolling sideways */
  }
 #logsWrapper {
    max-height: 65vh;       /* ✅ show 4–5 logs on mobile */
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  #logsWrapper table {
    min-width: 800px;       /* ✅ narrower for mobile scroll */
  }
}/* === FIX: Manage Users Table Height and Horizontal Scrolling === */

#usersScrollWrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;          /* ✅ keeps columns readable */
}

#usersScrollWrapper th,
#usersScrollWrapper td {
  padding: 6px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  white-space: nowrap;       /* ✅ prevent wrapping so horizontal scroll works */
}
/* === Add spacing between action buttons === */
#actionBar button {
  margin-right: 10px;     /* ✅ horizontal gap */
}

#paginationControls button,
#paginationControls select {
  margin-right: 8px;
}

.leaderboard-scroll-wrapper .level-bars {
  min-width: 100%;
  max-width: 1200px;         /* ✅ keeps proper layout */
}

#logsWrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
}

/* === Fix Squished Buttons in Review Logs Action Bar === */
#actionBar {
  flex-wrap: wrap;             /* ✅ allow items to wrap if needed */
  gap: 10px;                   /* ✅ space between items */
  justify-content: center;     /* ✅ center align for consistency */
}

#actionBar button.blue-button,
#actionBar #deleteSelectedBtn {
  min-width: 180px;            /* ✅ ensures buttons stay wide */
  text-align: center;
  white-space: normal;         /* ✅ allow text to wrap nicely */
  padding: 10px 16px;
}

#statusFilter {
  min-width: 160px;            /* ✅ dropdown stays readable */
}

#searchInput {
  flex: 1 1 auto;
  max-width: 300px;
}
/* === Leaderboard Loading Screen === */
#loadingPopup {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  text-align: center;
  z-index: 9999;
}

/* Pulse animation */
#loadingPopup p {
  animation: pulseText 1.2s ease-in-out infinite;
}

@keyframes pulseText {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.3; transform: scale(1); }
}

/* Fun dots animation */
.loading-dots::after {
  content: "...";
  animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
  0%, 20% { color: transparent; text-shadow: .25em 0 transparent, .5em 0 transparent; }
  40% { color: white; text-shadow: .25em 0 transparent, .5em 0 transparent; }
  60% { text-shadow: .25em 0 white, .5em 0 transparent; }
  80%, 100% { text-shadow: .25em 0 white, .5em 0 white; }
}
/* === Stylish Page Titles for Blue Background Pages === */
body.leaderboard-page h2
 {
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; /* ✅ modern clean font */
  font-size: 3rem;                                     /* ✅ larger size */
  font-weight: 700;                                    /* ✅ bold */
  letter-spacing: 1px;
  color: #00477d;                                      /* ✅ matches your theme */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);         /* ✅ subtle pop */
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .leaderboard-header {
    padding: 5px 10px;      
  }
  .leaderboard-header h2 {
    font-size: 1.5rem;
    margin: 5px 0;
  }
}
body.leaderboard-page {
  height: auto;
  overflow: auto;        /* ✅ keep only inner scroll */
  display: flex;
  flex-direction: column;
}

.leaderboard-scroll-wrapper {
  flex: none;
  height: auto !important;
  max-height: none;
  overflow-y: visible !important;
  overflow-x: auto;
}

/* === MOBILE FIX: USE FULL HEIGHT === */
@media (max-width: 768px) {
  .leaderboard-scroll-wrapper {
    max-height: 100vh !important; /* ✅ removes subtraction */
  }
}
#logsSection {
  width: 95%;
  max-height: 65vh;          /* ✅ limits height but avoids giant box */
  margin: 0 auto 20px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
}
#logsTable thead {
  background: #3eb7f8 !important;
}
#logsTable thead th {
  background: #3eb7f8 !important;
}
#userHeaderTable, #userTable {
  table-layout: fixed;        /* ✅ columns stay consistent */
  width: 100%;
  border-collapse: collapse;
}

#userHeaderTable th, #userTable td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  text-align: center;         /* ✅ same alignment */
}

/* ✅ Table Body Rows */
#userHeaderTable tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  background: white;
}

/* ✅ Alternating Row Colors */
#userHeaderTable tbody tr:nth-child(even) {
  background: #f9f9f9;
}


/* ===== MANAGE USERS FINAL FIX ===== */
#usersScrollWrapper {
  width: 95%;
  margin: 0 auto 20px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
}

#userHeaderTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1000px;
}

#userHeaderTable th {
  background: #3eb7f8;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #00477d;
}

/* ✅ Column Widths */
#userHeaderTable th:nth-child(1),
#userHeaderTable td:nth-child(1) { width: 12%; }
#userHeaderTable th:nth-child(2),
#userHeaderTable td:nth-child(2) { width: 12%; }
#userHeaderTable th:nth-child(3),
#userHeaderTable td:nth-child(3) { width: 20%; }
#userHeaderTable th:nth-child(4),
#userHeaderTable td:nth-child(4) { width: 10%; }
#userHeaderTable th:nth-child(5),
#userHeaderTable td:nth-child(5) { width: 10%; }
#userHeaderTable th:nth-child(6),
#userHeaderTable td:nth-child(6) { width: 13%; }
#userHeaderTable th:nth-child(7),
#userHeaderTable td:nth-child(7) { width: 10%; }
#userHeaderTable th:nth-child(8),
#userHeaderTable td:nth-child(8) { width: 6%; }
#userHeaderTable th:nth-child(9),
#userHeaderTable td:nth-child(9) { width: 7%; }
#userHeaderTable th:nth-child(10),
#userHeaderTable td:nth-child(10) { width: 6%; }

/* ✅ Inputs */
#userHeaderTable input[type="text"],
#userHeaderTable input[type="email"],
#userHeaderTable td input[type="text"],
#userHeaderTable td input[type="email"] {
  width: calc(100% - 8px);
  max-width: 95%;
  padding: 5px 8px;
  margin: 2px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px;
  background: #fff;
}

.tag {
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* === FIX: Add More Spacing Between Log Points Rows === */
#logForm td {
  padding: 12px 10px !important;   /* ✅ more padding inside cells */
  vertical-align: middle;
}

#logForm tr {
  border-bottom: 10px solid transparent; /* ✅ space between rows */
}

#logForm table {
  border-collapse: separate;   /* ✅ allows row spacing */
  border-spacing: 0 8px;       /* ✅ extra gap between rows */
}
/* === FIX: Adjust Notes Column for Log Points === */
#logForm td.notes-cell {
  width: 55% !important;           /* ✅ shrink notes column */
}

#logForm td.category-cell {
  width: 40% !important;           /* ✅ keep category column wider */
}

#logForm textarea#logNote {
  min-height: 100px;
  width: 95% !important;           /* ✅ shrink textarea a bit */
  margin: 5px auto !important;     /* ✅ add breathing room */
  display: block;
}

/* === Add Vertical Spacing Between Rows === */
#logForm tr {
  border-bottom: 8px solid transparent; /* ✅ space between rows */
}

#logForm td {
  padding: 10px 8px !important;        /* ✅ slightly more padding */
}
/* === Sortable Header Styling === */
#userHeaderTable th[data-sort] {
  cursor: pointer;
  position: relative;
  padding-right: 18px;
}

#userHeaderTable th[data-sort]:after {
  content: "⇅";  /* neutral arrow */
  position: absolute;
  right: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

#userHeaderTable th[data-sort].asc:after {
  content: "▲";
  color: white;
}

#userHeaderTable th[data-sort].desc:after {
  content: "▼";
  color: white;
}
#avatarHelpModal {
  display: none;
}
#avatarHelpModal.show {
  display: flex !important;
}

#homeProgressBar {
  position: relative !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  color: #00477d !important;   /* Dark Blue Text */
  z-index: 10 !important;      /* Text stays above bar */
  overflow: visible !important;/* Ensure text is not clipped */
}

.points-overlay {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  font-weight: bold;
  font-size: 14px;
  color: #00477d;
  z-index: 20;
  pointer-events: none;
  width: auto;  /* ✅ prevents shrinking */
}

.progress-container {
  position: relative;   /* ✅ ensures overlay is positioned correctly */
  overflow: visible;    /* ✅ allows overlay text to be seen fully */
}
/* Center the Leaderboard title without breaking existing styles */
body.leaderboard-page .leaderboard-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left button | centered title | spacer */
  align-items: center;
  justify-content: initial;
}

body.leaderboard-page .leaderboard-header .blue-button {
  margin: 0;            /* remove the margin-right:auto push */
  justify-self: start;  /* pin button to the left */
}

body.leaderboard-page .leaderboard-title {
  margin: 0;
  text-align: center;   /* center the text itself */
  justify-self: center; /* center in the middle column */
}

/* Mobile: stack like you already do */
@media (max-width: 480px) {
  body.leaderboard-page .leaderboard-header {
    display: flex;
    flex-direction: column;
  }
  body.leaderboard-page .leaderboard-header .blue-button {
    align-self: flex-start;
  }
}
/* ==== Flat icon-only password toggle (no pill) ==== */
.pw-field { position: relative; }

/* give the input a little room so text doesn't run under the icon */
.pw-field > input[type="password"],
.pw-field > input[type="text"],
.pw-field > input[type="email"] {
  padding-right: 2.25rem;
}

/* nuke any global button styles and make it icon-only */
.pw-field .pw-toggle {
  all: unset;                     /* wipe inherited button styles */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  cursor: pointer;
  color: #3399e8;                 /* your blue — eye uses currentColor */
}

/* hover/focus states (subtle + accessible) */
.pw-field .pw-toggle:hover { filter: brightness(0.95); }
.pw-field .pw-toggle:focus-visible {
  outline: 2px solid #3399e8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* the SVG itself */
.pw-field .pw-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke-width: 2;
}
