/* =================================== */
/* === Reset & Base Styles === */
/* =================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.4;
}

/* =================================== */
/* === Splash Screen Styles (NEW) === */
/* =================================== */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #016751;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#splashLogo {
    width: 260px;
    height: auto;
    animation: wave-in 1.5s ease-in-out forwards;
}

@media (min-width: 1024px) {
    #splashLogo {
        width: 500px;
    }
}

@keyframes wave-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    60% {
        transform: scale(1.3);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#splashScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* =================================== */
/* === Layout Structure === */
/* =================================== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.campus-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  width: 100%;
  max-width: 2500px;
}

/* =================================== */
/* === Auth Modal Specific Styles === */
/* =================================== */
#authModal .modal-content,
#adminLoginModal .modal-content {
  align-items: center;
}

#authModal .modal-content h2,
#adminLoginModal .modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #016751;
  text-align: center;
  width: 100%;
  font-size: 1.4rem;
}

#authModal .auth-fields-group {
    width: 100%;
    margin-bottom: 30px;
}

#authModal label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  text-align: left;
  width: 100%;
}

#authModal input[type="text"],
#authModal #userEmail {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

#authModal input[type="text"] {
    margin-bottom: 10px;
}

.email-input-container {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

#authModal #userEmail,
#adminLoginModal #adminEmail {
    padding-right: 120px;
    text-align: left;
    margin-bottom: 0;
}

.domain-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    pointer-events: none;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 5px;
}

.separator-line-email {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: #ccc;
}

#authModal .modal-content,
#adminLoginModal .modal-content {
    padding-bottom: 25px;
}

#authModal #submitAuth,
#adminLoginModal #submitAuth {
    margin-top: 25px;
}

#authModal #error-message,
#adminLoginModal #admin-error-message {
    margin-top: 10px;
}

#adminLoginButton {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 15px;
    width: 100%;
}

#adminLoginButton:hover {
    background-color: #5a6268;
    transform: scale(1.02);
}

#adminLoginButton:active {
    transform: scale(0.98);
}

#backToMainLogin {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 15px;
    width: 100%;
}

#backToMainLogin:hover {
    background-color: #5a6268;
    transform: scale(1.02);
}

#backToMainLogin:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    #authModal #userEmail,
    #adminLoginModal #adminEmail {
        padding-right: 110px;
    }
    .domain-suffix {
        right: 8px;
        font-size: 0.9rem;
    }
    .separator-line-email {
        right: 90px;
        height: 55%;
    }
    #authModal .modal-content,
    #adminLoginModal .modal-content {
        padding: 15px;
        padding-top: 45px;
    }
}

@media (max-width: 480px) {
    #authModal #userEmail,
    #adminLoginModal #adminEmail {
        padding-right: 90px;
    }
    .domain-suffix {
        right: 5px;
        font-size: 0.8rem;
    }
    .separator-line-email {
        right: 75px;
        height: 50%;
    }
    #authModal .modal-content,
    #adminLoginModal .modal-content {
        padding: 15px;
        padding-top: 45px;
    }
}

/* =================================== */
/* === Header Styles === */
/* =================================== */
header {
      position: relative;
      display: flex;
      align-items: center;
  }

  header h1 {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      margin: 0;
      white-space: nowrap;
  }

  header .header-controls {
      margin-left: auto;
      z-index: 1;
      flex-shrink: 0;
  }

  header .back-button,
  header .logo {
      z-index: 1;
      flex-shrink: 0;
  }

header {
  background-color: #016751;
  color: white;
  padding: 10px 20px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: transparent;
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  margin-right: 10px;
  padding: 4px;
  border: 2px solid transparent;
}

.back-button .back-arrow-icon {
  width: 24px;
  height: 24px;
  fill: white;
  transition: fill 0.2s ease, transform 0.2s ease;
}

.back-button:hover .back-arrow-icon {
  fill: #e0e0e0;
  transform: scale(1.1);
}
.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


.back-button:active .back-arrow-icon {
  fill: #bdbdbd;
  transform: scale(0.95);
}
.back-button:active {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(0.98);
}


.logo {
  height: 60px;
}

h1 {
  font-size: 2rem;
  margin: 0;
  text-align: center;
  flex-grow: 1;
  margin-left: 15px;
  margin-right: 15px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mute-button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.1s ease, color 0.2s ease;
}
.mute-button:hover {
    transform: scale(1.1);
    color: #f0f0f0;
}
.mute-button:active {
    transform: scale(0.95);
}


#exportLogButton {
  background-color: #f8f9fa;
  color: #016751;
  border: 1px solid #dee2e6;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#exportLogButton:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

#exportLogButton:active {
  transform: translateY(0px);
  background-color: #dee2e6;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}

#exportLogButton:disabled {
  background-color: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
  transform: none;
  border-color: #e0e0e0;
  box-shadow: none;
}


header .header-controls {
      margin-left: auto;
      z-index: 1;
      flex-shrink: 0;
  }

  header .back-button,
  header .logo {
      z-index: 1;
      flex-shrink: 0;
  }

#adminUsersButtonContainer {
    display: flex;
    align-items: center;
}

#adminUsersButton {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.1s ease, color 0.2s ease;
}

#adminUsersButton:hover {
    transform: scale(1.1);
    color: #f0f0f0;
}

#adminUsersButton:active {
    transform: scale(0.95);
}

#adminUsersButton svg {
    width: 24px;
    height: 24px;
    fill: white;
}

@media (max-width: 768px) {
    #adminUsersButton svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    #adminUsersButton svg {
        width: 20px;
        height: 20px;
    }
}

