2026-09-02 13:48:31 +08:00

227 lines
12 KiB
CSS

:root {
color-scheme: light;
--ink: #152521;
--muted: #697772;
--line: #dfe6e2;
--surface: #ffffff;
--canvas: #f4f6f2;
--forest: #123d32;
--forest-light: #dff1e8;
--lime: #c7ef68;
--danger: #a43c37;
--shadow: 0 18px 48px rgb(35 56 49 / 8%);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
margin: 0;
min-width: 320px;
background: var(--canvas);
color: var(--ink);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
position: sticky;
top: 0;
height: 100vh;
display: flex;
flex-direction: column;
padding: 30px 20px 22px;
color: #f5fbf8;
background: var(--forest);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.brand-mark {
display: grid;
width: 42px;
height: 42px;
place-items: center;
border-radius: 12px;
background: var(--lime);
color: var(--forest);
font-size: 13px;
font-weight: 900;
letter-spacing: .08em;
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 15px; line-height: 1.15; }
.brand small { margin-top: 4px; color: #9fb8af; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.primary-nav { display: grid; gap: 8px; margin-top: 54px; }
.primary-nav a {
display: flex;
align-items: center;
gap: 12px;
min-height: 46px;
padding: 0 14px;
border-radius: 10px;
color: #b8cbc4;
font-size: 14px;
font-weight: 650;
}
.primary-nav a span { width: 20px; font-size: 20px; text-align: center; }
.primary-nav a:hover, .primary-nav a.active { background: rgb(255 255 255 / 9%); color: white; }
.primary-nav a.active { box-shadow: inset 3px 0 var(--lime); }
.sidebar-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgb(255 255 255 / 12%); color: #9fb8af; font-size: 11px; letter-spacing: .05em; }
.environment-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.workspace { min-width: 0; padding: 0 48px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 108px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 25px; font-weight: 600; }
.eyebrow, .section-label { margin: 0; color: #6b7c75; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.api-link { padding-bottom: 3px; border-bottom: 1px solid #9eaaa5; font-size: 12px; font-weight: 700; }
.page { max-width: 1180px; margin: 0 auto; padding-top: 54px; }
.page-heading { margin-bottom: 30px; }
.page-heading h2 { margin: 8px 0 10px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(29px, 4vw, 42px); font-weight: 500; letter-spacing: -.02em; }
.page-heading p:last-child { max-width: 670px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.notice { position: fixed; z-index: 10; top: 22px; right: 28px; max-width: 440px; padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
.notice.success { background: #e1f3e8; color: #205f42; }
.notice.error { background: #fce8e6; color: #8d302c; }
.upload-panel { display: grid; gap: 18px; max-width: 790px; }
.drop-zone {
display: flex;
min-height: 275px;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 32px;
border: 1.5px dashed #94a59e;
border-radius: 16px;
background: var(--surface);
cursor: pointer;
transition: border-color .2s, background .2s, transform .2s;
}
.drop-zone:hover { border-color: var(--forest); background: #fbfdf9; transform: translateY(-2px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; width: 56px; height: 56px; margin-bottom: 20px; place-items: center; border-radius: 50%; background: var(--forest-light); color: var(--forest); font-size: 27px; }
.drop-zone strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 21px; font-weight: 500; }
.drop-zone > span:not(.upload-icon) { margin-top: 7px; color: var(--muted); font-size: 12px; }
.drop-zone .selected-file { margin-top: 22px; padding: 7px 12px; border-radius: 20px; background: var(--canvas); color: var(--ink); font-weight: 650; }
.primary-button, .secondary-button {
display: inline-flex;
min-height: 44px;
align-items: center;
justify-content: center;
border: 0;
border-radius: 9px;
cursor: pointer;
font-size: 13px;
font-weight: 750;
}
.primary-button { padding: 0 24px; background: var(--forest); color: white; }
.primary-button:hover { background: #1d5546; }
.primary-button:disabled { cursor: wait; opacity: .6; }
.secondary-button { padding: 0 18px; border: 1px solid #bdc9c4; background: transparent; color: var(--ink); }
.compact { min-height: 38px; padding: 0 18px; }
.result-card { position: relative; max-width: 790px; margin-top: 30px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.result-card h3 { margin: 7px 0 0; font-size: 19px; }
.result-card > .status-pill { position: absolute; top: 24px; right: 24px; }
.metadata-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--line); }
dt { color: var(--muted); font-size: 11px; }
dd { margin: 7px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.text-link { color: var(--forest); font-size: 13px; font-weight: 750; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.table-meta { display: flex; justify-content: space-between; padding: 17px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 13px 18px; color: var(--muted); background: #fafbf9; font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 18px; border-top: 1px solid #edf0ee; vertical-align: middle; }
.filename-cell { min-width: 190px; font-weight: 750; }
.row-actions { min-width: 116px; text-align: right; white-space: nowrap; }
.table-action { padding: 5px 7px; border: 0; background: transparent; color: var(--forest); cursor: pointer; font-size: 12px; font-weight: 700; }
.danger-link { color: var(--danger); }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 20px; background: #edf0ee; color: #47534f; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.status-ready { background: #dff2e7; color: #256043; }
.status-processing { background: #fff1cb; color: #7c5d13; }
.status-failed { background: #fbe2df; color: #923c36; }
.status-uploaded { background: #e3ebf4; color: #34556e; }
.empty-state { display: flex; min-height: 240px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; font-weight: 500; }
.empty-state .primary-button { margin-top: 12px; color: white; font-family: inherit; font-size: 12px; }
.search-panel { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.search-panel > label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 750; }
.search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 90px 118px; gap: 12px; align-items: stretch; }
textarea, select { width: 100%; border: 1px solid #c9d3cf; border-radius: 9px; background: #fbfcfa; color: var(--ink); outline: none; }
textarea { min-height: 90px; padding: 13px 15px; resize: vertical; line-height: 1.55; }
textarea:focus, select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgb(18 61 50 / 8%); }
.top-k-control { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.top-k-control select { flex: 1; padding: 0 11px; }
.search-panel .primary-button { align-self: end; min-height: 54px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 15px; }
.results-heading h3 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 22px; font-weight: 500; }
.results-heading > span { color: var(--muted); font-size: 11px; }
.search-results { display: grid; gap: 12px; }
.search-empty { min-height: 220px; border: 1px dashed #b9c5c0; border-radius: 14px; }
.search-result-card { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rank { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--forest); color: var(--lime); font-family: Georgia, serif; font-size: 15px; }
.result-title-row { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.result-title-row h4 { margin: 0; font-size: 15px; }
.source-meta { display: flex; max-width: 60%; gap: 16px; }
.source-meta span { display: grid; gap: 3px; text-align: right; }
.source-meta small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.source-meta strong { overflow-wrap: anywhere; color: #46534e; font-size: 10px; font-weight: 650; }
.chunk-content { margin: 15px 0; color: #37433f; font-family: Georgia, "Noto Serif SC", serif; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.score-row { display: flex; gap: 22px; }
.score-row span { display: flex; align-items: baseline; gap: 7px; }
.score-row small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.score-row strong { font-size: 11px; }
.document-dialog { width: min(570px, calc(100vw - 32px)); padding: 30px; border: 0; border-radius: 14px; color: var(--ink); box-shadow: 0 24px 80px rgb(0 0 0 / 25%); }
.document-dialog::backdrop { background: rgb(10 25 20 / 55%); backdrop-filter: blur(2px); }
.document-dialog form { position: absolute; top: 15px; right: 15px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--canvas); cursor: pointer; font-size: 20px; }
.document-dialog h2 { margin: 10px 36px 24px 0; font-family: Georgia, "Noto Serif SC", serif; font-weight: 500; }
.dialog-metadata { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0; }
.dialog-metadata div { padding-top: 14px; border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
.app-shell { grid-template-columns: 1fr; }
.sidebar { position: static; width: 100%; height: auto; padding: 18px; }
.brand strong { font-size: 13px; }
.primary-nav { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
.primary-nav a { justify-content: center; padding: 0 8px; font-size: 12px; }
.primary-nav a span { display: none; }
.sidebar-foot { display: none; }
.workspace { padding: 0 20px 48px; }
.topbar { min-height: 88px; }
.api-link { display: none; }
.page { padding-top: 36px; }
.search-controls { grid-template-columns: 1fr 90px; }
.search-controls textarea { grid-column: 1 / -1; }
.metadata-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
.primary-nav a { min-height: 40px; }
.heading-row { align-items: start; flex-direction: column; }
.search-controls { grid-template-columns: 1fr; }
.search-controls textarea { grid-column: auto; }
.top-k-control select { min-height: 44px; }
.search-result-card { grid-template-columns: 1fr; }
.result-title-row { align-items: start; flex-direction: column; gap: 6px; }
.source-meta { max-width: 100%; flex-wrap: wrap; }
.source-meta span { text-align: left; }
.dialog-metadata { grid-template-columns: 1fr; }
}