* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  margin: 0;
  background: #14532d; /* fallback color while images load */
  color: #1f2937;
}

#bgContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
}

.bg-slice {
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px);
  transform: scale(1.05); /* prevents blurry edges from showing at the border */
}

header {
  background: rgba(20, 83, 45, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 20px 16px;
  text-align: center;
}

header h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

nav a {
  color: #dcfce7;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

.search-box {
  display: flex;
  gap: 8px;
}

input, select {
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 100%;
}

#lrnInput {
  flex: 1;
}

button {
  padding: 12px 20px;
  font-size: 15px;
  background: #14532d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #0f3f21;
}

#message {
  min-height: 20px;
  color: #b91c1c;
  font-weight: 600;
  margin-top: 10px;
}

#message.success {
  color: #166534;
}

.student-card {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.student-card.hidden {
  display: none;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-top: 8px;
}

.info-grid .full-width {
  grid-column: 1 / -1;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

form label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: -6px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

th {
  background: #14532d;
  color: white;
}

.delete-btn {
  background: #b91c1c;
  padding: 6px 10px;
  font-size: 13px;
}

.delete-btn:hover {
  background: #991b1b;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  gap: 10px;
}

.header-top h1 {
  flex: 1;
  text-align: center;
  margin: 0;
}

.school-logo {
  height: 90px;
  width: 90px;
  object-fit: contain;
}

.district-logo {
  height: 95px;
  width: 95px;
  object-fit: contain;
}

.deped-banner {
  height: 85px;
  width: auto;
  object-fit: contain;
}

.hidden-content {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.overlay-box {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 320px;
  width: 90%;
}

.overlay-box input {
  margin: 12px 0;
}

.error-text {
  color: #b91c1c;
  font-weight: 600;
  min-height: 20px;
}

.grade-filters {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  color: #14532d;
  border: 2px solid #14532d;
  padding: 8px 16px;
  font-size: 14px;
}

.filter-btn:hover {
  background: #dcfce7;
}

.filter-btn.active {
  background: #14532d;
  color: white;
}

.search-panel {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.search-panel p {
  color: #1f2937;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

#lrnInput {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

#searchBtn {
  background: rgba(20, 83, 45, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tab-btn {
  background: #14532d;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.tab-btn:hover {
  background: #0f3f21;
}

#searchBtn:hover {
  background: rgba(15, 63, 33, 0.85);
}

@media (max-width: 900px) {
  .header-top {
    flex-direction: column;
    text-align: center;
  }

  .header-top h1 {
    font-size: 20px;
    order: 1;
  }

  .header-left {
    order: 2;
  }

  .deped-banner {
    order: 3;
    height: 45px;
  }

  .school-logo,
  .district-logo {
    height: 45px;
    width: 45px;
  }
} 