* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #0b0b0b;
  color: white;
  min-height: 100vh;
}

.wrapper {
  width: 100%;
  max-width: 950px;
  margin: auto;
  padding: 30px 20px;
}

.card {
  background: #111;
  border: 1px solid rgba(47, 158, 111, .35);
  border-radius: 18px;
  box-shadow: 0 0 25px rgba(47, 158, 111, .12);
  padding: 28px;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  color: #2f9e6f;
  font-size: 34px;
}

.subheading {
  text-align: center;
  color: #9ad9b8;
  margin-bottom: 28px;
  font-size: 15px;
}

#searchPage {
  margin-top: 90px;
}

.input {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid #2f9e6f;
  background: #0d0d0d;
  color: white;
  font-size: 16px;
  outline: none;
}

.input:focus {
  box-shadow: 0 0 10px rgba(47, 158, 111, .2);
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #d7d7d7;
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2f9e6f;
  cursor: pointer;
}

.remember-label:hover {
  color: #fff;
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #2f9e6f;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: .2s;
}

.btn:hover {
  background: #37b77f;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.logout {
  width: auto;
  padding: 10px 18px;
  border-radius: 10px;
  background: #1d1d1d;
  border: 1px solid #2f9e6f;
}

.btn.secondary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #151515;
  border: 1px solid #2f9e6f;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
  text-align: center;
  display: block;
  margin-top: 14px;
}

.btn.secondary:hover {
  background: #1d1d1d;
  border-color: #37b77f;
}

.resources-link {
  text-align: center;
  margin-top: 16px;
}

.resources-link a {
  color: #2f9e6f;
  text-decoration: underline;
  font-size: 15px;
  transition: color .2s, opacity .2s;
  cursor: pointer;
}

.resources-link a:hover {
  color: #37b77f;
  opacity: .85;
}

#welcome {
  color: #9ad9b8;
  font-size: 14px;
  margin-top: 5px;
}

.summary-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.summary-card > div {
  background: #151515;
  border: 1px solid rgba(47, 158, 111, .18);
  border-radius: 14px;
  padding: 18px;
}

.label {
  font-size: 13px;
  color: #9ad9b8;
  margin-bottom: 8px;
}

.value {
  font-size: 18px;
  font-weight: bold;
}

.green {
  color: #2f9e6f;
}

.red {
  color: #ff6464;
}

.section-title {
  color: #2f9e6f;
  margin-bottom: 18px;
  font-size: 24px;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.subject-card {
  background: #151515;
  border: 1px solid rgba(47, 158, 111, .18);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: .2s;
}

.subject-card:hover {
  transform: translateY(-2px);
  background: #1b1b1b;
}

.subject-name {
  font-size: 17px;
  margin-bottom: 10px;
  font-weight: bold;
}

.subject-meta {
  color: #d7d7d7;
  font-size: 14px;
  line-height: 1.7;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-box {
  width: 420px;
  max-width: 92%;
  background: #111;
  border: 1px solid #2f9e6f;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 0 30px rgba(47, 158, 111, .18);
}

.modal-box.large {
  width: 760px;
  max-height: 80vh;
  overflow: auto;
}

.modal-box h3 {
  color: #2f9e6f;
  margin-bottom: 15px;
  text-align: center;
  font-size: 24px;
}

.modal-box p {
  color: #eee;
  line-height: 1.6;
  margin-bottom: 25px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #151515;
  border: 1px solid rgba(47, 158, 111, .15);
}

.history-left {
  color: #eee;
}

.history-right.present {
  color: #2f9e6f;
  font-weight: bold;
}

.history-right.absent {
  color: #ff6464;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .summary-card {
    grid-template-columns: repeat(2, 1fr);
  }

  .subjects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-card {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}