:root {
  --background: #f4f6f8;
  --foreground: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --teal: #0f766e;
  --blue: #2563eb;
  --red: #dc2626;
  --orange: #ea580c;
  --yellow: #b7791f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

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

.page-shell {
  min-height: 100vh;
  padding: 28px;
}

.app-frame {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.brand-mark {
  display: block;
  width: 72px;
  height: 44px;
  flex: 0 0 72px;
  object-fit: contain;
}

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

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
}

.surface,
.card,
.metric-tile,
.modal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.surface {
  box-shadow: 0 16px 44px rgba(22, 34, 51, 0.08);
}

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

.stack-sm {
  display: grid;
  gap: 10px;
}

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

.group-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.grid-2,
.grid-3,
.grid-4,
.form-grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid {
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label,
.label {
  font-size: 14px;
  font-weight: 700;
}

.required {
  color: var(--red);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 4px;
  background: white;
  color: var(--foreground);
  padding: 10px 12px;
  outline: none;
}

.input,
.select {
  min-height: 38px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(15, 118, 110, 0.7);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--teal);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn-light {
  border-color: #cfe1dc;
  background: #e8f7f2;
  color: var(--teal);
}

.btn-gray {
  border-color: #d5dbe5;
  background: #f2f4f7;
  color: #344054;
}

.btn-red {
  border-color: #fecaca;
  background: #fee2e2;
  color: var(--red);
}

.btn-full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #f2f4f7;
  color: #344054;
  cursor: pointer;
}

.theme-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: #dff5ee;
  color: var(--teal);
  font-weight: 800;
}

.alert {
  border-radius: 4px;
  padding: 12px 14px;
}

.alert-teal {
  background: #c7f4e9;
  color: #064e3b;
}

.alert-red {
  background: #fee2e2;
  color: #991b1b;
}

.alert-yellow {
  background: #fef3c7;
  color: #92400e;
}

.alert-blue {
  background: #dbeafe;
  color: #1e40af;
}

.alert-gray {
  background: #f2f4f7;
  color: #475467;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 5px 12px;
  text-transform: uppercase;
}

.badge-teal {
  background: #c7f4e9;
  color: #075e54;
}

.badge-blue {
  background: #dbeafe;
  color: #075eb5;
}

.badge-yellow {
  background: #fef3c7;
  color: #92400e;
}

.badge-orange {
  background: #ffedd5;
  color: #9a3412;
}

.badge-gray {
  background: #eef2f6;
  color: #475467;
}

.student-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 300px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.student-layout.is-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.student-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: white;
  padding: 24px;
}

.student-layout.is-collapsed .student-sidebar {
  align-items: center;
  padding: 14px;
}

.student-sidebar-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-layout.is-collapsed .student-sidebar-header {
  flex-direction: column;
}

.student-layout.is-collapsed .brand-text,
.student-layout.is-collapsed .student-menu-copy,
.student-layout.is-collapsed .student-sidebar-summary {
  display: none;
}

.student-menu {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.student-menu-button {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  padding: 10px;
  text-align: left;
  text-decoration: none;
}

.student-menu-button:hover,
.student-menu-button.is-active {
  background: #eef8f5;
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.16);
}

.student-menu-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 8px;
  background: #f2f4f7;
}

.student-menu-copy {
  display: grid;
  gap: 2px;
}

.student-menu-label {
  font-size: 14px;
  font-weight: 800;
}

.student-menu-description {
  color: var(--muted);
  font-size: 12px;
}

.student-layout.is-collapsed .student-menu-button {
  width: 48px;
  justify-content: center;
  padding: 6px;
}

.student-sidebar-summary {
  margin-top: auto;
  border: 1px solid #c7d7d2;
  border-radius: 8px;
  background: #f6fbf9;
  padding: 14px;
}

.student-content {
  min-width: 0;
  padding: 26px 32px 40px;
}

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

.student-content-surface {
  min-height: calc(100vh - 160px);
  padding: 24px;
}

.session-card {
  height: 100%;
  cursor: pointer;
  padding: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.session-card:hover {
  border-color: rgba(15, 118, 110, 0.5);
  transform: translateY(-1px);
}

.session-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.session-card:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.radio-dot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
}

.radio-dot::after {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.session-card.is-selected .radio-dot::after {
  background: var(--teal);
}

.session-card:has(input:checked) .radio-dot::after {
  background: var(--teal);
}

.price-panel {
  border: 1px solid #c7d7d2;
  border-radius: 8px;
  background: #f3fbf8;
  padding: 16px;
}

.payment-panel {
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.parcel-id-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.parcel-id-scroll {
  max-height: 312px;
  overflow-y: auto;
  padding-right: 8px;
}

.upload-panel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px dashed #a9bacb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.upload-panel:hover,
.upload-panel-filled {
  border-color: rgba(15, 118, 110, 0.55);
  background: #f3fbf8;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #dff5ee;
  color: var(--teal);
  font-weight: 800;
}

.upload-note {
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.upload-file-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.upload-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: white;
  color: var(--teal);
  padding: 6px 8px;
}

.qr-image,
.qr-modal-image {
  display: block;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.qr-image {
  width: 160px;
}

.qr-image-button {
  display: block;
  width: fit-content;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.qr-image-button:hover .qr-image,
.qr-image-button:focus-visible .qr-image {
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.qr-modal-image {
  width: min(100%, 520px);
  margin: 0 auto;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 18px;
}

.modal-backdrop.is-open,
.modal-backdrop:target {
  display: flex;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.admin-shell {
  min-height: 100vh;
}

.admin-header {
  border-bottom: 1px solid var(--line);
  background: white;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px;
}

.admin-nav .btn.is-active {
  background: var(--teal);
  color: white;
}

.metric-tile {
  padding: 16px;
}

.metric-number {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.login-card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding-top: 80px;
}

.p-xl {
  padding: 24px;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px;
  }

  .student-layout,
  .student-layout.is-collapsed {
    grid-template-columns: 1fr;
  }

  .student-sidebar {
    position: relative;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .student-layout.is-collapsed .student-sidebar {
    align-items: stretch;
  }

  .student-layout.is-collapsed .student-sidebar-header {
    flex-direction: row;
  }

  .student-layout.is-collapsed .student-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .student-layout.is-collapsed .student-menu-button {
    width: 100%;
  }

  .student-content {
    padding: 16px;
  }

  .student-content-header,
  .admin-header-inner,
  .group-between {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-panel {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .upload-panel .btn {
    grid-column: 1 / -1;
    justify-self: flex-end;
  }
}