/* =================================== */
/* === Building & Level Styles === */
/* =================================== */
.building-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px;
  width: 100%;
  max-width: 270px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
}

.building-container h2 {
  color: #016751;
  font-size: 1.3rem;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
  width: 100%;
  text-align: center;
}

.level-container {
  background: #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.level-title {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 8px;
  width: 100%;
  text-align: center;
  color: #555;
}

/* =================================== */
/* === Classroom Styles === */
/* =================================== */
.classroom-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.classroom {
  background: #016751;
  color: white;
  padding: 8px 5px;
  border-radius: 8px;
  font-size: 0.9rem;
  width: 50px;
  height: 45px;
  line-height: 25px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.classroom:hover {
  background: #01a87a;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.original {
  background-color: #016751;
}

@keyframes blinkRed {
  0%, 100% { background-color: red; }
  50% { background-color: darkred; }
}

.blink-red {
  animation: blinkRed 1.2s infinite;
  color: white;
}

@keyframes blinkYellow {
  0%, 100% { background-color: yellow; }
  50% { background-color: yellowgreen; }
}

.blink-yellow {
  animation: blinkYellow 1.2s infinite;
  color: white;
}

/* =================================== */
/* === Modal Styles (General) === */
/* =================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 15px;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 25px;
  padding-top: 50px;
  width: 95%;
  max-width: 450px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  margin-top: 20px;
  margin-bottom: 20px;
  color: #016751;
  text-align: center;
  width: 100%;
  font-size: 1.4rem;
}

.modal-content p {
  padding-bottom: 10px;
}

.modal label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  text-align: left;
  width: 100%;
}

.modal input[type="text"],
.modal input[type="password"],
.modal input[type="date"],
.modal textarea,
.modal select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.modal input[type="date"] {
  color: #333;
}

.modal input[type="date"]::placeholder {
    color: #6c757d;
    opacity: 1;
}
.modal input[type="date"]::-webkit-input-placeholder {
    color: #6c757d;
}
.modal input[type="date"]::-moz-placeholder {
    color: #6c757d;
    opacity: 1;
}
.modal input[type="date"]:-ms-input-placeholder {
    color: #6c757d;
}
.modal input[type="date"]::-ms-input-placeholder {
    color: #6c757d;
}

.modal input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(25%) sepia(50%) saturate(300%) hue-rotate(130deg) brightness(90%) contrast(100%);
}

.modal input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.7;
}

.modal input:focus,
.modal input[type="date"]:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    border-color: #016751;
    box-shadow: 0 0 0 2px rgba(1, 103, 81, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}

.modal button {
  background-color: #016751;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  font-size: 1rem;
  font-weight: bold;
  width: auto;
  min-width: 100px;
}

.modal button:hover {
  background-color: #01a87a;
  transform: scale(1.02);
}

.modal button:active {
    transform: scale(0.98);
}

.modal button:disabled {
  background-color: #bdbdbd;
  cursor: not-allowed;
  transform: none;
  color: #757575;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border-radius: 50%;
  padding: 0;
  z-index: 1001;
}

.close-x {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  color: #9e9e9e;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-x:hover {
  color: #e53935;
  transform: rotate(90deg);
}

.close-x:active {
  color: #c62828;
}

/* =================================== */
/* === Generic Modal Specific Styles === */
/* =================================== */
#genericAlertModalMessage,
#genericConfirmModalMessage {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 1rem;
    color: #333;
}

#genericConfirmModalNoButton {
    background-color: #6c757d;
    color: white;
}

#genericConfirmModalNoButton:hover {
    background-color: #5a6268;
}


/* =================================== */
/* === Issue Reporting Modal Styles === */
/* =================================== */
.issue-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  width: 100%;
}

.issue-buttons button.issue-btn {
  padding: 10px 15px;
  font-size: 0.9rem;
  flex-grow: 1;
  flex-basis: calc(33.333% - 10px);
  max-width: 120px;
  min-width: 80px;
  text-align: center;
  background-color: #e0e0e0;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.issue-buttons button.issue-btn:hover {
  background-color: #d5d5d5;
  border-color: #bbb;
}

.issue-buttons button.issue-btn.active {
  background-color: #ff9800;
  color: white;
  border-color: #f57c00;
  font-weight: bold;
}

#issueDetails {
  min-height: 100px;
  resize: vertical;
  width: 100%;
}

#successMessage,
#handleIssueSuccessMessage,
#supportHandleIssueSuccessMessage,
#completionNoteSuccessMessage {
  font-weight: bold;
  color: #2e7d32;
  text-align: center;
  width: 100%;
  font-size: 1.3rem;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80px;
  padding-bottom: 10px;
}

#successMessage {
  margin-bottom: 20px;
}

#issueModal #successMessage:not([style*="display: none"]) ~ .close-button {
  display: none;
}

.modal-content.center-content {
    justify-content: center;
    align-items: center;
    padding: 25px;
    min-height: 150px;
}

.modal-content.center-content h2 {
    margin-bottom: 20px;
}

#approvalStatusMessage {
    margin-bottom: 10px;
}

#approvalStatusOkButton {
    margin-top: 10px;
}

/* =================================== */
/* === Handle Issue Modal Styles === */
/* =================================== */
#handleIssueForm {
  text-align: center;
  width: 100%;
}

#handleIssueForm label {
    margin-bottom: 8px;
}

.staff-select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23555" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
}

.staff-select:hover {
  border-color: #aaa;
}

.staff-select:focus {
  border-color: #016751;
  box-shadow: 0 0 0 2px rgba(1, 103, 81, 0.2);
  outline: none;
}

