.qbc-checkin-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.qbc-checkin-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1180px;
  max-height: calc(100vh - 20px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.34);
}

.qbc-checkin-panel-small {
  max-width: 520px;
}

.qbc-checkin-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(120deg, #052e2b 0%, #0f766e 56%, #0d9488 100%);
  color: #fff;
}

.qbc-checkin-heading {
  min-width: 0;
}

.qbc-checkin-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qbc-checkin-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #99f6e4;
}

.qbc-checkin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.qbc-checkin-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.16);
  color: #f0fdfa;
  font-size: 11px;
  font-weight: 600;
}

.qbc-checkin-badge-soft {
  background: rgba(15, 23, 42, 0.18);
  color: #ccfbf1;
}

.qbc-checkin-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qbc-checkin-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.qbc-checkin-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 10px 20px 0;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.qbc-checkin-tab {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 9px 14px 11px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qbc-checkin-tab:hover {
  color: #0f766e;
}

.qbc-checkin-tab.is-active {
  border-bottom-color: #0d9488;
  color: #0f766e;
}

.qbc-checkin-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px;
  overscroll-behavior: contain;
}

.qbc-checkin-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.qbc-checkin-status {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.qbc-checkin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 14px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qbc-checkin-button:hover:not(:disabled) {
  border-color: #5eead4;
  background: #f0fdfa;
  color: #0f766e;
}

.qbc-checkin-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.qbc-checkin-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.qbc-checkin-button-soft {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.qbc-checkin-button-primary {
  border-color: #0d9488;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(13, 148, 136, 0.8);
}

.qbc-checkin-button-primary:hover:not(:disabled) {
  border-color: #0f766e;
  background: linear-gradient(135deg, #115e59, #0f766e);
  color: #fff;
}

.qbc-checkin-mini {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  padding: 5px 9px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.qbc-checkin-mini:hover {
  border-color: #5eead4;
  color: #0f766e;
}

.qbc-checkin-mini-danger:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.qbc-checkin-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.qbc-checkin-toolbar-wrap {
  flex-wrap: wrap;
}

.qbc-checkin-toolbar .qbc-checkin-button {
  margin-bottom: 1px;
}

.qbc-checkin-projects {
  display: grid;
  gap: 12px;
}

.qbc-checkin-project {
  overflow: hidden;
  border: 1px solid #dbe7e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px -24px rgba(15, 23, 42, 0.36);
}

.qbc-checkin-project[open] {
  border-color: #99f6e4;
  box-shadow: 0 18px 40px -30px rgba(13, 148, 136, 0.5);
}

.qbc-checkin-project-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  background: linear-gradient(90deg, #f0fdfa, #fff);
  cursor: pointer;
  list-style: none;
}

.qbc-checkin-project-summary::-webkit-details-marker {
  display: none;
}

.qbc-checkin-project-summary::before {
  content: "▸";
  color: #0d9488;
  font-size: 13px;
  transition: transform 0.15s ease;
}

.qbc-checkin-project[open] > .qbc-checkin-project-summary::before {
  transform: rotate(90deg);
}

.qbc-checkin-project-name {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.qbc-checkin-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.qbc-checkin-chip {
  border-radius: 999px;
  padding: 2px 8px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 11px;
  font-weight: 600;
}

.qbc-checkin-variables {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px dashed #99f6e4;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fffe 100%);
}

.qbc-checkin-variables-title {
  margin-bottom: 8px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
}

.qbc-checkin-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qbc-checkin-variable {
  max-width: 100%;
  min-height: 27px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  color: #0f766e;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.qbc-checkin-variable:hover {
  border-color: #5eead4;
  background: #ccfbf1;
}

.qbc-checkin-variable:active {
  transform: translateY(1px);
}

.qbc-checkin-variable:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}

.qbc-checkin-project-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
}

.qbc-checkin-dot::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 999px;
  background: #0d9488;
  content: "";
  vertical-align: middle;
}

.qbc-checkin-project-body {
  padding: 14px 15px 16px;
  border-top: 1px solid #edf2f1;
}

.qbc-checkin-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.qbc-checkin-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdfd;
}

.qbc-checkin-section:first-child {
  margin-top: 0;
}

.qbc-checkin-section-title {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.qbc-checkin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.qbc-checkin-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.qbc-checkin-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.qbc-checkin-label {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.qbc-checkin-input,
.qbc-checkin-textarea,
.qbc-checkin-select {
  width: 100%;
  border: 1px solid #d8e2e0;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qbc-checkin-input:focus,
.qbc-checkin-textarea:focus,
.qbc-checkin-select:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.qbc-checkin-textarea {
  min-height: 70px;
  resize: vertical;
}

.qbc-checkin-textarea[readonly] {
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.qbc-checkin-hint {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.55;
}

.qbc-checkin-check,
.qbc-checkin-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.qbc-checkin-check {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.qbc-checkin-check input {
  width: 15px;
  height: 15px;
  accent-color: #0d9488;
}

.qbc-checkin-checks {
  gap: 14px;
  margin-bottom: 10px;
}

.qbc-checkin-test-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed #99f6e4;
  border-radius: 14px;
  background: #f0fdfa;
}

.qbc-checkin-test-card .qbc-checkin-button {
  margin-top: 10px;
}

.qbc-checkin-test-output {
  max-height: 220px;
  margin: 10px 0 0;
  overflow: auto;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.qbc-checkin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.qbc-checkin-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.qbc-checkin-stat-primary {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #f0fdfa, #fff);
}

.qbc-checkin-stat-amber {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffbeb, #fff);
}

.qbc-checkin-stat-blue {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.qbc-checkin-stat-green {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.qbc-checkin-stat-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.qbc-checkin-stat-value {
  color: #0f172a;
  font-size: 26px;
  line-height: 1.15;
}

.qbc-checkin-stat-hint {
  color: #94a3b8;
  font-size: 11px;
}

.qbc-checkin-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.qbc-checkin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.qbc-checkin-table th,
.qbc-checkin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f1;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.qbc-checkin-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.qbc-checkin-table tr:last-child td {
  border-bottom: 0;
}

.qbc-checkin-table tbody tr:hover {
  background: #f0fdfa;
}

.qbc-checkin-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 22px 16px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.qbc-checkin-audit-detail summary {
  color: #0f766e;
  font-size: 11px;
  cursor: pointer;
}

.qbc-checkin-audit-detail pre {
  max-width: 360px;
  max-height: 180px;
  margin: 6px 0 0;
  overflow: auto;
  border-radius: 8px;
  padding: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.qbc-checkin-error {
  padding: 28px 24px;
  text-align: center;
}

.qbc-checkin-error h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16px;
}

.qbc-checkin-error p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .qbc-checkin-modal {
    padding: 0;
  }

  .qbc-checkin-panel {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .qbc-checkin-header {
    padding: 16px;
  }

  .qbc-checkin-body {
    padding: 14px;
  }

  .qbc-checkin-footer {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .qbc-checkin-project-meta {
    width: 100%;
    margin-left: 20px;
  }

  .qbc-checkin-toolbar {
    align-items: stretch;
  }

  .qbc-checkin-toolbar > * {
    flex: 1 1 160px;
  }
}
