.qbc-tc-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.qbc-tc-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1120px;
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.qbc-tc-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(120deg, #7c2d12 0%, #b45309 55%, #f59e0b 100%);
  color: #fff;
}

.qbc-tc-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.qbc-tc-subtitle {
  margin: 4px 0 0;
  color: rgba(255, 247, 237, 0.88);
  font-size: 12px;
  line-height: 1.5;
}

.qbc-tc-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.qbc-tc-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.qbc-tc-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.qbc-tc-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
}

.qbc-tc-tab {
  border: 0;
  border-radius: 8px;
  padding: 6px 14px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
}

.qbc-tc-tab.is-active {
  background: #fff;
  color: #9a3412;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.qbc-tc-spacer {
  flex: 1 1 auto;
}

.qbc-tc-button {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 6px 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
}

.qbc-tc-button:hover {
  border-color: #94a3b8;
}

.qbc-tc-button.is-primary {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff;
}

.qbc-tc-button.is-primary:hover {
  background: #c2410c;
}

.qbc-tc-button.is-danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.qbc-tc-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qbc-tc-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px 16px 20px;
}

.qbc-tc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.qbc-tc-stat {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.qbc-tc-stat-label {
  color: #64748b;
  font-size: 12px;
}

.qbc-tc-stat-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #9a3412;
}

.qbc-tc-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.qbc-tc-card + .qbc-tc-card {
  margin-top: 12px;
}

.qbc-tc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.qbc-tc-card-title {
  font-size: 14px;
  font-weight: 600;
}

.qbc-tc-table-wrap {
  overflow: auto;
}

.qbc-tc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.qbc-tc-table th,
.qbc-tc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.qbc-tc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
}

.qbc-tc-table tr:last-child td {
  border-bottom: 0;
}

.qbc-tc-table td.is-wrap {
  white-space: normal;
  min-width: 160px;
}

.qbc-tc-check-cell {
  width: 34px;
  text-align: center;
}

.qbc-tc-check-cell input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.qbc-tc-table td:last-child {
  white-space: nowrap;
}

.qbc-tc-empty {
  padding: 26px 14px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.qbc-tc-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
}

.qbc-tc-badge.is-active {
  background: #dcfce7;
  color: #15803d;
}

.qbc-tc-badge.is-paused {
  background: #fef3c7;
  color: #b45309;
}

.qbc-tc-badge.is-ended {
  background: #e2e8f0;
  color: #64748b;
}

.qbc-tc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px;
}

.qbc-tc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.qbc-tc-field.is-wide {
  grid-column: 1 / -1;
}

.qbc-tc-field label {
  color: #475569;
  font-size: 12px;
}

.qbc-tc-field input,
.qbc-tc-field select,
.qbc-tc-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 7px 9px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-family: inherit;
}

.qbc-tc-field textarea {
  min-height: 64px;
  resize: vertical;
}

.qbc-tc-duration-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(76px, 0.7fr) minmax(76px, 0.6fr);
  gap: 8px;
}

.qbc-tc-duration-row select,
.qbc-tc-duration-row input {
  width: 100%;
}

.qbc-tc-duration-row input:disabled,
.qbc-tc-duration-row select:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.qbc-tc-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 13px;
}

.qbc-tc-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #334155;
}

.qbc-tc-scroll {
  max-height: 132px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 12px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 13px;
}

.qbc-tc-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.qbc-tc-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  color: #64748b;
}

.qbc-tc-status.is-error {
  color: #b91c1c;
}

.qbc-tc-status.is-ok {
  color: #15803d;
}

.qbc-tc-muted {
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 720px) {
  .qbc-tc-dialog {
    max-height: calc(100vh - 12px);
    border-radius: 14px;
  }
  .qbc-tc-header {
    padding: 12px 14px;
  }
  .qbc-tc-body {
    padding: 10px;
  }
  .qbc-tc-table th,
  .qbc-tc-table td {
    padding: 7px 8px;
  }
}
