/* Knowledge sources page — redesign tokens. * * Single page-scoped stylesheet so we don't have to rebuild Tailwind * for layout-only changes. All selectors live under .ks-page or specific * dialog ids to avoid bleeding into other pages. */ .ks-page { max-width: 1400px; margin: 0 auto; padding-bottom: 2rem; } /* ---------------- Header ---------------- */ .ks-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 0 1.25rem; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 1.5rem; } .ks-header__title h1 { margin: 0 0 0.25rem; font-size: 1.625rem; font-weight: 600; letter-spacing: -0.01em; } .ks-header__title p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.9rem; max-width: 60ch; } .ks-header__actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; } .ks-bot-context { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; border: 1px solid hsl(var(--border)); border-radius: 8px; background: hsl(var(--muted) / 0.4); } .ks-bot-context__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: hsl(var(--muted-foreground)); margin: 0; font-weight: 600; } .ks-bot-context__select { min-width: 200px; } .ks-bot-context__select select { background: transparent; border: 0; padding: 0; } /* ---------------- Active jobs banner ---------------- */ .ks-active-jobs { margin-bottom: 1.5rem; border: 1px solid hsl(217 91% 60% / 0.3); border-radius: 10px; background: linear-gradient(180deg, hsl(217 91% 60% / 0.06), hsl(217 91% 60% / 0.02)); padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; } .ks-active-jobs[hidden] { display: none; } .ks-active-jobs__title { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; color: hsl(217 91% 35%); } .ks-active-jobs__title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: hsl(217 91% 50%); box-shadow: 0 0 0 0 hsl(217 91% 50% / 0.5); animation: ks-pulse 1.6s ease-out infinite; } @keyframes ks-pulse { 0% { box-shadow: 0 0 0 0 hsl(217 91% 50% / 0.5); } 70% { box-shadow: 0 0 0 8px hsl(217 91% 50% / 0); } 100% { box-shadow: 0 0 0 0 hsl(217 91% 50% / 0); } } .ks-active-jobs__row { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: center; padding: 0.5rem 0; border-top: 1px solid hsl(var(--border) / 0.5); } .ks-active-jobs__row:first-of-type { border-top: 0; } .ks-active-jobs__name { font-weight: 500; font-size: 0.9rem; } .ks-active-jobs__meta { display: flex; gap: 0.6rem; font-size: 0.78rem; color: hsl(var(--muted-foreground)); margin-top: 0.15rem; } .ks-progress { width: 100%; height: 6px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; margin-top: 0.4rem; } .ks-progress__bar { height: 100%; background: linear-gradient(90deg, hsl(217 91% 60%), hsl(217 91% 50%)); transition: width 0.4s ease; } /* ---------------- Sources grid ---------------- */ .ks-sources__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; } .ks-sources__toolbar h2 { margin: 0; font-size: 1.1rem; font-weight: 600; } .ks-sources__filters { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; } .ks-sources__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; } .ks-sources__loading { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; padding: 2rem; justify-content: center; color: hsl(var(--muted-foreground)); } .ks-sources__empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; border: 1px dashed hsl(var(--border)); border-radius: 12px; background: hsl(var(--muted) / 0.2); } .ks-sources__empty h3 { margin: 0.5rem 0 0.25rem; font-size: 1.1rem; } .ks-sources__empty p { color: hsl(var(--muted-foreground)); margin: 0 auto 1rem; max-width: 40ch; } /* ---------------- Source card ---------------- */ .ks-source-card { display: flex; flex-direction: column; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--background)); padding: 1rem 1rem 0.75rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; } .ks-source-card:hover { border-color: hsl(var(--border) / 1.5); box-shadow: 0 2px 8px hsl(var(--foreground) / 0.04); } .ks-source-card.is-inactive { opacity: 0.62; } .ks-source-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; } .ks-source-card__title { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ks-source-card__icon { width: 36px; height: 36px; border-radius: 8px; background: hsl(var(--muted)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: hsl(var(--muted-foreground)); } .ks-source-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; font-size: 0.8rem; color: hsl(var(--muted-foreground)); margin-bottom: 0.6rem; } .ks-source-card__meta strong { color: hsl(var(--foreground)); font-weight: 500; } .ks-source-card__crawl { margin: 0.25rem 0 0.5rem; padding: 0.5rem 0.6rem; background: hsl(var(--muted) / 0.5); border-radius: 6px; font-size: 0.78rem; color: hsl(var(--muted-foreground)); } .ks-source-card__crawl.is-active { background: hsl(217 91% 60% / 0.08); color: hsl(217 91% 35%); } .ks-source-card__crawl.is-failed { background: hsl(0 84% 60% / 0.08); color: hsl(0 84% 35%); } .ks-source-card__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.5rem; border-top: 1px solid hsl(var(--border) / 0.6); } .ks-source-card__actions .cds--btn--sm { font-size: 0.78rem; } /* Status pill (used inside card head) */ .ks-status-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; } .ks-status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; } .ks-status-pill--active { background: hsl(142 76% 36% / 0.12); color: hsl(142 76% 28%); } .ks-status-pill--active::before { background: hsl(142 76% 40%); } .ks-status-pill--inactive { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); } .ks-status-pill--inactive::before { background: hsl(var(--muted-foreground)); } .ks-status-pill--running { background: hsl(217 91% 60% / 0.12); color: hsl(217 91% 35%); } .ks-status-pill--running::before { background: hsl(217 91% 50%); animation: ks-pulse 1.6s ease-out infinite; } .ks-status-pill--failed { background: hsl(0 84% 60% / 0.1); color: hsl(0 84% 35%); } .ks-status-pill--failed::before { background: hsl(0 84% 50%); } .ks-status-pill--linked { background: hsl(142 76% 36% / 0.1); color: hsl(142 76% 30%); } /* ---------------- History (collapsible) ---------------- */ .ks-history { margin-top: 1.5rem; border-top: 1px solid hsl(var(--border)); } .ks-history details { padding: 0.5rem 0; } .ks-history summary { cursor: pointer; list-style: none; padding: 0.65rem 0.75rem; border-radius: 8px; display: flex; align-items: center; gap: 0.75rem; user-select: none; } .ks-history summary:hover { background: hsl(var(--muted) / 0.4); } .ks-history summary::-webkit-details-marker { display: none; } .ks-history summary::before { content: '▸'; font-size: 0.7rem; color: hsl(var(--muted-foreground)); transition: transform 0.18s ease; display: inline-block; } .ks-history details[open] summary::before { transform: rotate(90deg); } .ks-history summary h2 { font-size: 1rem; font-weight: 600; } .ks-history__hint { color: hsl(var(--muted-foreground)); font-size: 0.78rem; margin-left: 0.5rem; } .ks-history__body { padding: 0.5rem 0 0; } .ks-history__filters { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; } /* ---------------- Modal: import dialog ---------------- */ .ks-import-dialog { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; border-radius: 14px; border: 1px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.25); z-index: 60; overflow: hidden; } .ks-import-dialog__header { padding: 1.1rem 1.25rem 0.75rem; border-bottom: 1px solid hsl(var(--border)); position: relative; } .ks-import-dialog__header h2 { margin: 0 0 0.25rem; font-size: 1.1rem; font-weight: 600; } .ks-import-dialog__header p { margin: 0; font-size: 0.82rem; color: hsl(var(--muted-foreground)); } .ks-import-dialog__close { position: absolute; top: 0.75rem; right: 0.75rem; background: transparent; border: 0; padding: 0.4rem; border-radius: 6px; cursor: pointer; color: hsl(var(--muted-foreground)); } .ks-import-dialog__close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); } .ks-import-dialog__body { padding: 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; } .ks-import-dialog__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.25); } .ks-stepper { display: flex; list-style: none; padding: 0.6rem 1.25rem; margin: 0; gap: 0.5rem; flex-wrap: wrap; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.15); } /* ---------------- Drawer: source detail ---------------- */ .ks-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(840px, 100vw); background: hsl(var(--background)); color: hsl(var(--foreground)); border-left: 1px solid hsl(var(--border)); box-shadow: -16px 0 48px -8px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; z-index: 60; animation: ks-drawer-slide 0.22s cubic-bezier(0.16, 1, 0.3, 1); } @keyframes ks-drawer-slide { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .ks-drawer__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; padding: 1.1rem 1.25rem 0.75rem; border-bottom: 1px solid hsl(var(--border)); } .ks-drawer__header h2 { margin: 0; font-size: 1.1rem; font-weight: 600; } .ks-drawer__subtitle { margin: 0.2rem 0 0; font-size: 0.85rem; color: hsl(var(--muted-foreground)); } .ks-drawer__close { background: transparent; border: 0; padding: 0.4rem; border-radius: 6px; cursor: pointer; color: hsl(var(--muted-foreground)); } .ks-drawer__close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); } .ks-drawer__tabs { display: flex; gap: 0.25rem; padding: 0.5rem 1.25rem 0; border-bottom: 1px solid hsl(var(--border)); } .ks-drawer__tab { background: transparent; border: 0; padding: 0.6rem 0.9rem; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 0.85rem; color: hsl(var(--muted-foreground)); cursor: pointer; } .ks-drawer__tab.is-active { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--primary)); font-weight: 600; } .ks-drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem 1.5rem; } .ks-drawer__panel { animation: ks-fade 0.18s ease-out; } .ks-drawer__panel[hidden] { display: none; } @keyframes ks-fade { from { opacity: 0; } to { opacity: 1; } } /* ---------------- Field error highlight (shared) ---------------- */ .ds-field-error { box-shadow: 0 0 0 2px hsl(var(--destructive)) !important; transition: box-shadow 0.18s ease; }