示例工程 43-project-local-knowledge-base
43-project-local-knowledge-base/app/src/styles/app.css
.app {
min-height: 100vh;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
height: 60px;
padding: 0 20px;
border-bottom: 1px solid var(--border);
background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.brand {
display: flex;
align-items: center;
gap: 10px;
}
.logo {
display: grid;
place-items: center;
width: 30px;
height: 30px;
border-radius: 9px;
background: #0f172a;
color: #ffffff;
font-family: var(--font-mono);
font-size: 10px;
font-weight: 700;
}
.brand h1 {
margin: 0;
font-size: 15px;
}
.header-side {
display: flex;
align-items: center;
gap: 7px;
}
.pill {
padding: 2px 8px;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--muted);
font-size: 10px;
}
.pill.ok-pill {
border-color: #86efac;
background: #f0fdf4;
color: #166534;
}
.pill.bad-pill {
border-color: #fecaca;
background: #fef2f2;
color: #991b1b;
}
.layout {
display: grid;
grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
gap: 12px;
padding: 14px 20px 20px;
}
.column {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.card {
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
}
.pad {
padding: 11px 13px;
}
.card-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
margin-bottom: 7px;
}
.card h2 {
margin: 0;
font-size: 12.5px;
}
.small {
font-size: 10.5px;
}
.muted {
color: var(--muted);
}
.btn {
height: 28px;
padding: 0 9px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
font-size: 10.5px;
}
.btn.primary {
border-color: var(--primary);
background: var(--primary);
color: var(--primary-fg);
}
.btn:hover {
border-color: var(--primary);
}
.actions {
display: flex;
gap: 5px;
}
.actions.wrap {
flex-wrap: wrap;
margin-top: 8px;
}
.metrics {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 5px;
padding: 8px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--panel);
}
.metrics div {
display: flex;
flex-direction: column;
}
.metrics span {
color: var(--muted);
font-size: 9px;
}
.metrics b {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 500;
}
.progress {
height: 8px;
margin-top: 8px;
overflow: hidden;
border-radius: 999px;
background: var(--panel);
}
.progress i {
display: block;
height: 100%;
border-radius: 999px;
background: linear-gradient(90deg, #93c5fd, #2563eb);
transition: width 0.2s ease;
}
.error-line {
min-height: 13px;
margin-top: 4px;
color: var(--danger);
font-size: 9.5px;
overflow-wrap: anywhere;
}
.docs {
margin: 4px 0 0;
padding: 0;
list-style: none;
}
.doc-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 5px 0;
border-bottom: 1px solid var(--border);
}
.doc-row:last-child {
border-bottom: none;
}
.doc-main {
display: flex;
flex-direction: column;
gap: 1px;
min-width: 0;
}
.doc-main strong {
font-size: 10.5px;
}
.doc-main span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag {
padding: 1px 6px;
border-radius: 999px;
background: var(--panel);
color: var(--muted);
font-size: 9px;
white-space: nowrap;
}
.worker,
.activity {
margin: 0;
padding: 0;
list-style: none;
}
.worker li {
display: grid;
grid-template-columns: 92px minmax(0, 1fr);
gap: 8px;
padding: 3px 0;
border-bottom: 1px solid var(--border);
font-size: 10px;
}
.worker li:last-child {
border-bottom: none;
}
.worker span {
color: var(--muted);
}
.worker b {
font-family: var(--font-mono);
font-weight: 500;
}
.hint {
margin: 7px 0 0;
line-height: 1.6;
}
.activity {
max-height: 140px;
overflow: auto;
}
.event-row {
display: grid;
grid-template-columns: 56px 60px minmax(0, 1fr);
gap: 6px;
padding: 3px 0;
border-bottom: 1px solid var(--border);
font-size: 9.5px;
}
.event-row:last-child {
border-bottom: none;
}
.event-row .kind {
color: var(--primary);
}
.search-bar {
display: flex;
gap: 6px;
}
.input {
flex: 1;
height: 30px;
padding: 0 9px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
font-size: 10.5px;
outline: none;
}
.input:focus {
border-color: var(--primary);
}
.samples {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-top: 6px;
}
.chip-btn {
padding: 1px 7px;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--panel);
color: var(--muted);
font-size: 9px;
}
.chip-btn:hover {
border-color: var(--primary);
color: var(--primary);
}
.hits {
margin: 8px 0 0;
padding: 0;
list-style: none;
}
.hit {
padding: 7px 0;
border-bottom: 1px solid var(--border);
}
.hit:last-child {
border-bottom: none;
}
.hit-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
}
.hit-head strong {
font-size: 10.5px;
}
.snippet {
margin-top: 3px;
color: var(--muted);
font-size: 10px;
line-height: 1.65;
}
.snippet mark {
padding: 0 2px;
border-radius: 3px;
background: #fef08a;
color: #713f12;
}
.bullets {
margin: 0;
padding-left: 16px;
font-size: 10px;
line-height: 1.7;
}
body[data-shot="index"] .index-card {
border-color: #bfdbfe;
}
body[data-shot="search"] .search-card {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
body[data-shot="progress"] .index-card {
border-color: #fcd34d;
box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}
@media (max-width: 820px) {
.layout {
grid-template-columns: 1fr;
}
}