body {
  font-family: Arial, sans-serif;
  background: #09376d;
  padding: 20px;
}

h1 {
  text-align: center;
  color: #2c3e50;
}

.container {
  max-width: 1800px;
  margin: auto;
  background: white;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 8px 32px 0 rgba(9,55,109,0.18), 0 1.5px 6px 0 rgba(0,0,0,0.10);
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px 0 rgba(9,55,109,0.10);
  transition: box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 4px 16px 0 rgba(9,55,109,0.18);
  outline: none;
}
button[type="submit"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  border: 1px solid #09376d;
  background: #09376d;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px 0 rgba(9,55,109,0.10);
  transition: transform 0.08s, background 0.2s;
  cursor: pointer;
}
button[type="submit"]:active {
  transform: scale(0.97);
  background: #07294e;
}

th, td {
  padding: 12px 8px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: top;
  word-break: break-word;
  font-size: 0.9em;
}

th {
  background-color: #2c3e50;
  color: white;
  font-weight: bold;
  white-space: nowrap;
}

.resolved {
  background-color: #d4edda;
  color: #155724;
}
.resolved td {
  text-decoration: line-through;
  color: #7a8a7a !important;
}
.action-btn {
  padding: 4px 6px;
  margin: 1px;
  font-size: 0.75em;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 45px;
  white-space: nowrap;
}
.action-btn:hover {
  background: #e9ecef;
}
.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Offense color coding */
.offense-1 {
  background-color: #fffbe6 !important; /* yellow */
}
.offense-2 {
  background-color: #ffe5cc !important; /* orange */
}
.offense-3 {
  background-color: #ffd6d6 !important;
  position: relative;
}
.offense-3::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 4px solid rgba(255,0,0,0.3);
  pointer-events: none;
  border-radius: 0;
  box-shadow: 0 0 0 0 rgba(255,0,0,0.15);
  animation: pulse-red-border-outline 0.8s infinite alternate;
  z-index: 10;
}
@keyframes pulse-red-border-outline {
  from {
    border-color: rgba(255,0,0,0.3);
    box-shadow: 0 0 0 0 rgba(255,0,0,0.15);
  }
  to {
    border-color: rgba(255,0,0,0.7);
    box-shadow: 0 0 16px 8px rgba(255,0,0,0.25);
  }
}

.logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
  color: white;
}
.logo-title img {
  height: 48px;
  width: 48px;
  object-fit: contain;
}
.logo-title h1 {
  color: white;
}
/* Remove drop shadow from checkboxes */
input[type="checkbox"] {
  box-shadow: none !important;
  width: auto;
  min-width: 16px;
  margin: 0;
  vertical-align: middle;
}
/* Responsive table for mobile */
.table-scroll-container {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

#recordTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

/* Column widths for desktop */
#recordTable th:nth-child(1), #recordTable td:nth-child(1) {
  width: 3%;
  text-align: center;
  padding: 8px 4px;
}
#recordTable th:nth-child(2), #recordTable td:nth-child(2) { width: 12%; } /* Name */
#recordTable th:nth-child(3), #recordTable td:nth-child(3) { width: 10%; } /* ID */
#recordTable th:nth-child(4), #recordTable td:nth-child(4) { width: 12%; } /* Course */
#recordTable th:nth-child(5), #recordTable td:nth-child(5) { width: 10%; } /* Grade Level */
#recordTable th:nth-child(6), #recordTable td:nth-child(6) { width: 12%; } /* Infraction */
#recordTable th:nth-child(7), #recordTable td:nth-child(7) { width: 15%; } /* Remarks */
#recordTable th:nth-child(8), #recordTable td:nth-child(8) { width: 8%; }  /* Status */
#recordTable th:nth-child(9), #recordTable td:nth-child(9) { width: 12%; } /* Date & Time */
#recordTable th:nth-child(10), #recordTable td:nth-child(10) { width: 8%; } /* Actions */

@media (max-width: 800px) {
  .mobile-menu-btn {
    display: block;
  }
  .container, .logo-title {
    padding-left: 48px;
  }
  .desktop-actions {
    display: none !important;
  }
  .table-scroll-container {
    max-height: none;
    overflow-x: auto;
    min-width: 100vw;
    margin-left: -20px;
    padding-right: 0;
  }
  #recordTable {
    min-width: 900px;
    font-size: 0.85em;
    table-layout: auto;
  }
  #recordTable th, #recordTable td {
    padding: 8px 4px;
    min-width: 60px;
  }
  .action-btn {
    padding: 3px 6px;
    font-size: 0.75em;
  }
  td.remarks-col {
    min-width: 120px;
    max-width: 200px;
  }
  td.status-col {
    min-width: 80px;
  }
  td, th {
    white-space: pre-line;
  }
}
@media (min-width: 801px) {
  .mobile-menu, .mobile-menu-btn {
    display: none !important;
  }
}

