:root {
  --bg: #f6f8fb;
  --ink: #111827;
  --sub: #667085;
  --muted: #98a2b3;
  --card: #ffffff;
  --line: #e4e7ec;
  --line2: #cfd5df;
  --brand: #2563eb;
  --brand2: #0f172a;
  --green: #0f9f6e;
  --amber: #e67700;
  --red: #e03131;
  --violet: #6d5bd0;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell {
  width: min(100% - 28px, 720px);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 251, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
}

.brand-title {
  font-size: 17px;
  font-weight: 900;
}

.brand-sub {
  margin-top: 1px;
  color: var(--sub);
  font-size: 12px;
}

main.shell { padding: 18px 0 48px; }

.hero {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-copy {
  margin: 9px 0 0;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.55;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 11px 12px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.dot.loading { background: var(--amber); }
.dot.error { background: var(--red); }

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

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.panel-head {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.panel-body { padding: 16px; }

.field { margin-bottom: 14px; }

label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  font-size: 15px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, .75);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.time-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.student-preview {
  display: none;
  border: 1px solid #bfd3ff;
  border-radius: var(--radius);
  background: #eef4ff;
  padding: 13px;
  margin-bottom: 14px;
}

.student-preview.show { display: block; }

.suggestions {
  display: none;
  margin-top: -6px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.suggestions.show {
  display: grid;
}

.suggestion-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.suggestion-item span {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}

.suggestion-empty {
  padding: 13px;
  color: var(--sub);
  font-size: 13px;
  text-align: center;
}

.student-name {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 2px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.blue { color: #1d4ed8; background: #e7f0ff; border-color: #c8dcff; }
.pill.green { color: #087f5b; background: #e6fcf5; border-color: #c3fae8; }
.pill.amber { color: #b45309; background: #fff4e6; border-color: #ffd8a8; }
.pill.red { color: #c92a2a; background: #fff0ed; border-color: #ffc9c9; }
.pill.violet { color: #5f3dc4; background: #f3f0ff; border-color: #d0bfff; }

.quick-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.type-card {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: left;
  color: var(--ink);
}

.type-card i {
  color: var(--brand);
  font-size: 17px;
}

.type-card strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
}

.type-card.active {
  border-color: var(--brand);
  background: #eff5ff;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-weight: 900;
}

.btn.primary { background: var(--brand2); color: #fff; }
.btn.light { border-color: var(--line2); background: #fff; }
.btn.cancel {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}
.submit-row .btn:first-child { flex: 1 1 180px; }

.list {
  display: grid;
  gap: 10px;
}

.request-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 13px;
}

.request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.request-title {
  font-weight: 900;
  line-height: 1.35;
}

.request-meta {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.55;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.request-actions .btn {
  width: 100%;
}

.empty {
  border: 1px dashed var(--line2);
  border-radius: var(--radius);
  background: #fff;
  padding: 30px 14px;
  text-align: center;
  color: var(--sub);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 18px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 18px 50px rgba(17, 24, 39, .22);
  transition: .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .shell { width: min(100% - 48px, 1040px); }
  main.shell { padding-top: 28px; }
  .hero {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: end;
    margin-bottom: 18px;
  }
  h1 { font-size: 42px; }
  .grid { grid-template-columns: minmax(520px, 600px) minmax(320px, 1fr); }
  .cols-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .time-grid { grid-template-columns: repeat(4, 1fr); }
}
