header {
  display: none;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  padding: 0.2rem 2rem;
  background-color: #b6362e;
  color: #fff;
  text-align: center;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
}

.eduadmin-wrapper {
  display: flex;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
}

.eduadmin-sidebar {
  width: 240px;
  background: #1e2a38;
  color: #fff;
  padding: 1em;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.eduadmin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.eduadmin-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.eduadmin-sidebar h2 {
  font-size: 1.1em;
  margin-bottom: 1em;
  line-height: 1.5rem;
}

.eduadmin-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eduadmin-menu li {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eduadmin-menu li:hover,
.eduadmin-menu li.active {
  background: #2f4054;
  border-radius: 4px;
}

.eduadmin-main {
  flex: 1;
  background: #f7f9fb;
  padding: 20px;
  margin-bottom: 5rem;
}

.eduadmin-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.dashboard-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px 20px;
  flex: 1;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eduadmin-table {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
}

.eduadmin-table th,
.eduadmin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.eduadmin-section {
  display: none;
}

.eduadmin-section.active {
  display: block;
}

.institution-admin-header {
    width: 100%;
    background: #1e2a38;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    font-family: "Segoe UI", sans-serif;
}

.institution-admin-header-inner {
    max-width: 800px;
    margin: 0 auto;
}

.institution-admin-header .site-title {
    font-size: 2.2em;
    margin: 0;
    font-weight: 700;
}

.institution-admin-header .site-description {
    font-size: 1.2em;
    margin: 5px 0 0;
    font-weight: 400;
}

/* === Students Section === */

.eduadmin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.eduadmin-search {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 250px;
  font-size: 0.95em;
}

.eduadmin-btn {
  background: #2f4054;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.eduadmin-btn:hover {
  background: #3f5371;
}

.eduadmin-btn-small {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.85em;
  margin-right: 5px;
  transition: background 0.2s;
}

.eduadmin-btn-small:hover {
  background: #005f8d;
}

.eduadmin-btn-small.save {
  background: #0073aa;
  color: #fff;
}

.eduadmin-btn-small.save:hover {
  background: #005f8d;
}

.eduadmin-btn.danger {
  background: #b6362e;
}

.eduadmin-btn.danger:hover {
  background: #d44b40;
}

.eduadmin-btn-small.danger {
  background: #b6362e;
}

.eduadmin-btn-small.danger:hover {
  background: #d44b40;
}

/* Table tweaks */
.eduadmin-students-table th {
  background: #eef1f5;
  font-weight: 600;
}

.eduadmin-students-table tr:hover {
  background-color: #f1f4f8;
}

.eduadmin-students-table td,
.eduadmin-students-table th {
  vertical-align: middle;
}

/* === Password Field === */
.student-password {
  font-family: monospace;
  cursor: pointer;
  display: inline-block;
  background: #f5f7fa;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
  position: relative;
}

.student-password:hover {
  background: #e1e7f0;
}

.student-password.copied::after {
  content: "Copied!";
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: #2f4054;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  opacity: 0;
  animation: fadeMessage 2s ease-out forwards;
}

@keyframes fadeMessage {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.eduadmin-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: #2f4054;
  font-size: 18px; /* dashicons size */
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eduadmin-btn-icon:hover {
  color: #3f5371;
}

/* Highlight regenerate button when clicked */
.regenerate-password.clicked {
  color: #fff;
  background-color: #2f4054;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

/* === Modal === */
.eduadmin-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.eduadmin-modal-content {
  background: #fff;
  padding: 20px 25px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.checkbox-inline {
  display: inline-block;
  margin-right: 10px;
}

.form-actions {
  text-align: right;
  margin-top: 10px;
}

.edit-message {
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
  display: none;
}

.edit-message.success { color: green; }
.edit-message.error { color: red; }

.row-updated {
  background-color: #d2f8d2 !important;
  transition: background-color 2s ease;
}

/* === Modal (shared for edit & add) === */
.eduadmin-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
}

.eduadmin-modal-content {
  background: #fff;
  padding: 20px 25px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
}

/* Buttons consistent between modals */
.eduadmin-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.eduadmin-btn:hover {
  background: #005f8d;
}

.eduadmin-btn-small.danger {
  background: #dc3232;
  color: #fff;
}

.form-actions {
  text-align: right;
  margin-top: 10px;
}

/* === Groups Section === */

.eduadmin-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  position: relative;
}

.eduadmin-groups-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  margin-top: -3rem;
  padding: 0;
}

.eduadmin-group-card {
  background: #fff;
  border-radius: 8px;
  padding: 15px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eduadmin-group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.group-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.group-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.group-icon-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e1e7f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f4054;
  font-size: 20px;
}

.group-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #2f4054;
  margin: 0;
}

.group-card-body {
  font-size: 0.95em;
  color: #333;
  margin-top: 10px;
}

.group-notes {
  background: #f9f9f9;
  border-left: 3px solid #2f4054;
  padding: 6px 8px;
  margin-top: 8px;
  border-radius: 4px;
  font-style: italic;
}

.group-card-actions {
  text-align: right;
  margin-top: 12px;
}

/* === Tables Grid === */
.eduadmin-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.eduadmin-table-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eduadmin-table-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table-card-thumb {
  height: 160px;
  overflow: hidden;
}

.table-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-card-body {
  padding: 1rem;
  text-align: center;
  background-color: #f9fafb;
}

.table-card-body h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* === Table Content Area === */
.eduadmin-table-content {
  margin-top: 1.5rem;
}

#back-to-grid {
  background: #f0f0f0;
  border: none;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 1rem;
}
#back-to-grid:hover {
  background: #ddd;
}