.staff-select option {
  padding: 10px;
  font-size: 1rem;
}

.staff-select option[value=""] {
  color: #999;
}

#submitHandledIssue {
  margin-top: 15px;
}

#handleIssueModal #handleIssueSuccessMessage:not([style*="display: none"]) ~ .close-button {
  display: none;
}

/* =================================== */
/* === Cancel Confirmation Modal Styles === */
/* =================================== */
#cancelConfirmModal .modal-content button {
  min-width: 80px;
}

#cancelConfirmModal .modal-content button:first-of-type {
  background-color: #e53935 !important;
}
#cancelConfirmModal .modal-content button:first-of-type:hover {
  background-color: #c62828 !important;
}

#cancelConfirmModal .modal-content button:last-of-type {
  background-color: #757575 !important;
}
#cancelConfirmModal .modal-content button:last-of-type:hover {
  background-color: #616161 !important;
}

/* =================================== */
/* === Export Log Modal Styles === */
/* =================================== */
#exportStatusMessage {
  font-weight: 500;
  text-align: center;
  width: 100%;
  font-size: 0.9rem;
  padding: 10px 5px;
  margin-top: 10px;
  min-height: 20px;
}

#exportLogModal .modal-content > div[style*="margin-top: 10px"] {
  margin-bottom: 15px;
}

#exportLogModal .modal-content > div > label:first-child {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 0.95rem;
}

#exportBuildingCheckboxes,
#exportClassroomCheckboxes {
  background-color: #f9f9f9;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  padding: 8px 10px;
  max-height: 150px;
  overflow-y: auto;
  margin-top: 5px;
}

#exportClassroomModeSelection {
  border: 1px solid #dcdcdc;
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 8px 10px;
  margin-top: 5px;
}

#exportBuildingCheckboxes div,
#exportClassroomModeSelection div,
#exportClassroomCheckboxes div {
  padding: 4px 0;
  display: flex;
  align-items: center;
}

#exportBuildingCheckboxes label,
#exportClassroomModeSelection label,
#exportClassroomCheckboxes label {
  margin-left: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #444;
}

#exportBuildingCheckboxes label[for="export_building_all"],
#exportClassroomCheckboxes label[for="export_room_all_subset"] {
  font-weight: bold;
  color: #111;
}

#exportSpecificClassroomSelection {
  border-top: 1px dashed #ccc;
  padding-top: 15px;
  margin-top: 15px;
}

#exportSpecificClassroomSelection > label:first-child {
  font-style: italic;
  margin-bottom: 8px;
  font-weight: bold;
}

#exportLogModal input[type="checkbox"],
#exportLogModal input[type="radio"] {
  margin: 0;
  vertical-align: middle;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

#exportLogModal #exportHandledByInput,
#exportLogModal #exportStartDate,
#exportLogModal #exportEndDate {
  padding: 10px;
}

#exportLogModal #submitExportLog {
  margin-top: 25px;
}

#exportBuildingCheckboxes div:hover,
#exportClassroomModeSelection div:hover,
#exportClassroomCheckboxes div:hover {
    background-color: #f0f0f0;
}

/* =================================== */
/* === Issue Message Display Cards === */
/* =================================== */
.level-issues-container {
  width: 100%;
  margin-top: 15px;
  padding: 0 5px;
  min-height: 20px;
}

.issue-message {
  background: #fff3e0;
  border-left: 5px solid #ff9800;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.issue-header {
  font-weight: bold;
  color: #e65100;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.issue-meta {
    font-size: 0.75rem;
    color: #757575;
    margin-bottom: 5px;
    font-style: italic;
}

.issue-type {
  margin: 4px 0;
  color: #333;
  font-weight: 500;
}
.issue-type::before {
    content: "Issue: ";
    font-weight: normal;
    color: #555;
}

.issue-description {
  color: #424242;
  margin: 4px 0;
  line-height: 1.3;
}
.issue-description::before {
    content: "Desc: ";
    font-weight: normal;
    color: #555;
}

.issue-time {
  font-size: 0.75rem;
  color: #757575;
  margin-top: 5px;
  font-style: italic;
}

.handled-by {
  font-size: 0.75rem;
  margin-top: 5px;
}

.issue-message .handled-by {
  color: #016751;
  font-weight: 500;
}

.issue-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.cancel-issue-btn {
  background-color: #ffb74d;
  color: #424242;
  border: 1px solid #ffa726;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
}

.cancel-issue-btn:hover {
    background-color: #ffa726;
    border-color: #fb8c00;
    color: #333;
}

.handle-issue-btn {
  background-color: #ffeb3b;
  color: #333;
  border: 1px solid #c9bc1f;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
}

.handle-issue-btn:hover {
    background-color: #fdd835;
    border-color: #ad9d12;
    color: #333;
}

.handle-issue-btn.solved-btn {
  background-color: #28a745;
  border: 1px solid #1e7e34;
  color: white;
  cursor: pointer;
  opacity: 1;
}

.handle-issue-btn.solved-btn:hover {
  background-color: #218838;
  border-color: #1c7430;
}

.handle-issue-btn:disabled {
  pointer-events: none;
  background-color: #bdbdbd;
  border-color: #9e9e9e;
  color: #757575;
  cursor: not-allowed;
  transform: none;
}

/* =================================== */
/* === View Mode Specific Styles === */
/* =================================== */
body.mode-single .building-container,
body.mode-batch .building-container,
body.mode-single .level-container,
body.mode-batch .level-container,
body.mode-single .classroom,
body.mode-batch .classroom {
    display: none;
}

