:root {
  color: #1e293b;
  background: #f6f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #101828;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.brand-icon,
.success-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1fb59a;
  color: #fff;
  flex: 0 0 auto;
}

.brand-block h1,
.brand-block p,
.workspace-header h2,
.checkin-header h1 {
  margin: 0;
}

.brand-block h1 {
  font-size: 20px;
}

.brand-block p {
  margin-top: 4px;
  color: #b6c1d4;
  font-size: 13px;
}

.primary-action,
.secondary-action,
.submit-button,
.ghost-action,
.danger-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.primary-action,
.submit-button {
  background: #1fb59a;
  color: #fff;
}

.secondary-action {
  background: #e6f6f3;
  color: #107866;
}

.ghost-action {
  background: #1d2939;
  color: #d9e2f1;
  border: 1px solid #344054;
}

.danger-button {
  background: #fff1f2;
  color: #be123c;
  padding: 0 14px;
}

.danger-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.icon-button {
  width: 42px;
  background: #e8eef8;
  color: #1e293b;
}

.training-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.training-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d9e2f1;
  padding: 12px;
  text-align: left;
}

.training-item span,
.training-item small {
  display: block;
  overflow-wrap: anywhere;
}

.training-item small {
  margin-top: 4px;
  color: #95a3b8;
}

.training-item.active {
  border-color: #2dd4bf;
  background: #1d2939;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(31, 181, 154, .13), rgba(31, 181, 154, 0) 260px),
    #f6f7fb;
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .08);
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel h1 {
  font-size: 30px;
}

.login-panel p:not(.eyebrow):not(.form-error) {
  margin-top: 8px;
  color: #667085;
}

.notice-bar {
  margin-bottom: 16px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  color: #93370d;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.form-error {
  margin: -4px 0 0;
  color: #be123c;
  font-size: 14px;
  font-weight: 700;
}

.workspace {
  padding: 28px;
}

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

.workspace-header h2 {
  font-size: clamp(24px, 3vw, 34px);
  overflow-wrap: anywhere;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #107866;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #d8e0ea;
  border-radius: 8px;
  margin-bottom: 22px;
}

.overview-band > div {
  background: #fff;
  padding: 18px;
}

.metric {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: #667085;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .05);
}

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

.panel-heading h3,
.identity-section h2 {
  margin: 0;
  font-size: 18px;
}

.hint {
  color: #667085;
  font-size: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd6e3;
  border-radius: 8px;
  color: #1e293b;
  background: #fff;
  padding: 11px 12px;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: #1fb59a;
  box-shadow: 0 0 0 3px rgba(31, 181, 154, .15);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.qr-panel {
  display: flex;
  flex-direction: column;
}

.qr-wrap {
  align-self: center;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.url-field {
  margin: 14px 0 10px;
  font-size: 13px;
}

.questions-panel {
  margin-bottom: 18px;
}

.question-panel-heading {
  align-items: flex-start;
}

.question-panel-heading > div:first-child {
  display: grid;
  gap: 5px;
}

.question-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.question-actions .primary-action,
.question-actions .secondary-action {
  padding: 0 14px;
}

.question-error {
  margin: -4px 0 12px;
}

.question-editor {
  border-top: 1px solid #edf0f5;
  padding-top: 16px;
  margin-top: 16px;
}

.question-editor.locked input:disabled {
  color: #667085;
  background: #f8fafc;
  cursor: not-allowed;
}

.question-editor.locked input[type="radio"]:disabled {
  cursor: not-allowed;
}

.question-editor.editing {
  border-top-color: #d0f2ea;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.option-editor {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.records-heading {
  align-items: flex-start;
}

.records-heading p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}

.filter-control {
  min-width: 190px;
}

.submission-table {
  display: grid;
  gap: 1px;
  background: #edf0f5;
  overflow: hidden;
  border-radius: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(100px, .8fr) 72px minmax(260px, 2fr) minmax(180px, 1.2fr);
  gap: 12px;
  background: #fff;
  padding: 12px;
  align-items: start;
}

.table-row span {
  overflow-wrap: anywhere;
}

.table-head {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.answer-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.answer-pill {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.answer-pill strong {
  color: #344054;
}

.answer-pill span {
  font-weight: 800;
}

.answer-pill small {
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-pill.correct {
  background: #ecfdf3;
  border-color: #abefc6;
}

.answer-pill.correct span {
  color: #067647;
}

.answer-pill.wrong {
  background: #fff1f3;
  border-color: #fecdd6;
}

.answer-pill.wrong span {
  color: #be123c;
}

.empty-state {
  margin: 0;
  background: #fff;
  padding: 18px;
  color: #667085;
}

.checkin-shell {
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(31, 181, 154, .14), rgba(31, 181, 154, 0) 260px),
    #f6f7fb;
}

.checkin-form,
.success-screen {
  max-width: 820px;
  margin: 0 auto;
}

.checkin-header {
  padding: 18px 0 22px;
}

.checkin-header h1 {
  font-size: clamp(28px, 6vw, 44px);
  overflow-wrap: anywhere;
}

.checkin-header p:last-child {
  color: #667085;
}

.quiz-section {
  display: grid;
  gap: 14px;
}

.quiz-card {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  margin: 0;
  padding: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.quiz-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  color: #182230;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 800;
}

.quiz-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e6f6f3;
  color: #107866;
  font-size: 15px;
  line-height: 1;
  flex: 0 0 auto;
}

.quiz-title span:last-child {
  overflow-wrap: anywhere;
}

.quiz-option {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 11px;
  margin-top: 8px;
  font-weight: 600;
}

.quiz-option span {
  overflow-wrap: anywhere;
}

.identity-section {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e7ec;
}

.submit-button {
  width: 100%;
  min-height: 52px;
}

.submit-button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

.success-screen {
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 20vh;
}

.success-screen h1 {
  margin: 20px 0 8px;
  font-size: clamp(30px, 6vw, 46px);
}

.success-screen p {
  color: #667085;
  margin-bottom: 24px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .content-grid,
  .overview-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace,
  .checkin-shell,
  .sidebar {
    padding: 18px;
  }

  .workspace-header,
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .two-column,
  .option-grid,
  .table-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }
}
