/* =============================
   BASE STYLES & RESET
============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  background-color: #f4f7fb;
  color: #334155;
  text-align: center;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* =============================
   NAVBAR
============================= */
.navbar {
  width: 100%;
  max-width: 100%;
  background: linear-gradient(135deg, #0b1a2d, #1a365d);
  padding: 25px 20px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

.navbar h1 {
  margin: 0;
  font-weight: 700;
  font-size: 28px;
}

/* =============================
   MENU BAR
============================= */
.menu-bar {
  width: 100%;
  max-width: 100%;
  background-color: #ffffff;
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-bar a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: transparent;
}

.menu-bar a:hover,
.menu-bar a:focus {
  background-color: #f1f5f9;
  color: #2563eb;
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

@media (max-width: 768px) {
  .menu-bar {
    flex-direction: column;
    padding: 10px 0;
  }
  .menu-toggle {
    display: block;
    margin: 10px auto;
  }
  .menu-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }
  .menu-links.show {
    display: flex;
  }
  .menu-links a {
    width: 100%;
    padding: 15px 0;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #f1f5f9;
  }
}

/* ==== FOOTER ==== */
footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  width: 100%;
  margin-top: auto;
}

/* =============================
   FORM CONTAINER
============================= */
.container {
  width: 95%;
  max-width: 1200px;
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  border: 1px solid rgba(0,0,0,0.02);
}

/* Input groups inside #aa */
#aa {
  background-color: #f8fafc;
  border-radius: 12px;
  padding: 25px 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid #e2e8f0;
  margin-bottom: 40px;
}

#aa label {
  font-weight: 600;
  color: #1e293b;
  font-size: 15px;
  text-align: left;
}

#aa select {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  outline: none;
  transition: all 0.3s ease;
  min-width: 160px;
}

#aa select:hover,
#aa select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
  #aa {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }
  #aa label,
  #aa select {
    width: 100%;
    text-align: left;
  }
}

/* =============================
   LABELS & INPUTS
============================= */
input[type="number"],
input[type="text"] {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.3s ease;
  width: 120px;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* =============================
   BUTTONS
============================= */
button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

button:hover,
button:focus {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  outline: none;
}

button:active {
  transform: translateY(0);
}

/* =============================
   TABLE STYLING
============================= */
table {
  width: 100%;
  margin: 0 auto 40px auto;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
  color: #334155;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

th, td {
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
}

th:last-child, td:last-child {
  border-right: none;
}

th {
  background-color: #f8fafc;
  color: #1e293b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

tbody tr:nth-child(even) {
  background-color: #fbfcfd;
}

tbody tr:hover {
  background-color: #f1f5f9;
}

.school-name-row th {
  background: linear-gradient(135deg, #0b1a2d, #1a365d);
  color: white;
  font-size: 1.5em;
  padding: 20px;
  letter-spacing: 1px;
}

/* =============================
   INFO DIV
============================= */
#info-div {
  max-width: 600px;
  width: 90%;
  margin: 20px auto 40px auto;
  padding: 25px 30px;
  border-radius: 12px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  color: #1e293b;
  font-weight: 500;
  visibility: hidden;
}

/* =============================
   POPUP MESSAGES
============================= */
#popup-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 16px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#popup-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.popup-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.popup-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