body.mode-single .building-container.show-building,
body.mode-batch .building-container.show-building {
    display: flex;
}
body.mode-single .level-container.show-level,
body.mode-batch .level-container.show-level {
    display: flex;
}
body.mode-single .classroom.show-classroom,
body.mode-batch .classroom.show-classroom {
    display: flex;
}

/* --- Batch Mode Specific Styles --- */
body.mode-batch #muteButton,
body.mode-batch #exportLogButton {
    display: none;
}

body.mode-batch .level-title[data-batch-mode]::after {
    content: "- Classroom " attr(data-room-number);
    font-weight: bold;
    color: black;
    margin-left: 5px;
}

body.mode-batch .classroom[data-batch-mode] {
   position: relative;
   color: transparent !important;
   min-width: 120px;
   padding: 5px;
   font-weight: normal;
}

body.mode-batch .classroom[data-batch-mode]::after {
  content: "Report Issue";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  pointer-events: none;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.classroom[data-batch-mode].blink-red,
.classroom[data-batch-mode].blink-yellow {
    pointer-events: none;
    cursor: default;
    opacity: 0.8;
    user-select: none;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.classroom[data-batch-mode].blink-red::after,
.classroom[data-batch-mode].blink-yellow::after {
    color: white;
    opacity: 0.8;
}


/* --- Single Classroom Mode Specific Styles --- */
body.mode-single .campus-container {
    justify-content: center;
    padding: 10px;
}

body.mode-single .building-container.show-building {
    max-width: 400px;
    margin: 0 auto;
}

body.mode-single .level-container.show-level {
     margin: 0 auto;
}

body.mode-single .classroom-grid {
     justify-content: center;
}

/* --- View Only Mode Specific Styles --- */
body.view-only .classroom {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

body.view-only .issue-card-actions button {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

body.view-only #muteButton,
body.view-only #exportLogButton {
    display: none;
}


/* =================================== */
/* === Effects === */
/* =================================== */
#mainContent.blurred {
  filter: blur(4px);
  pointer-events: none;
  transition: filter 0.2s ease-out;
}


/* =================================== */
/* === Index Page Specific Styles === */
/* =================================== */
body.selection-page-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 0;
}

body.selection-page-body header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 15px 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    flex-grow: 1;
}

.intro-text {
    text-align: center;
    width: 100%;
}

.intro-text p {
    font-size: 1.6rem;
    color: #4A4A4A;
    line-height: 1.6;
    margin: 0;
    margin-bottom: 30px;
}

.intro-text h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.intro-text p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.button-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.selection-button {
    background-color: #016751;
    color: white;
    border: none;
    padding: 30px 50px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.selection-button:hover {
    background-color: #01a87a;
    transform: translateY(-3px) scale(1.03);
}

.selection-button:active {
    transform: translateY(0px) scale(0.97);
}


/* =================================== */
/* === Responsive Adjustments === */
/* =================================== */
@media (max-width: 1125px) {
  body.selection-page-body .selection-container {
      margin-top: 20px;
      padding: 10px;
      gap: 15px;
  }

  body.selection-page-body .intro-text p {
      font-size: 0.9rem;
      line-height: 1.5;
      margin-bottom: 15px;
  }

  body.selection-page-body .button-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
  }

  body.selection-page-body .selection-button {
      font-size: 1rem;
      padding: 15px;
      width: 95%;
      max-width: 400px;
      min-width: unset;
      box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }

  .back-button {
    width: 38px;
    height: 38px;
    margin-right: 8px;
  }
  .back-button .back-arrow-icon {
    width: 22px;
    height: 22px;
  }

  h1 {
    font-size: 1.6rem;
    margin-left: 10px;
    margin-right: 10px;
  }

  .logo {
    height: 50px;
  }

  .header-controls {
      gap: 10px;
  }

  .mute-button {
    font-size: 1.3rem;
  }

  #exportLogButton {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .campus-container {
    padding: 10px;
    gap: 10px;
  }

  .building-container {
    max-width: 95%;
    min-width: 0;
    padding: 12px;
  }

  .classroom {
      width: 60px;
      height: 40px;
      font-size: 0.9rem;
      line-height: 20px;
  }

  .modal-content {
    padding: 20px;
    padding-top: 45px;
    max-width: 90%;
  }

  .issue-buttons button.issue-btn {
    flex-basis: calc(50% - 10px);
  }

  body.selection-page-body .selection-container {
      margin-top: 20px;
      padding: 10px;
      gap: 15px;
  }

  body.selection-page-body .intro-text p {
      font-size: 0.9rem;
      line-height: 1.5;
      margin-bottom: 15px;
  }

  body.selection-page-body .button-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
  }

  body.selection-page-body .selection-button {
      font-size: 1rem;
      padding: 15px;
      width: 95%;
      max-width: 400px;
      min-width: unset;
      box-sizing: border-box;
  }

  .intro-text h3 {
      font-size: 1.5rem;
  }

  .intro-text p {
      font-size: 1rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 8px 10px;
  }
  .back-button {
    width: 36px;
    height: 36px;
    margin-right: 6px;
  }
  .back-button .back-arrow-icon {
    width: 20px;
    height: 20px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  body.selection-page-body header {
    min-height: 52px;
  }

  h1 {
    font-size: 1.2rem;
    margin-left: 5px;
    margin-right: 5px;
  }
  .logo {
    height: 40px;
    display: none;
  }
  .header-controls {
    gap: 8px;
  }
  .mute-button {
    font-size: 1.2rem;
  }
  #exportLogButton {
    padding: 4px 6px;
    font-size: 0.7rem;
  }

  .classroom {
      width: 55px;
      height: 38px;
      font-size: 0.85rem;
      line-height: 18px;
  }

  .issue-buttons button.issue-btn {
    flex-basis: 100%;
    max-width: none;
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .modal button {
    width: 100%;
    margin: 0;
    padding: 10px;
  }

  .issue-message {
      padding: 10px;
      font-size: 0.8rem;
  }
  .issue-header {
      font-size: 0.9rem;
  }

  .cancel-issue-btn {
      padding: 5px 10px;
      font-size: 0.75rem;
  }

  body.selection-page-body .selection-container {
      margin-top: 20px;
      padding: 10px;
      gap: 15px;
  }

  body.selection-page-body .intro-text p {
      font-size: 0.9rem;
      line-height: 1.5;
      margin-bottom: 15px;
  }

  body.selection-page-body .button-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
  }

  body.selection-page-body .selection-button {
      font-size: 1rem;
      padding: 15px;
      width: 95%;
      max-width: 400px;
      min-width: unset;
      box-sizing: border-box;
  }
  
  .intro-text h3 {
      font-size: 1.3rem;
  }

  .intro-text p {
      font-size: 0.9rem;
  }
}

