:root {
  --student-primary: #2563eb;
  --student-primary-dark: #1d4ed8;
  --student-primary-light: #60a5fa;
  --student-accent: #0ea5e9;
  --student-success: #059669;
  --student-warning: #f59e0b;
  --student-danger: #ef4444;
  --student-surface: #ffffff;
  --student-surface-muted: #f8fafc;
  --student-border: rgba(37, 99, 235, 0.12);
  --student-border-strong: rgba(15, 23, 42, 0.08);
  --student-shadow-strong: 0 24px 60px -30px rgba(37, 99, 235, 0.5);
  --student-shadow-medium: 0 18px 40px -25px rgba(37, 99, 235, 0.35);
  --student-shadow-soft: 0 10px 30px -25px rgba(15, 23, 42, 0.45);
  --student-radius-lg: 18px;
  --student-radius-md: 12px;
  --student-radius-sm: 8px;
  --student-text-strong: #0f172a;
  --student-text-muted: #475569;
  --student-bg: #eff4ff;
  --student-divider: rgba(148, 163, 184, 0.25);
  --student-badge-bg: rgba(37, 99, 235, 0.12);
}

body.student-theme {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(120% 90% at 16% -10%, rgba(124, 58, 237, 0.28) 0%, rgba(99, 102, 241, 0) 65%),
    radial-gradient(140% 95% at 88% 0%, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0) 70%),
    linear-gradient(180deg, #f3f1ff 0%, #f8f5ff 45%, #f9f7ff 100%);
  color: var(--student-text-strong);
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.student-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--student-surface);
  border-radius: var(--student-radius-lg);
  border: 1px solid var(--student-border);
  box-shadow: var(--student-shadow-strong);
  padding: 24px 28px;
  backdrop-filter: blur(6px);
}

.card + .card {
  margin-top: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.card-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--student-text-strong);
}

.subtle-text {
  color: var(--student-text-muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(14, 165, 233, 0.95) 90%);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px -12px rgba(37, 99, 235, 0.65);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px -18px rgba(37, 99, 235, 0.75);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px -18px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.95) 0%, rgba(59, 130, 246, 0.92) 100%);
  box-shadow: 0 12px 30px -12px rgba(15, 118, 110, 0.55);
}

.btn-muted {
  background: rgba(100, 116, 139, 0.24);
  color: var(--student-text-strong);
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(249, 115, 22, 0.95) 90%);
  box-shadow: 0 12px 30px -12px rgba(239, 68, 68, 0.6);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--student-badge-bg);
  color: var(--student-primary-dark);
  font-size: 12px;
  font-weight: 600;
}

.banner {
  border-radius: var(--student-radius-md);
  padding: 16px 18px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85) 0%, rgba(254, 252, 232, 0.95) 100%);
  color: #92400e;
  box-shadow: 0 12px 32px -24px rgba(217, 119, 6, 0.55);
}

.table-card {
  margin-top: 18px;
  overflow: hidden;
  border-radius: var(--student-radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--student-shadow-soft);
}

table.student-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

table.student-table thead th {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(14, 165, 233, 0.12) 100%);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--student-text-strong);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

table.student-table tbody td {
  padding: 13px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--student-text-muted);
  background: rgba(255, 255, 255, 0.92);
}

table.student-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.045);
  color: var(--student-text-strong);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: var(--student-primary-dark);
  font-size: 12px;
}

.muted {
  color: var(--student-text-muted);
}

form.inline-form {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--student-radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-size: 14px;
  color: var(--student-text-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--student-text-strong);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two-column {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--student-primary-dark);
  font-weight: 600;
  font-size: 13px;
}

.shadow-soft {
  box-shadow: var(--student-shadow-medium);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--student-text-muted);
  font-size: 12px;
}

.divider {
  height: 1px;
  background: var(--student-divider);
  margin: 24px 0;
}

.link-muted {
  text-decoration: none;
  color: rgba(37, 99, 235, 0.85);
}

.link-muted:hover {
  text-decoration: underline;
  color: rgba(37, 99, 235, 1);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pill.success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.status-pill.warning {
  background: rgba(234, 179, 8, 0.16);
  color: #b45309;
}

.status-pill.danger {
  background: rgba(248, 113, 113, 0.2);
  color: #b91c1c;
}

.empty-state {
  border-radius: var(--student-radius-md);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  padding: 18px;
  text-align: center;
  color: var(--student-text-muted);
  font-size: 14px;
}

.grid.stack-on-small {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (max-width: 720px) {
  body.student-theme {
    padding: 24px 12px 32px;
  }

  .card {
    padding: 20px 18px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
