
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #17211b;
  --muted: #657169;
  --canvas: #f3f4ef;
  --card: rgba(255, 255, 252, 0.94);
  --accent: #176b4d;
  --accent-hover: #11553c;
  --danger: #a13b35;
  --line: rgba(23, 33, 27, 0.11);
  --shadow: 0 1px 2px rgba(20, 30, 24, 0.06), 0 18px 48px rgba(20, 30, 24, 0.08);
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(44, 138, 99, 0.13), transparent 34rem),
    radial-gradient(circle at 92% 86%, rgba(218, 174, 92, 0.13), transparent 32rem),
    var(--canvas);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 56px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  color: white; background: var(--accent); font-weight: 800; letter-spacing: -0.04em;
  box-shadow: 0 8px 22px rgba(23, 107, 77, 0.24);
}
.brand-copy strong { display: block; font-size: 15px; }
.brand-copy span { color: var(--muted); font-size: 13px; }
.student-page { background: var(--canvas); }
.student-shell { width: min(920px, calc(100% - 32px)); }
.student-shell > .brand { width: min(100%, 440px); margin: 0 auto; }
.student-shell .brand-mark { border-radius: 10px; box-shadow: none; }
.card.access-card {
  width: min(100%, 440px); margin: 56px auto 0; border-radius: 16px; padding: 28px;
  background: #fff; outline: 1px solid var(--line); box-shadow: 0 8px 24px rgba(20, 30, 24, 0.06);
  backdrop-filter: none;
}
.access-card h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; }
.access-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }
.access-card input { border-radius: 8px; background: #f4f5f2; }
.access-card .actions, .access-card .button { width: 100%; }
.access-card .button { justify-content: center; border-radius: 8px; box-shadow: none; }
.card {
  border-radius: 24px; background: var(--card); padding: 24px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.card h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -0.025em; text-wrap: balance; }
.card > p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
label { font-size: 13px; font-weight: 750; }
input {
  width: 100%; min-height: 46px; border: 0; border-radius: 12px; padding: 0 14px;
  color: var(--ink); background: #f1f3ee; outline: 1px solid transparent;
  transition-property: background-color, box-shadow, outline-color; transition-duration: 160ms;
}
input:focus { background: #fff; outline-color: rgba(23, 107, 77, 0.42); box-shadow: 0 0 0 4px rgba(23, 107, 77, 0.09); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button {
  min-height: 44px; border: 0; border-radius: 12px; padding: 0 17px; color: #fff; background: var(--accent);
  font-weight: 760; box-shadow: 0 8px 18px rgba(23, 107, 77, 0.17);
  transition-property: background-color, box-shadow, transform; transition-duration: 160ms;
}
.button:hover { background: var(--accent-hover); box-shadow: 0 10px 24px rgba(23, 107, 77, 0.22); }
.button:active { transform: scale(0.96); }
.button.secondary { color: var(--ink); background: #e8ebe5; box-shadow: none; }
.button.secondary:hover { background: #dfe4dc; }
.button.danger { background: var(--danger); box-shadow: none; }
.button.small { min-height: 40px; padding-inline: 13px; font-size: 13px; }
.button:disabled { cursor: not-allowed; opacity: 0.54; box-shadow: none; }
.notice { display: none; border-radius: 12px; padding: 12px 14px; background: #edf6f1; color: #16523c; font-size: 14px; line-height: 1.45; }
.notice.visible { display: block; }
.notice.error { background: #fbefed; color: #8b342e; }
.hidden { display: none !important; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toolbar h2 { margin: 0; }
.identity { color: var(--muted); font-size: 13px; line-height: 1.45; text-align: right; white-space: pre-line; }
.inbox { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr); gap: 16px; }
.message-list { display: grid; gap: 8px; max-height: 580px; overflow: auto; padding: 2px; }
.message-button {
  width: 100%; min-height: 68px; border: 0; border-radius: 13px; padding: 12px 14px; text-align: left;
  color: var(--ink); background: #f1f3ee; outline: 1px solid transparent;
  transition-property: background-color, outline-color, transform; transition-duration: 150ms;
}
.message-button:hover, .message-button.active { background: #fff; outline-color: rgba(23, 107, 77, 0.24); }
.message-button:active { transform: scale(0.96); }
.message-button strong, .message-button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-button span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.message-detail { min-height: 260px; border-radius: 16px; background: #f7f8f4; padding: 20px; }
.message-detail h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.message-meta { color: var(--muted); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.message-body { margin: 22px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; line-height: 1.65; }
.grid-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-form .actions, .grid-form .notice { grid-column: 1 / -1; }
.credentials { margin-top: 18px; border-radius: 16px; padding: 18px; background: #edf6f1; }
.credentials dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.credentials dt { color: var(--muted); font-size: 13px; }
.credentials dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.warning { margin-top: 14px; color: #6e5421; font-size: 13px; line-height: 1.5; }
.table-wrap { margin-top: 22px; overflow: auto; border-radius: 16px; outline: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.52); }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.status { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 9px; background: #e9eee9; font-size: 11px; font-weight: 750; }
.status.pending { color: #71551e; background: #f8edcf; }
.empty { color: var(--muted); padding: 30px 8px; text-align: center; }
.admin-layout { display: grid; gap: 24px; }
.credentials-actions { margin-top: 14px; }
@media (max-width: 820px) {
  .inbox { grid-template-columns: 1fr; }
  .grid-form { grid-template-columns: 1fr; }
  .shell { width: min(100% - 24px, 680px); padding-top: 20px; }
  .card { border-radius: 20px; padding: 20px; }
  .access-card { margin-top: 36px; border-radius: 14px; padding: 24px; }
  .student-shell > .brand { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