/* ======================================== */
/* === Role Selection & Admin Auth Styles === */
/* ======================================== */
#roleSelectionContainer {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 600px;
}

#roleSelectionContainer h2 {
    text-align: center;
    color: #4A4A4A;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: normal;
    line-height: 1.6;
}

#adminAuthContainer {
    display: none;
}

#adminAuthContainer h2 {
    font-size: 1.8rem;
}

#adminAuthForm button[type="submit"] {
    margin-top: 15px;
}

#adminAuthContainer #backToRoleSelectionFromAdmin {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 0.95rem;
    font-weight: bold;
    display: block;
    width: auto;
    min-width: 200px;
    text-align: center;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}

#adminAuthContainer #backToRoleSelectionFromAdmin:hover {
    background-color: #5a6268;
    transform: scale(1.02);
}
#adminAuthContainer #backToRoleSelectionFromAdmin:active {
    transform: scale(0.98);
}

#actualOfficeFormContainer {
    display: none;
}

/* ======================================== */
/* === Office Support Form Styles === */
/* ======================================== */
.office-form-container {
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.office-form-container h2 {
    text-align: center;
    color: #016751;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.office-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.office-form-container label .required-star {
    color: red;
    margin-left: 3px;
}
.office-form-container .required-star {
    color: red;
}


.office-form-container input[type="text"],
.office-form-container input[type="tel"],
.office-form-container input[type="email"],
.office-form-container select,
.office-form-container textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    color: #333;
}

.office-form-container input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.office-form-container input[type="text"]:focus,
.office-form-container input[type="tel"]:focus,
.office-form-container input[type="email"]:focus,
.office-form-container select:focus,
.office-form-container textarea:focus {
    outline: none;
    border-color: #016751;
    box-shadow: 0 0 0 2px rgba(1, 103, 81, 0.2);
}

.office-form-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23555" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 35px;
}
.office-form-container select:focus {
     padding-right: 35px;
}


.office-form-container input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
    height: auto;
}
.office-form-container label[for="remoteAssistanceCheckbox"] {
    display: inline-block;
    font-weight: normal;
    color: #333;
    margin-bottom: 18px;
}

.anydesk-container {
    margin-bottom: 18px;
}

.office-form-container button[type="submit"] {
    background-color: #016751;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: block;
    width: 100%;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 10px;
}

.office-form-container button[type="submit"]:hover {
    background-color: #01a87a;
    transform: scale(1.02);
}

.office-form-container button[type="submit"]:active {
    transform: scale(0.98);
}


.office-form-container button[type="submit"]:disabled {
    background-color: #bdbdbd;
    color: #757575;
    cursor: not-allowed;
    transform: none;
}

.office-form-container .error-message {
    color: red;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
}

#adminLoginModalForm button[type="submit"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    min-width: 120px;
}

/* =================================== */
/* === Responsive Adjustments (Relevant to Office Page) === */
/* =================================== */
@media (max-width: 1125px) {
  body.selection-page-body .selection-container {
    margin-top: 15px;
    padding: 10px;
    gap: 15px;
}
}

@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }
  .back-button {
    width: 38px;
    height: 38px;
    margin-right: 8px;
  }
  .back-button .back-arrow-icon {
    width: 22px;
    height: 22px;
  }
  h1 {
    font-size: 1.6rem;
    margin-left: 10px;
    margin-right: 10px;
  }
   header h1 {
    font-size: 1.6rem;
  }
  .logo {
    height: 50px;
  }

  .office-form-container {
      padding: 20px;
      margin-left: 15px;
      margin-right: 15px;
      max-width: calc(100% - 30px);
  }
  .office-form-container h2 {
      font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 8px 10px;
  }
  .back-button {
    width: 36px;
    height: 36px;
    margin-right: 6px;
  }
  .back-button .back-arrow-icon {
    width: 20px;
    height: 20px;
  }
  h1 {
    font-size: 1.2rem;
    margin-left: 5px;
    margin-right: 5px;
  }
  header h1 {
    font-size: 1.2rem;
  }
  .logo {
    height: 40px;
    display: none;
  }

  .office-form-container {
    padding: 15px;
    margin-top: 0;
    margin-bottom: 15px;
    margin-left: 10px;
    margin-right: 10px;
    max-width: calc(100% - 20px);
}
  .office-form-container h2 {
      font-size: 1.4rem;
      margin-bottom: 20px;
  }
  .office-form-container input[type="text"],
  .office-form-container input[type="tel"],
  .office-form-container select,
  .office-form-container textarea {
      padding: 10px;
      margin-bottom: 15px;
      font-size: 0.9rem;
  }
  .office-form-container button[type="submit"] {
      padding: 10px;
      font-size: 0.95rem;
  }
  .office-form-container label {
      font-size: 0.9rem;
      margin-bottom: 6px;
  }
  .office-form-container label[for="remoteAssistanceCheckbox"] {
        font-size: 0.85rem;
    }

  body.selection-page-body .selection-container {
      margin-top: 20px;
      padding: 10px;
      gap: 15px;
  }

  body.selection-page-body .intro-text p {
      font-size: 0.9rem;
      line-height: 1.5;
      margin-bottom: 15px;
  }

  body.selection-page-body .button-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      width: 100%;
  }

  body.selection-page-body .selection-button {
      font-size: 1rem;
      padding: 15px;
      width: 95%;
      max-width: 400px;
      min-width: unset;
      box-sizing: border-box;
  }
  
  .intro-text h3 {
      font-size: 1.3rem;
  }

  .intro-text p {
      font-size: 0.9rem;
  }
}