/* ==========================================================
   WEEKLY ATTENDANCE + MEAL TABLE STYLES
   ========================================================== */

.eduadmin-table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.eduadmin-table-wrapper h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

/* Table structure */
.eduadmin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fafafa;
}

.eduadmin-table th,
.eduadmin-table td {
  text-align: center;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

.eduadmin-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #111827;
}

.eduadmin-table td {
  background: #fff;
}

/* Hover + focus states */
.eduadmin-table tr:hover td {
  background: #f9fafb;
}

.eduadmin-table select {
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eduadmin-table select:hover {
  border-color: #94a3b8;
}

.eduadmin-table select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
}

/* Days header */
.eduadmin-table thead th {
  white-space: nowrap;
  padding: 0.75rem 0.5rem;
}

/* Footer totals */
.eduadmin-table tfoot th {
  background: #f3f4f6;
  font-weight: 600;
  color: #1e293b;
}

.eduadmin-table tfoot th.daily-total {
  color: #0f172a;
  font-weight: 700;
}

/* Student name column */
.eduadmin-table td:first-child,
.eduadmin-table th:first-child {
  text-align: left;
  padding-left: 1rem;
}

/* Yes count (per student) */
.yes-count {
  font-weight: 600;
  color: #15803d;
}

/* Table responsive handling */
@media (max-width: 768px) {
  .eduadmin-table-wrapper {
    padding: 1rem;
  }

  .eduadmin-table th,
  .eduadmin-table td {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .eduadmin-table select {
    font-size: 0.8rem;
  }
}

/* Subtle alternating row colors for readability */
.eduadmin-table tbody tr:nth-child(odd) td {
  background-color: #fcfcfc;
}

/* Totals row highlight */
.eduadmin-table tfoot {
  border-top: 2px solid #cbd5e1;
}

.eduadmin-table tfoot th {
  background-color: #f8fafc;
}

/* Fade animation when totals update */
@keyframes highlight-cell {
  from { background-color: #d1fae5; }
  to { background-color: transparent; }
}

.eduadmin-table tfoot th.updated {
  animation: highlight-cell 1s ease;
}

/* Optional: tooltip for day headers (if you add later) */
.eduadmin-table th[data-tooltip] {
  position: relative;
  cursor: help;
}
.eduadmin-table th[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0.95;
  pointer-events: none;
  z-index: 10;
}

