body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f4f6fb;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(44, 62, 80, 0.06);
  margin-top: 1.5rem;
  overflow: hidden;
}

.sticky-header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  padding: 1.2rem 1rem 0.5rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

h1 {
  text-align: center;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #1a1a1a;
  font-size: 2rem;
  letter-spacing: -1px;
}

.student-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0 2.5rem 0;
  padding: 0 1.2rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  margin-left: 1.2rem;
}

.mark-btn {
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.04);
  outline: none;
}

.mark-btn.present {
  background: #e8f5e9;
  color: #2e7d32;
}

.mark-btn.present.active,
.mark-btn.present:active {
  background: #43e97b;
  color: #fff;
}

.mark-btn.absent {
  background: #ffebee;
  color: #c62828;
}

.mark-btn.absent.active,
.mark-btn.absent:active {
  background: #ff5252;
  color: #fff;
}

.student-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 1.1rem 1.5rem;
  background: #f6fff7;
  color: #1b5e20;
  border: 2px solid #e0f2f1;
  box-shadow: none;
  user-select: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, transform 0.12s;
  position: relative;
  outline: none;
  margin-bottom: 0.2rem;
}

.student-name {
  font-size: 0.75em;
  color: #2e7d32;
}

.student-card.absent {
  background: #fff6f6;
  color: #b71c1c;
  border: 2px solid #ffcdd2;
}

.student-card.present {
  background: #e8f5e9;
  color: #2e7d32;
  border: 2px solid #c8e6c9;
}

.student-card.unmarked {
  background: #f4f6fb;
  color: #888;
  border: 2px dashed #bdbdbd;
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 0.7rem;
  background: #43e97b;
  border: 2px solid #c8e6c9;
  transition: background 0.18s, border 0.18s;
}

.student-card.absent .status-dot {
  background: #ff5252;
  border: 2px solid #ffcdd2;
}

.student-card:active {
  transform: scale(0.97);
}

.main-btn {
  width: 100%;
  padding: 1.1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
  color: #fff;
  margin: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}

.toggle-bar .main-btn {
  width: auto;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  margin: 0 0 0 auto;
}

.main-btn:hover,
.main-btn:active {
  background: linear-gradient(90deg, #38f9d7 0%, #43e97b 100%);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.12);
  transform: scale(0.98);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.2rem 1.2rem 1.2rem;
}

.message {
  text-align: center;
  font-size: 1rem;
  color: #388e3c;
  min-height: 1.5em;
  margin-bottom: 1rem;
}

.nav-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
  border-radius: 0 0 18px 18px;
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-btn {
  flex: 1;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  background: none;
  border: none;
  color: #1a1a1a;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border 0.15s;
}

.nav-btn.active {
  color: #43e97b;
  border-bottom: 3px solid #43e97b;
  background: #f4f6fb;
}

#records-page {
  display: none;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 1.5rem 0 2.5rem 0;
  padding: 0 1.2rem;
}

.record-card {
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 1px 6px rgba(44, 62, 80, 0.04);
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.08rem;
  font-weight: 500;
}

.record-date {
  color: #222;
  font-weight: 600;
}

.record-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: none;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #43e97b;
  transition: background 0.15s;
  display: flex;
  align-items: center;
}

.icon-btn:hover {
  background: #e0f2f1;
}

.icon-btn.delete {
  color: #ff5252;
}

.icon-btn.delete:hover {
  background: #ffeaea;
}

.add-roll-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.2rem 1.2rem 0.2rem 1.2rem;
}

#add-roll-input {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 999px;
  outline: none;
  transition: border 0.15s;
}

#add-roll-input:focus {
  border: 1.5px solid #43e97b;
}

.toggle-bar {
  display: flex;
  gap: 1.2rem;
  margin: 0.7rem 1.2rem 0.2rem 1.2rem;
  font-size: 1rem;
  align-items: center;
}

.toggle-bar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.toggle-bar input[type='checkbox'] {
  width: 1.1em;
  height: 1.1em;
  accent-color: #43e97b;
}

#show-marked-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.7rem 1.2rem 0.2rem 1.2rem;
  font-size: 1rem;
}

#show-marked-bar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

#show-marked-bar input[type='checkbox'] {
  width: 1.1em;
  height: 1.1em;
  accent-color: #43e97b;
}

#popup-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #43e97b;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1.2rem 2.2rem;
  border-radius: 16px;
  box-shadow: 0 6px 32px rgba(44, 62, 80, 0.18);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
}

#popup-message.show {
  display: block;
  opacity: 1;
}

@media (max-width: 600px) {
  .container {
    max-width: 100vw;
    margin-top: 0.5rem;
    border-radius: 0;
  }

  .student-list {
    padding: 0 0.2rem;
  }

  .actions {
    padding: 0 0.2rem 1rem 0.2rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .student-card {
    font-size: 1.05rem;
    padding: 0.9rem 0.7rem;
  }

  .main-btn {
    font-size: 1rem;
    padding: 0.9rem 0;
  }

  .nav-bar {
    border-radius: 0 0 12px 12px;
    margin-bottom: 0.2rem;
  }

  .records-list {
    padding: 0 0.2rem;
  }

  .record-card {
    font-size: 0.98rem;
    padding: 0.8rem 0.7rem;
  }

  .btn-group {
    gap: 0.2rem;
    margin-left: 0.5rem;
  }

  .mark-btn {
    font-size: 0.95rem;
    padding: 0.4rem 0.7rem;
  }
}

/*---------------------------------------------------------------*/

/* Add these styles to your existing styles.css */
.form-container {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.secondary-btn {
  background-color: #f0f0f0;
  color: #333;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.secondary-btn:hover {
  background-color: #e0e0e0;
}

.danger-btn {
  background-color: #dc3545;
  color: white;
}

.danger-btn:hover {
  background-color: #c82333;
}

.student-list {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.list-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

tr:hover {
  background-color: #f9f9f9;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.edit-btn,
.delete-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.edit-btn {
  background-color: #007bff;
  color: white;
}

.edit-btn:hover {
  background-color: #0056b3;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
}

.delete-btn:hover {
  background-color: #c82333;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
}

.modal h3 {
  margin-top: 0;
  color: #333;
}

.modal p {
  margin: 1rem 0;
  color: #555;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.popup.show {
  opacity: 1;
  transform: translateY(0);
}

.popup.success {
  background-color: #28a745;
}

.popup.error {
  background-color: #dc3545;
}

.popup.info {
  background-color: #17a2b8;
}

.no-students {
  padding: 2rem;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Responsive styles */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .search-box {
    width: 100%;
    margin-top: 1rem;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}