.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 24px auto;
  max-width: 1100px;
  padding: 0 10px;
  gap: 16px;
  min-height: 56px;
}
.header-row h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
}
.header-row .back {
  align-self: center;
  height: auto;
  display: flex;
  align-items: center;
  font-size: 1rem;
  padding: 6px 18px;
  min-width: 0;
  min-height: 0;
}
/* Full-width button for stacked form actions */
.full-btn {
  width: 100%;
  margin: 0 0 0 0;
  display: block;
  box-sizing: border-box;
}

/* --- Modern Website Theme --- */
body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(120deg, #e0eafc 0%, #cfdef3 100%);
  color: #222;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

h1, h2, h3 {
  align-self: center;
  height: auto;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  padding: 0.4em 1.5em;
  line-height: 1.2;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 24px auto;
  max-width: 1100px;
  padding: 0 10px;
  gap: 16px;
  min-height: 56px;
}
.header-row h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
}
.header-row .back {
  align-self: center;
  height: 42px;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

/* Card/Box Styles */
.login-box, .box {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 36px 32px 28px 32px;
  border-radius: 14px;
  box-shadow: 0 6px 32px rgba(44,62,80,0.10), 0 1.5px 4px rgba(44,62,80,0.08);
  animation: fadeIn 0.7s;
}
.login-box h2, .box h2 {
  margin-bottom: 22px;
  color: #1976d2;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto 30px auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  border-radius: 12px;
  overflow: hidden;
  max-width: 1100px;
  font-size: 1rem;
}
th, td {
  padding: 16px 12px;
  border-bottom: 1px solid #e3e6f0;
  text-align: center;
}
th {
  background: #1976d2;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover {
  background: #f1f7ff;
  transition: background 0.2s;
}
td.uid, td.name, td.subject {
  font-weight: 600;
  color: #1976d2;
}
td.time {
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  color: #607d8b;
}

/* Form Inputs */
input[type="text"],
input[type="number"],
input[type="time"],
input[type="password"],
input[type="search"] {
  font-size: 1rem;
  padding: 10px 12px;
  border: 1.5px solid #b0bec5;
  border-radius: 6px;
  background: #f8fafc;
  width: 100%;
  margin-bottom: 14px;
  transition: border 0.3s;
  box-sizing: border-box;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="time"]:focus {
  outline: none;
  border-color: #1976d2;
  background: #e3f2fd;
}

/* Buttons */
button, .tab-btn, .absent-btn {
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  margin-bottom: 8px;
}
button:hover, .tab-btn:hover, .absent-btn:hover {
  background: linear-gradient(90deg, #1565c0 60%, #1976d2 100%);
  box-shadow: 0 4px 16px rgba(44,62,80,0.13);
  transform: translateY(-2px) scale(1.03);
}
.absent-btn {
  background: linear-gradient(90deg, #e53935 60%, #ff7043 100%);
}
.absent-btn:hover {
  background: linear-gradient(90deg, #b71c1c 60%, #e53935 100%);
}

/* Back Button */
a.back {
  display: inline-block;
  margin-bottom: 15px;
  text-decoration: none;
  background: linear-gradient(90deg, #90a4ae 60%, #b0bec5 100%);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
}
a.back:hover {
  background: linear-gradient(90deg, #607d8b 60%, #90a4ae 100%);
  box-shadow: 0 4px 16px rgba(44,62,80,0.13);
}

/* Dashboard Buttons */
.tab-btn {
  display: block;
  margin: 18px auto;
  width: 340px;
  text-align: center;
  background: linear-gradient(90deg, #43a047 60%, #66bb6a 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(44,62,80,0.07);
  transition: background 0.2s, box-shadow 0.2s, width 0.2s;
}
.tab-btn:hover {
  background: linear-gradient(90deg, #388e3c 60%, #43a047 100%);
}
.tab-btn.secondary {
  background: linear-gradient(90deg, #757575 60%, #bdbdbd 100%);
  color: #fff;
}
.tab-btn.secondary:hover {
  background: linear-gradient(90deg, #424242 60%, #757575 100%);
}
form .tab-btn {
  width: 100%;
  margin: 0 0 0 0;
}

/* Weekday Tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.nav-tabs a {
  padding: 10px 22px;
  border-radius: 22px;
  text-decoration: none;
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  font-size: 1rem;
}
.nav-tabs a.active, .nav-tabs a:hover {
  background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
  color: #fff;
}

/* Error Message */
.error-msg {
  color: #e53935;
  background: #ffebee;
  border: 1.5px solid #ffcdd2;
  border-radius: 6px;
  padding: 10px 0;
  margin-bottom: 14px;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.5s;
}

/* Hash Box */
.hash {
  word-break: break-all;
  background: #f0f4c3;
  padding: 12px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  color: #33691e;
  margin-top: 8px;
}

/* Responsive Table */
@media screen and (max-width: 900px) {
  .header-row, table {
    max-width: 98vw;
  }
  .tab-btn {
    width: 95vw;
    min-width: 0;
  }
}
@media screen and (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  tr {
    margin-bottom: 1.2rem;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    padding: 10px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  }
  td {
    text-align: right;
    padding-left: 52%;
    position: relative;
    border-bottom: none;
    min-height: 38px;
  }
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 18px;
    font-weight: 700;
    color: #1976d2;
    text-transform: capitalize;
    font-size: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }
  th {
    display: none;
  }
}