/* Mobile menu styles */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1200;
  background: #09376d;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 1.6em;
  cursor: pointer;
  box-shadow: 0 2px 8px 0 rgba(9,55,109,0.10);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 70vw;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 16px rgba(9,55,109,0.18);
  z-index: 1300;
  padding: 32px 20px 20px 20px;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  transition: transform 0.2s;
  transform: translateX(-100%);
}
.mobile-menu.open {
  display: block;
  transform: translateX(0);
}
.mobile-menu .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #09376d;
  cursor: pointer;
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu li {
  margin: 18px 0;
}
.mobile-menu button, .mobile-menu label {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.1em;
  color: #09376d;
  padding: 8px 0;
  cursor: pointer;
  display: block;
}
.mobile-menu label {
  cursor: pointer;
  font-weight: normal;
}

/* Modern Toggle Switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 12px;
}
.toggle-switch input[type="checkbox"] {
  display: none;
}
.toggle-switch .slider {
  width: 36px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
  margin-right: 8px;
}
.toggle-switch .slider:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input[type="checkbox"]:checked + .slider {
  background: #4caf50;
}
.toggle-switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(16px);
}
.toggle-switch .label-text {
  font-size: 0.98em;
  color: #333;
  margin-left: 2px;
}

/* Modern Button Styles */
.modern-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border: none;
  border-radius: 6px;
  background: #1976d2;
  color: #fff;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.modern-btn:disabled {
  background: #bdbdbd;
  color: #eee;
  cursor: not-allowed;
  opacity: 0.7;
}
.modern-btn:hover:not(:disabled) {
  background: #1565c0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.18);
  transform: scale(1.04);
}
.modern-btn.danger {
  background: #e53935;
}
.modern-btn.danger:hover:not(:disabled) {
  background: #b71c1c;
}
.modern-btn.success {
  background: #43a047;
}
.modern-btn.success:hover:not(:disabled) {
  background: #2e7d32;
}

/* Vertically align and center action buttons in Actions column */
.action-btn-vertical-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

@media (max-width: 800px) {
  .action-btn-vertical-group {
    gap: 4px;
  }
}

/* Input hover effect */
input[type="text"]:hover, textarea:hover, select:hover {
  box-shadow: 0 4px 16px 0 rgba(25, 118, 210, 0.18);
  border-color: #1976d2;
}

/* Table row hover effect: zoom in with ease-in animation */
#recordTable tbody tr {
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
#recordTable tbody tr:hover {
  /* No background-color here, keep original row background */
  transform: scale(1.025);
  z-index: 100 !important;
  position: relative !important;
  margin-left: -12px;
  margin-right: -12px;
}
#recordTable tbody tr:not(.offense-3):hover {
  box-shadow: 0 4px 18px 0 rgba(25, 118, 210, 0.10);
}

/* Filter bar and action bar styles for better navigation */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 18px 0 10px 0;
  background: #f7fafd;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 1px 4px 0 rgba(25,118,210,0.06);
  position: relative;
}
.filter-bar input[type="text"] {
  max-width: 260px;
  min-width: 180px;
  flex: 1 1 180px;
}
.filter-bar select {
  min-width: 140px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  background: #fff;
  font-size: 1em;
}
.filter-bar .toggle-switch {
  margin-left: 0;
}
.filter-bar button.modern-btn {
  margin-left: auto;
}
.filter-bar .modern-btn#sortBtn {
  position: absolute;
  top: 14px;
  right: 18px;
  margin-left: 0;
  z-index: 10;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: flex-start;
}
.action-bar button.modern-btn {
  min-width: 140px;
}
@media (max-width: 800px) {
  .filter-bar, .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 6px;
  }
  .filter-bar input[type="text"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .action-bar button.modern-btn {
    min-width: 0;
    width: 100%;
  }
  .filter-bar .modern-btn#sortBtn {
    position: static;
    width: 100%;
    margin-top: 8px;
    right: auto;
    top: auto;
  }
}
