.kilo-console .config-page {
  display: grid;
  gap: 0.85rem;
  max-width: 64rem;
  margin: 0 auto;
}

.kilo-console .config-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  min-height: auto;
  border-bottom: 0;
  padding: 0 0 1.25rem;
}

.kilo-console .config-page-header h1,
.kilo-console .route-empty h1 {
  margin: 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

.kilo-console .config-page-header p {
  max-width: 42rem;
  margin: 0.75rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.45;
}

.kilo-console .config-title-count {
  display: inline-flex;
  gap: 0.625rem;
  align-items: center;
}

.kilo-console .config-page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.kilo-console .config-page-actions [data-component="button"][data-variant="primary"] [data-component="icon"],
.kilo-console .config-page-actions [data-component="button"][data-variant="primary"] [data-slot="icon-svg"] {
  color: var(--primary-foreground);
}

.kilo-console .config-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 0.75rem;
}

.kilo-console .config-toolbar label,
.kilo-console .config-toolbar-controls > label > span {
  color: var(--text-weaker);
  font-size: var(--font-size-small);
}

.kilo-console .config-toolbar-controls > label > span {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.kilo-console .config-toolbar-controls {
  flex: 1 1 auto;
  display: flex;
  gap: 0.5rem;
  align-items: end;
  flex-wrap: wrap;
}

.kilo-console .config-toolbar-controls label {
  position: relative;
  display: grid;
  gap: 0;
  flex: 0 1 12rem;
  min-width: min(10rem, 100%);
}

.kilo-console .config-toolbar-controls input,
.kilo-console .config-toolbar-controls select {
  height: 2.35rem;
  min-height: 2.35rem;
  line-height: 1.2;
}

.kilo-console .config-toolbar-controls input[type="range"] {
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
}

.kilo-console .config-toolbar-meta {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.kilo-console .context-filter {
  align-self: center;
  gap: 0.25rem !important;
}

.kilo-console .context-range {
  position: relative;
  height: 2.35rem;
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  background: var(--input-base);
  padding: 0 0.75rem;
}

.kilo-console .context-track,
.kilo-console .context-fill {
  position: absolute;
  top: 0.88rem;
  right: 1rem;
  left: 1rem;
  height: 0.25rem;
  border-radius: 999px;
  pointer-events: none;
}

.kilo-console .context-track {
  background: var(--border-base);
}

.kilo-console .context-fill {
  left: clamp(0.75rem, var(--context-min), calc(100% - 0.75rem));
  right: clamp(0.75rem, calc(100% - var(--context-max)), calc(100% - 0.75rem));
  background: var(--border-focus);
}

.kilo-console .context-min,
.kilo-console .context-max {
  position: absolute;
  top: 0.5rem;
  z-index: 2;
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-focus);
  cursor: grab;
  padding: 0;
  touch-action: none;
}

.kilo-console .context-min {
  left: clamp(0.75rem, var(--context-min), calc(100% - 0.75rem));
  transform: translateX(-50%);
}

.kilo-console .context-max {
  left: clamp(0.75rem, var(--context-max), calc(100% - 0.75rem));
  transform: translateX(-50%);
}

.kilo-console .context-min:active,
.kilo-console .context-max:active {
  cursor: grabbing;
}

.kilo-console .context-min:focus-visible,
.kilo-console .context-max:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--border-focus) 45%, transparent);
  outline-offset: 2px;
}

.kilo-console .context-filter small {
  position: absolute;
  right: 0.75rem;
  bottom: 0.32rem;
  left: 0.75rem;
  overflow: hidden;
  color: var(--text-weaker);
  font-size: 0.68rem;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.kilo-console .multi-check {
  position: relative;
  flex: 0 1 12rem;
  min-width: min(10rem, 100%);
  font-size: var(--font-size-small);
}

.kilo-console .multi-check summary {
  display: flex;
  align-items: center;
  height: 2.35rem;
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  background: var(--input-base);
  color: var(--text-strong);
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  list-style: none;
  padding: 0 2.5rem 0 0.75rem;
}

.kilo-console .multi-check summary::-webkit-details-marker {
  display: none;
}

.kilo-console .multi-check summary::after {
  position: absolute;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23a1a1aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1rem;
  content: "";
}

.kilo-console .multi-check-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  display: grid;
  gap: 0.15rem;
  width: 100%;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  background: var(--background-stronger);
  box-shadow: 0 1rem 2rem color-mix(in srgb, var(--background-base) 55%, transparent);
  font-size: var(--font-size-small);
  padding: 0.25rem;
}

.kilo-console .multi-check-menu label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  border-radius: var(--radius-md);
  color: var(--text-weak);
  font: inherit;
  padding: 0.25rem 0.35rem;
}

.kilo-console .multi-check-menu label:hover {
  background: var(--surface-raised-base);
  color: var(--text-strong);
}

.kilo-console .multi-check-menu input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  padding: 0;
}
