body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#cqt-panel {
  width: 340px;
  padding: 16px;
  color: #1a1a1a;
  background-color: #ffffff;
}

/* ---- plan segmented row ---- */
.cqt-segment {
  display: flex;
  gap: 4px;
  background: #f2f3f5;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 15px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.cqt-seg-btn {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cqt-seg-btn.is-active {
  background: #ffffff;
  color: #0b0b0b;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.06);
}


.cqt-model-row {
  margin-bottom: 16px;
}

.cqt-model-row:last-child {
  margin-bottom: 0;
}

.cqt-model-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.cqt-model-name-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cqt-model-name {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}

.cqt-model-period {
  font-size: 12px;
  color: #888;
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.cqt-model-usage {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.cqt-infty {
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", "Apple Symbols", "Noto Sans Symbols2", "Segoe UI Symbol", "STIXGeneral", "Symbola", sans-serif;
}

.cqt-progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.cqt-progress-bar {
  height: 100%;
  background-color: #19c37d;
  border-radius: 4px;
  transition: width 0.3s ease-in-out;
}

.cqt-loader, .cqt-error {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 14px;
}

.cqt-error {
  color: #d9534f;
}

/* ---- dark mode ---- */
@media (prefers-color-scheme: dark) {
  body, #cqt-panel {
    background-color: #1f1f1f;
    color: #e5e5e5;
  }

  .cqt-segment {
    background: #2a2a2a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  }

  .cqt-seg-btn { color: #c9c9c9; }
  .cqt-seg-btn.is-active {
    background: #0f0f0f;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06);
  }

  .cqt-model-name { color: #f0f0f0; }
  .cqt-model-usage, .cqt-model-period { color: #b0b0b0; }
  .cqt-model-period { background-color: #3a3a3a; }
  .cqt-progress-bar-container { background-color: #3a3a3a; }
}