/* ======================================== */
/* === Admin Dashboard Sections & Issues === */
/* ======================================== */
main#mainContent.main-content-admin-active {
    margin-top: 0 !important;
    padding-top: 0 !important;
    align-items: stretch;
}

#adminDashboardContainer.office-form-container {
    max-width: none;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.admin-dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    flex-grow: 1;
    min-height: 0;
}

.dashboard-section {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #016751;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.issues-list {
    overflow-y: auto;
    padding-right: 10px;
    flex-grow: 1;
    min-height: 0;
}

.dashboard-issue-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-issue-item.status-reported {
    border-left: 5px solid #e53935;
}
.dashboard-issue-item.status-pending {
    border-left: 5px solid #ffb300;
}
.dashboard-issue-item.status-completed {
    border-left: 5px solid #43a047;
}

.dashboard-issue-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}
.dashboard-issue-item p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.dashboard-issue-item p strong {
    color: #000;
}
.dashboard-issue-item .timestamp {
    font-size: 0.8rem;
    color: #777;
    margin-top: 10px;
}
.dashboard-issue-item .status-text {
    font-weight: bold;
}

.issue-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.issue-actions .action-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.issue-actions .action-btn:disabled {
    background-color: #e0e0e0 !important;
    color: #9e9e9e !important;
    border-color: #d0d0d0 !important;
    cursor: not-allowed;
    transform: none;
}

.issue-actions .pending-btn {
    background-color: #ffecb3;
    border-color: #ffe082;
    color: #795548;
}
.issue-actions .pending-btn:hover:not(:disabled) {
    background-color: #ffe082;
    border-color: #ffd54f;
    transform: translateY(-1px);
}

.issue-actions .completed-btn {
    background-color: #c8e6c9;
    border-color: #a5d6a7;
    color: #2e7d32;
}
.issue-actions .completed-btn:hover:not(:disabled) {
    background-color: #a5d6a7;
    border-color: #81c784;
    transform: translateY(-1px);
}

.issue-actions .delete-btn {
    background-color: transparent;
    border: none;
    color: red;
    margin-left: auto;
    font-size: 1.2rem;
    padding: 4px 8px;
}
.issue-actions .delete-btn:hover:not(:disabled) {
    background-color: transparent;
    color: #d32f2f;
    transform: scale(1.15);
}

.issue-actions .delete-btn:disabled {
    background-color: transparent !important;
    color: #bdbdbd !important;
    border: none !important;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 1400px) {
    .admin-dashboard-sections {
        flex-direction: row;
    }
}


@media (max-width: 480px) {
    .dashboard-section h3 {
        font-size: 1.2rem;
    }
    .issue-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .issue-actions .delete-btn {
        margin-left: 0;
        margin-top: 8px;
    }
}

#supportLoginModalForm button[type="submit"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    min-width: 120px;
}

#supportHandleIssueModal .modal-content button[type="submit"] {
    background-color: #016751;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1rem;
    font-weight: bold;
    width: auto;
    min-width: 100px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
}
#supportHandleIssueModal .modal-content button[type="submit"]:hover {
    background-color: #01a87a;
    transform: scale(1.02);
}
#supportHandleIssueModal .modal-content button[type="submit"]:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    color: #757575;
}

#completionNoteModal .modal-content button[type="submit"] {
    background-color: #016751; color: white; border: none; padding: 12px 25px;
    border-radius: 6px; cursor: pointer; transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1rem; font-weight: bold; width: auto; min-width: 100px;
    display: block; margin-left: auto; margin-right: auto; margin-top: 15px;
}
#completionNoteModal .modal-content button[type="submit"]:hover {
    background-color: #01a87a; transform: scale(1.02);
}
#completionNoteModal .modal-content button[type="submit"]:disabled {
    background-color: #bdbdbd; cursor: not-allowed; transform: none; color: #757575;
}
#completionNoteModal #completionNoteText {
    width: 100%; padding: 12px; margin-bottom: 5px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; min-height: 80px;
}
#completionNoteModal #completionNoteText:focus {
    outline: none; border-color: #016751; box-shadow: 0 0 0 2px rgba(1, 103, 81, 0.2);
}
#completionNoteModal #completionNoteError {
    margin-top: 0;
    margin-bottom: 15px;
}

#adminDashboardContainer #exportOfficeLogButton {
  background-color: #f8f9fa;
  color: #016751;
  border: 1px solid #dee2e6;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#adminDashboardContainer #exportOfficeLogButton:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

#adminDashboardContainer #exportOfficeLogButton:active {
  transform: translateY(0px);
  background-color: #dee2e6;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}

