:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172b4d;
  background: #f3f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(198, 226, 255, .52), transparent 34rem),
    #f3f6fa;
}

button { font: inherit; }

.shell { width: min(100% - 40px, 720px); margin: 0 auto; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3eaf2;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #102a43;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.5px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: #1677ff;
  font-size: 18px;
}

.brand-dot { color: #1677ff; }

.environment {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #dfe7ef;
  border-radius: 99px;
  color: #52657b;
  background: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 650;
}

.environment-dot, .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aaabc;
}

.welcome { padding: 39px 0 25px; }

.eyebrow {
  margin: 0 0 9px;
  color: #74869a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.1px;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  color: #102a43;
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: -1.2px;
}

.muted { margin-bottom: 0; color: #657990; font-size: 14px; }

.class-card, .privacy-card {
  border: 1px solid #e4ebf3;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(27, 55, 87, .055);
}

.class-card { padding: 25px; }

.class-heading, .tracking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.class-heading h2 {
  margin: 0;
  color: #102a43;
  font-size: 20px;
  letter-spacing: -.4px;
}

.class-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #1677ff;
  background: #edf5ff;
  font-size: 22px;
}

.class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 23px;
  margin-top: 17px;
  color: #657990;
  font-size: 13px;
}

.class-meta span { display: inline-flex; gap: 7px; align-items: center; }
.divider { height: 1px; margin: 21px 0; background: #edf1f5; }

.status-copy { display: flex; gap: 11px; align-items: flex-start; }
.status-indicator { flex: 0 0 auto; margin-top: 5px; }
.status-copy strong { color: #263d55; font-size: 14px; }
.status-copy p { margin: 4px 0 0; color: #78899b; font-size: 12px; line-height: 1.5; }

.live-label {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 6px;
  color: #728196;
  background: #f1f4f7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .7px;
}

.tracking-row.is-active .status-indicator,
.tracking-row.is-active .live-label { background: #dff7e9; color: #17834a; }
.tracking-row.is-active .status-indicator { background: #23ad65; box-shadow: 0 0 0 4px #e1f7e9; }

.result {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #dce8f4;
  border-radius: 10px;
  color: #31516e;
  background: #f6faff;
  font-size: 13px;
  line-height: 1.5;
}

.result[data-kind="success"] { border-color: #ccebd8; color: #16683d; background: #f1fbf5; }
.result[data-kind="warning"] { border-color: #f1dfb8; color: #805c12; background: #fffaf0; }
.result[data-kind="error"] { border-color: #f0d1d1; color: #923c3c; background: #fff7f7; }

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 21px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #1677ff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, transform .15s;
}

.primary-button:hover:not(:disabled) { background: #0867eb; }
.primary-button:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .7; }
.primary-button.is-stop { color: #a33b3b; background: #fff1f1; }
.primary-button.is-stop:hover { background: #ffe5e5; }
.fine-print { margin: 11px 0 0; color: #8594a5; font-size: 11px; line-height: 1.55; text-align: center; }

.privacy-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-top: 15px;
  padding: 18px;
  box-shadow: none;
}

.privacy-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1677ff;
  background: #edf5ff;
  font-size: 13px;
  font-weight: 750;
}

.privacy-card h2 { margin: 1px 0 5px; color: #304860; font-size: 13px; }
.privacy-card p { margin: 0; color: #718399; font-size: 12px; line-height: 1.6; }

footer {
  padding: 26px 0 35px;
  color: #8695a6;
  font-size: 11px;
  text-align: center;
}

footer span { padding: 0 4px; }

@media (max-width: 520px) {
  .shell { width: min(100% - 28px, 720px); }
  .topbar { height: 68px; }
  .welcome { padding-top: 30px; }
  .class-card { padding: 20px 17px; }
  .class-meta { gap: 10px 15px; }
}

[hidden] { display: none !important; }

.class-card { margin-bottom: 15px; }
.class-card > h2, .section-heading h2 { margin: 0 0 8px; color: #102a43; font-size: 19px; }
.workspace-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.workspace-heading { margin: 20px 0 14px; }
.workspace-heading h2 { margin: 0; color: #102a43; font-size: 21px; }
.workspace-heading .eyebrow { margin-bottom: 5px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 4px; }
.section-heading .muted { margin: 0; }
.secondary-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  color: #31516e;
  background: #fff;
  cursor: pointer;
  font-weight: 650;
}
.form-grid { display: grid; gap: 14px; margin-top: 17px; }
.compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label { display: grid; gap: 7px; color: #425b74; font-size: 12px; font-weight: 650; }
.form-grid input, .form-grid select {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #dce5ef;
  border-radius: 8px;
  color: #172b4d;
  background: #fff;
  font: inherit;
}
.form-grid select[multiple] { min-height: 105px; }
.form-grid input:focus, .form-grid select:focus { outline: 2px solid #a9d0ff; border-color: #1677ff; }
.form-grid .primary-button { grid-column: 1 / -1; margin-top: 0; }
.tracking-row { min-height: 54px; margin: 18px 0 8px; }
.status-indicator.is-inside { background: #23ad65; box-shadow: 0 0 0 4px #e1f7e9; }
.log-list { display: grid; gap: 8px; margin-top: 12px; }
.log-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #425b74; background: #f6f9fc; font-size: 12px; }
.log-row strong { color: #263d55; font-weight: 650; }
.log-row span { flex: 0 0 auto; color: #718399; }
.class-card h3 { margin: 22px 0 0; color: #304860; font-size: 14px; }
.table-wrap { overflow-x: auto; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th, td { padding: 11px 9px; border-bottom: 1px solid #edf1f5; white-space: nowrap; }
th { color: #74869a; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
td { color: #425b74; }

@media (max-width: 520px) {
  .compact-grid { grid-template-columns: 1fr; }
  .log-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .workspace-heading { align-items: flex-start; }
}

.qr-image{width:240px;max-width:100%;background:#fff;padding:8px;border-radius:8px;display:block;margin:12px 0}
.consent-box{border:1px solid #d9a441;background:#fff8e6;border-radius:8px;padding:12px;margin:12px 0}
.small-button{padding:4px 10px;font-size:.85rem}
.heading-actions{display:flex;gap:8px;flex-wrap:wrap}
select[multiple]{min-height:96px}

.wide-button { width: 100%; }
