/* styles.css
   Simple responsive layout, neat cards and table.
*/

/* Reset-ish */
* { box-sizing: border-box; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  background: linear-gradient(180deg, #f7fbff, #ffffff 60%);
  color: #122;
  min-height: 100vh;

/* Top bar */
.topbar {
  padding: 1rem;
  background: linear-gradient(90deg, #2b6cb0, #4fd1c5);
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.topbar h1 { margin: 0; font-size: 1.4rem; }
.topbar .subtitle { margin: 0.25rem 0 0; font-size: 0.95rem; opacity: 0.95; }

/* Logo styling */
.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  margin-bottom: 0.2rem;
}

/* Container */
.container {
  max-width: 980px;
  margin: 1rem auto;
  padding: 0 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

/* Card */
.card {
  background: white;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(17,24,39,0.08);
  border: 1px solid #e2e8f0;
}

/* Table improvements */
#studentsTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(17,24,39,0.04);
}
#studentsTable th, #studentsTable td {
  padding: 0.6rem 0.5rem;
  text-align: left;
}
#studentsTable th {
  background: #e2e8f0;
  font-weight: 600;
}
#studentsTable tr:nth-child(even) td {
  background: #f1f5f9;
}
#studentsTable tr:hover td {
  background: #e0f2fe;
}

/* Button improvements */
button {
  background: linear-gradient(90deg, #2b6cb0, #4fd1c5);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  margin: 0.2rem 0.2rem 0.2rem 0;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(17,24,39,0.07);
}
button:hover {
  background: linear-gradient(90deg, #319795, #2b6cb0);
  box-shadow: 0 4px 12px rgba(17,24,39,0.10);
}
}

/* Controls */
.controls .row {
  display:flex;
  gap:0.6rem;
  align-items:center;
  flex-wrap:wrap;
}
.controls label { font-size:0.95rem; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0.55rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}
th { font-size: 0.9rem; color:#334155; }
tr:hover td { background: rgba(45, 55, 72, 0.02); }

/* Buttons */
button {
  background: linear-gradient(180deg,#1e40af,#2563eb);
  color: white;
  border: none;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button.secondary {
  background: transparent;
  color: #1f2937;
  border: 1px solid #e2e8f0;
}

/* Small text */
.muted { color: #475569; font-size:0.9rem; margin-top:0.6rem; }

/* Modal */
.modal { position: fixed; inset: 0; display:flex; align-items:center; justify-content:center; background: rgba(2,6,23,0.35); }
.modal.hidden { display:none; }
.modal-content { width: 360px; max-width: 90%; padding: 1rem; }

/* Footer */
.footer { text-align:center; padding: 0.8rem; color: #334155; font-size: 0.85rem; }

/* Responsive: make table horizontally scrollable on small screens */
@media (max-width: 760px) {
  table { display:block; overflow:auto; white-space:nowrap; }
  .controls .row { flex-direction: column; align-items: stretch; }
}