#adminDashboardContainer #exportOfficeLogButton:disabled {
  background-color: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
  transform: none;
  border-color: #e0e0e0;
  box-shadow: none;
}


#officeExportLogModal .modal-content {
    max-width: 550px;
}


#officeExportLogModal .modal-content > div[style*="margin-top: 10px"] {
  margin-bottom: 15px;
}

#officeExportLogModal .modal-content > div > label:first-child {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 0.95rem;
}

#officeExportBuildingCheckboxes,
#officeExportCategoryCheckboxes {
  background-color: #f9f9f9;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  padding: 8px 10px;
  max-height: 150px;
  overflow-y: auto;
  margin-top: 5px;
}

#officeExportBuildingCheckboxes div,
#officeExportCategoryCheckboxes div {
  padding: 4px 0;
  display: flex;
  align-items: center;
}

#officeExportBuildingCheckboxes label,
#officeExportCategoryCheckboxes label {
  margin-left: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #444;
}

#officeExportBuildingCheckboxes label[for^="export_officeBuilding_all"],
#officeExportCategoryCheckboxes label[for^="export_officeIssueCategory_all"] {
  font-weight: bold;
  color: #111;
}


#officeExportLogModal input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

#officeExportLogModal #officeExportHandledByInput,
#officeExportLogModal #officeExportStartDate,
#officeExportLogModal #officeExportEndDate {
  padding: 10px;
}

#officeExportLogModal #submitOfficeExportLog {
  margin-top: 25px;
}

#officeExportBuildingCheckboxes div:hover,
#officeExportCategoryCheckboxes div:hover {
    background-color: #f0f0f0;
}

#officeExportLogModal #officeExportStatusMessage {
  font-weight: 500;
  text-align: center;
  width: 100%;
  font-size: 0.9rem;
  padding: 10px 5px;
  margin-top: 10px;
  min-height: 20px;
}

@media (max-width: 768px) {
  #adminDashboardContainer #exportOfficeLogButton {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
  #officeExportLogModal .modal-content {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  #adminDashboardContainer {
    padding: 10px;
  }
  #adminDashboardContainer > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  #adminDashboardContainer h2 {
    font-size: 1.3rem;
    width: 100%;
    text-align: left;
  }
  #adminDashboardContainer #exportOfficeLogButton {
    padding: 6px 10px;
    font-size: 0.8rem;
    width: 100%;
    text-align: center;
  }
   #officeExportLogModal .modal-content {
    padding: 15px;
    padding-top: 40px;
  }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 8px;
}
.blurred {
    filter: blur(5px);
    pointer-events: none;
    transition: filter 0.3s ease-in-out;
}

/* ======================================================== */
/* === Classroom Page - Export Button Layout Correction === */
/* ======================================================== */
#classroomDashboardHeader > div {
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
}

#classroomDashboardHeader #exportLogButton {
    background-color: #f8f9fa;
    color: #016751;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#classroomDashboardHeader #exportLogButton:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

#classroomDashboardHeader #exportLogButton:disabled {
  background-color: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
  transform: none;
  border-color: #e0e0e0;
  box-shadow: none;
}


/* ================================================= */
/* === Responsive Rules to Match Office Dashboard === */
/* ================================================= */
@media (max-width: 768px) {
    #classroomDashboardHeader h2 {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 480px) {
    #classroomDashboardHeader > div {
        flex-direction: column;
        align-items: stretch !important;
    }

    #classroomDashboardHeader h2 {
        font-size: 1.4rem !important;
        text-align: center;
        margin-bottom: 10px !important;
    }

    #classroomDashboardHeader #exportLogButton {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* ======================================== */
/* === Main Controls (Export Button) === */
/* ======================================== */
.main-controls {
    width: 100%;
    max-width: 2500px;
    padding: 0 15px;
    margin-top: 15px;
    margin-bottom: 0px;
    text-align: center;
    box-sizing: border-box;
}

.main-controls #exportLogButton {
    background-color: #f8f9fa;
    color: #016751;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.main-controls #exportLogButton:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.main-controls #exportLogButton:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

#completedIssuesSection .section-header h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

#completedIssuesSection .action-btn.clear-all-btn {
    background-color: #fce4e4;
    border: 1px solid #f7b2b2;
    color: #c62828;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#completedIssuesSection .action-btn.clear-all-btn:hover:not(:disabled) {
    background-color: #f7b2b2;
    border-color: #e57373;
    transform: translateY(-1px);
}

body.auth-wall-active header,
body.auth-wall-active main,
body.auth-wall-active .main-controls {
    display: none !important;
}

body.auth-wall-active #authModal {
    display: flex !important;
}

.separator-line {
    width: 80%;
    max-width: 600px;
    height: 2px;
    background: linear-gradient(to right, transparent, #016751, transparent);
    margin: 30px 0;
}

@media (max-width: 768px) {
    .separator-line {
        width: 90%;
        margin: 20px 0;
    }
}

.icon-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.icon-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-button:hover svg {
    transform: scale(1.1);
}

.icon-button:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.icon-button svg.rotate-icon {
    transform: rotate(45deg);
}

header .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 480px) {
    .icon-button {
        width: 36px;
        height: 36px;
        padding: 4px;
    }
    .icon-button svg {
        width: 20px;
        height: 20px;
    }
}

#userTrackingModal .modal-content {
    max-width: 1400px;
    width: 95%;
    padding: 40px;
    padding-top: 70px;
    max-height: 95vh;
}

.dashboard-sections-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    width: 100%;
}

.dashboard-section {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

#userTrackingModal h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
}

