* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  background: #f0f4f8;
  color: #1a2332;
  line-height: 1.6;
  min-height: 100vh;
}

/* Login Card */
.card {
  max-width: 400px;
  margin: 60px auto;
  background: #fff;
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(20, 45, 78, 0.12);
}

.card h1 {
  font-size: 20px;
  color: #142d4e;
  text-align: center;
  margin-bottom: 8px;
}

.card .uni {
  font-size: 15px;
  color: #1a6b3c;
  text-align: center;
  margin-bottom: 5px;
  font-weight: bold;
}

.card .muted {
  text-align: center;
  color: #65748b;
  font-size: 13px;
  margin-bottom: 25px;
}

.card label {
  display: block;
  font-size: 13px;
  color: #334155;
  margin-bottom: 6px;
  font-weight: 600;
}

.card input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d0d7e2;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 18px;
  transition: border-color 0.2s;
  direction: ltr;
  text-align: left;
}

.card input:focus {
  outline: none;
  border-color: #142d4e;
}

.card button {
  width: 100%;
  padding: 13px;
  background: #142d4e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.card button:hover {
  background: #0f2240;
}

.alert {
  background: #fdecec;
  color: #a32525;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 18px;
  font-size: 13px;
}

/* Dashboard */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  background: #fff;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(23, 32, 51, 0.06);
}

header h1 {
  font-size: 18px;
  color: #142d4e;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-print {
  background: #1a6b3c;
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.btn-print:hover {
  background: #145530;
}

.logout {
  color: #a32525;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.clash-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.student-info {
  background: #fff;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(23, 32, 51, 0.06);
  text-align: center;
  border-right: 5px solid #1a6b3c;
}

.student-info h2 {
  margin: 0;
  color: #142d4e;
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.exam {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 3px 12px rgba(23, 32, 51, 0.06);
  position: relative;
  border-top: 4px solid #142d4e;
}

.exam.digital {
  border-top-color: #1a6b3c;
}

.when {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.when .date {
  color: #142d4e;
}

.when .time {
  color: #1a6b3c;
  background: #e8f5ee;
  padding: 2px 10px;
  border-radius: 6px;
}

.course h3 {
  font-size: 15px;
  color: #1a2332;
  margin-bottom: 4px;
}

.course .muted {
  font-size: 12px;
  color: #65748b;
}

.where {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.where > div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.where .label {
  color: #65748b;
}

.where .value {
  font-weight: 600;
  color: #1a2332;
}

.where .seat {
  color: #142d4e;
  background: #eef2f7;
  padding: 1px 8px;
  border-radius: 5px;
}

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  background: #eef2f7;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
}

.exam.digital .tag {
  background: #e8f5ee;
  color: #1a6b3c;
}

.warn {
  background-color: #fdecec;
  color: #a32525;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 12px;
}

.muted {
  color: #65748b;
}

/* Print styles */
@media print {
  body {
    background: #fff;
  }
  header .actions,
  .logout {
    display: none !important;
  }
  .exam {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .clash-warning {
    border: 1px solid #856404;
  }
}

@media (max-width: 500px) {
  .card {
    margin: 30px 16px;
    padding: 25px 20px;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
}