#userTrackingModal .dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #016751;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.8rem;
    text-align: center;
}

.category-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.category-section h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #555;
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ccc;
    text-align: center;
}

.users-list {
    overflow-y: auto;
    padding-right: 10px;
    flex-grow: 1;
    min-height: 80px;
    max-height: 250px;
}

.dashboard-user-item {
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dashboard-user-item.status-pending-approval {
    border-left: 5px solid #ffb300;
}
.dashboard-user-item.status-approved {
    border-left: 5px solid #43a047;
}
.dashboard-user-item.status-rejected {
    border-left: 5px solid #e53935;
}

.dashboard-user-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
    text-align: left;
}
.dashboard-user-item p {
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #424242;
    text-align: left;
}
.dashboard-user-item p strong {
    color: #000;
}
.dashboard-user-item .status-text {
    font-weight: bold;
}

.users-list .no-users {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 20px;
    font-size: 1rem;
}

.user-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-actions .action-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: bold;
    white-space: nowrap;
}

.user-actions .approve-btn {
    background-color: #4CAF50;
    color: white;
}
.user-actions .approve-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}
.user-actions .approve-btn:active {
    transform: translateY(0);
}

.user-actions .reject-btn {
    background-color: #f44336;
    color: white;
}
.user-actions .reject-btn:hover {
    background-color: #da190b;
    transform: translateY(-1px);
}
.user-actions .reject-btn:active {
    transform: translateY(0);
}

.user-actions .revoke-btn {
    background-color: #FFC107;
    color: #333;
}
.user-actions .revoke-btn:hover {
    background-color: #ffb300;
    transform: translateY(-1px);
}
.user-actions .revoke-btn:active {
    transform: translateY(0);
}

.user-actions .reapprove-btn {
    background-color: #2196F3;
    color: white;
}
.user-actions .reapprove-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}
.user-actions .reapprove-btn:active {
    transform: translateY(0);
}

.user-actions .promote-btn {
    background-color: #9C27B0;
    color: white;
}
.user-actions .promote-btn:hover {
    background-color: #7B1FA2;
    transform: translateY(-1px);
}
.user-actions .promote-btn:active {
    transform: translateY(0);
}

.dashboard-user-item .user-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dashboard-user-item .user-item-header h4 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.1rem;
    color: #333;
}

.action-btn.delete-user-btn {
    background-color: transparent !important;
    border: none !important;
    color: red;
    font-size: 1.2rem;
    padding: 4px 8px;
    cursor: pointer;
}

.action-btn.delete-user-btn:hover:not(:disabled) {
    background-color: transparent !important;
    color: #d32f2f;
    transform: scale(1.15);
}

.action-btn.delete-user-btn:disabled {
    background-color: transparent !important;
    color: #bdbdbd !important;
    border: none !important;
    cursor: not-allowed;
    transform: none;
}


.user-actions .delete-user-btn {
    background-color: transparent !important;
    border: none !important;
    color: red;
    font-size: 1.2rem;
    padding: 4px 8px;
}

.user-actions .delete-user-btn:hover:not(:disabled) {
    background-color: transparent !important;
    color: #d32f2f;
    transform: scale(1.15);
}

.user-actions .delete-user-btn:disabled {
    background-color: transparent !important;
    color: #bdbdbd !important;
    border: none !important;
    cursor: not-allowed;
    transform: none;
}

.user-actions .action-btn:disabled {
    background-color: #e0e0e0 !important;
    color: #9e9e9e !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (min-width: 1200px) {
    #userTrackingModal .modal-content {
        max-width: 1600px;
    }
    .dashboard-section {
        min-width: 380px;
    }
}

@media (max-width: 900px) {
    .dashboard-sections-wrapper {
        flex-direction: column;
    }
    #userTrackingModal .modal-content {
        width: 95%;
        max-width: 800px;
        padding: 30px;
    }
    #userTrackingModal h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    .dashboard-section h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .category-section h4 {
        font-size: 1.2rem;
    }
    .users-list {
        max-height: 200px;
    }
    .dashboard-user-item {
        padding: 15px;
    }
    .dashboard-user-item h4 {
        font-size: 1rem;
    }
    .dashboard-user-item p {
        font-size: 0.9rem;
    }
    .user-actions .action-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    #userTrackingModal .modal-content {
        max-width: 600px;
    }
    .dashboard-section {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    #userTrackingModal .modal-content {
        padding: 20px;
        padding-top: 40px;
        width: 98%;
    }
    #userTrackingModal h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    .dashboard-sections-wrapper {
        gap: 20px;
    }
    .dashboard-section {
        padding: 15px;
    }
    .dashboard-section h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    .category-section {
        margin-bottom: 20px;
    }
    .category-section h4 {
        font-size: 1.1rem;
    }
    .users-list {
        max-height: 180px;
    }
    .dashboard-user-item {
        padding: 12px;
    }
    .dashboard-user-item h4 {
        font-size: 0.95rem;
    }
    .dashboard-user-item p {
        font-size: 0.85rem;
    }
    .user-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .user-actions .action-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}

.search-container {
    width: 100%;
    margin-bottom: 20px;
    padding: 0 10px;
    box-sizing: border-box;
}

#userSearchInput {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#userSearchInput::placeholder {
    color: #888;
    font-style: italic;
}

#userSearchInput:focus {
    outline: none;
    border-color: #016751;
    box-shadow: 0 0 0 3px rgba(1, 103, 81, 0.25);
}

@media (max-width: 900px) {
    .search-container {
        padding: 0;
    }
}

@media (max-width: 480px) {
    #userSearchInput {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}