Files
oai-web/server/web/static/style.css
2026-04-08 12:43:24 +02:00

612 lines
16 KiB
CSS

:root {
--bg: #0f1117;
--bg2: #1a1d27;
--bg3: #22263a;
--border: #2e3249;
--text: #e2e4ef;
--text-dim: #7b82a8;
--accent: #6c8ef5;
--accent-dim: #3d5099;
--green: #4caf7d;
--red: #e05252;
--yellow: #e0a632;
--radius: 8px;
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--mono: "SF Mono", "Fira Code", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
font-size: 14px;
line-height: 1.6;
}
/* ── Sidebar ── */
.sidebar {
width: 200px;
min-width: 200px;
background: var(--bg2);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 16px 0 4px;
}
.sidebar-logo {
display: flex;
align-items: center;
gap: 10px;
padding: 0 16px 20px;
}
.sidebar-logo-img {
width: 36px;
height: 36px;
object-fit: contain;
border-radius: 6px;
flex-shrink: 0;
}
.sidebar-logo-text {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.sidebar-logo-name {
font-size: 17px;
font-weight: 700;
color: var(--accent);
letter-spacing: 0.5px;
}
.sidebar-logo-version {
color: var(--text-dim);
font-weight: 400;
font-size: 10px;
letter-spacing: 0.8px;
text-transform: uppercase;
vertical-align: middle;
}
.sidebar-logo-app {
font-size: 10px;
color: var(--text-dim);
font-weight: 400;
letter-spacing: 0.8px;
text-transform: uppercase;
margin-top: 2px;
}
.nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 20px;
color: var(--text-dim);
text-decoration: none;
transition: all 0.15s;
font-size: 13px;
cursor: pointer;
border: none;
background: none;
width: 100%;
text-align: left;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--bg3); color: var(--accent); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-bottom { margin-top: auto; padding: 4px 0 0; border-top: 1px solid var(--border); }
#pause-btn {
display: flex;
align-items: center;
gap: 8px;
margin: 8px 12px;
padding: 6px 14px;
width: calc(100% - 24px);
border-radius: var(--radius);
border: 1px solid rgba(224, 166, 50, 0.35);
background: rgba(224, 166, 50, 0.08);
color: var(--yellow);
font-size: 13px;
font-family: var(--font);
cursor: pointer;
transition: all 0.15s;
text-align: left;
}
#pause-btn:hover { background: rgba(224, 166, 50, 0.18); border-color: rgba(224, 166, 50, 0.55); }
#pause-btn.paused {
border-color: rgba(76, 175, 125, 0.35);
background: rgba(76, 175, 125, 0.08);
color: var(--green);
}
#pause-btn.paused:hover { background: rgba(76, 175, 125, 0.18); border-color: rgba(76, 175, 125, 0.55); }
.sidebar-user {
display: flex; align-items: center; justify-content: space-between;
padding: 6px 12px; margin-top: 2px; font-size: 11px; color: var(--muted);
}
.sidebar-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.sidebar-user-logout { color: var(--muted); display: flex; align-items: center; flex-shrink: 0; opacity: 0.7; transition: opacity 0.15s; }
.sidebar-user-logout:hover { opacity: 1; color: var(--accent); }
/* ── Personality setup nag banner ── */
.nag-banner {
display: flex; align-items: center; justify-content: space-between;
padding: 8px 20px; background: #7c5a00; color: #fde68a;
font-size: 13px; gap: 12px; flex-shrink: 0;
}
.nag-link { color: #fde68a; font-weight: 600; text-decoration: underline; }
.nag-link:hover { color: #fff; }
.nag-dismiss {
background: none; border: none; color: #fde68a; font-size: 18px;
cursor: pointer; line-height: 1; padding: 0 4px; opacity: 0.8;
}
.nag-dismiss:hover { opacity: 1; }
/* ── Main content ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
/* ── Chat ── */
.chat-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 24px;
display: flex;
flex-direction: column;
gap: 16px;
}
.message { display: flex; flex-direction: column; max-width: 760px; }
.message.user { align-self: flex-end; align-items: flex-end; }
.message.assistant { align-self: flex-start; align-items: flex-start; }
.message-bubble {
padding: 12px 16px;
border-radius: var(--radius);
line-height: 1.7;
white-space: pre-wrap;
word-break: break-word;
}
.message.user .message-bubble {
background: var(--accent-dim);
color: var(--text);
border-bottom-right-radius: 2px;
}
.message.assistant .message-bubble {
background: var(--bg2);
border: 1px solid var(--border);
border-bottom-left-radius: 2px;
}
.message-meta {
font-size: 11px;
color: var(--text-dim);
padding: 4px 4px 0;
}
/* Tool indicators */
.tool-indicator {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
background: var(--bg2);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: 12px;
color: var(--text-dim);
align-self: flex-start;
max-width: 500px;
}
.tool-indicator .dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--accent);
animation: pulse 1s infinite;
flex-shrink: 0;
}
.tool-indicator.done .dot { background: var(--green); animation: none; }
.tool-indicator.error .dot { background: var(--red); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
/* Confirmation modal */
.modal-overlay {
position: fixed; inset: 0;
background: rgba(0,0,0,0.6);
display: flex; align-items: center; justify-content: center;
z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal {
background: var(--bg2);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px;
max-width: 480px;
width: 90%;
}
.modal h3 { margin-bottom: 8px; color: var(--yellow); font-size: 15px; }
.modal .modal-desc {
background: var(--bg3);
border: 1px solid var(--border);
border-radius: 4px;
padding: 10px 12px;
font-family: var(--mono);
font-size: 12px;
margin: 12px 0 20px;
white-space: pre-wrap;
word-break: break-word;
}
.modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
/* Input bar */
.chat-input-wrap {
padding: 16px 24px;
border-top: 1px solid var(--border);
background: var(--bg);
display: flex;
gap: 10px;
align-items: flex-end;
}
.chat-input {
flex: 1;
background: var(--bg2);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: 14px;
padding: 10px 14px;
resize: none;
min-height: 42px;
max-height: 200px;
line-height: 1.5;
outline: none;
transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--accent-dim); }
/* ── Buttons ── */
.btn {
padding: 8px 16px;
border-radius: var(--radius);
border: none;
font-size: 13px;
font-family: var(--font);
cursor: pointer;
transition: opacity 0.15s;
display: inline-flex;
align-items: center;
gap: 6px;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-small { padding: 4px 10px; font-size: 12px; }
/* ── Generic page content ── */
.page { padding: 32px; overflow-y: auto; flex: 1; }
.page h1 { font-size: 20px; margin-bottom: 24px; }
/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 500; font-size: 11px; text-transform: uppercase; }
tr:hover td { background: var(--bg2); }
/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.form-input {
width: 100%;
background: var(--bg2);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: 13px;
padding: 8px 12px;
outline: none;
}
.form-input:focus { border-color: var(--accent-dim); }
/* Badges */
.badge {
padding: 2px 8px;
border-radius: 99px;
font-size: 11px;
font-weight: 600;
}
.badge-green { background: rgba(76,175,125,0.15); color: var(--green); }
.badge-red { background: rgba(224,82,82,0.15); color: var(--red); }
.badge-blue { background: rgba(108,142,245,0.15); color: var(--accent); }
/* Status bar */
.status-bar {
padding: 6px 24px;
background: var(--bg2);
border-top: 1px solid var(--border);
font-size: 11px;
color: var(--text-dim);
display: flex;
gap: 16px;
align-items: center;
}
.status-dot {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--green);
display: inline-block;
}
.status-dot.offline { background: var(--red); }
.status-dot.paused { background: var(--yellow); }
/* Scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
/* Typing indicator */
.typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing span {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--text-dim);
animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0.6); } 40% { transform: scale(1); } }
/* Filter bar */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .form-input { width: auto; }
/* Tab buttons */
.tab-btn {
padding: 8px 20px;
background: none;
border: none;
border-bottom: 2px solid transparent;
color: var(--text-dim);
cursor: pointer;
font-size: 14px;
margin-bottom: -1px;
transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text); }
/* Metadata cards */
.meta-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.meta-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.meta-value { font-size: 14px; font-weight: 500; word-break: break-all; }
/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 16px; }
.page-btn {
padding: 4px 10px;
background: var(--bg2);
border: 1px solid var(--border);
color: var(--text-dim);
border-radius: 4px;
cursor: pointer;
font-size: 12px;
}
.page-btn.active { background: var(--accent-dim); color: var(--text); border-color: var(--accent-dim); }
.page-btn:hover:not(.active) { border-color: var(--accent-dim); }
/* ── Settings page ───────────────────────────────────────────────────────── */
.settings-section-title {
font-size: 13px;
font-weight: 600;
color: var(--text);
margin-bottom: 12px;
letter-spacing: 0.2px;
}
/* ── Model picker modal list items ────────────────────────────────────────── */
.mp-item { padding: 7px 14px; font-size: 13px; cursor: pointer; border-radius: 4px; color: var(--text-dim); }
.mp-item:hover, .mp-item.mp-focused { background: var(--bg3); color: var(--text); }
.mp-item.mp-selected { color: var(--accent); }
/* ── Help page ────────────────────────────────────────────────────────────── */
.help-layout {
display: flex;
flex: 1;
overflow: hidden;
height: 100%;
}
.help-toc {
width: 220px;
min-width: 220px;
padding: 24px 16px;
border-right: 1px solid var(--border);
background: var(--bg2);
overflow-y: auto;
flex-shrink: 0;
}
.toc-list {
list-style: none;
font-size: 13px;
line-height: 1.4;
}
.toc-list li { margin-bottom: 2px; }
.toc-list a {
display: block;
padding: 4px 8px;
color: var(--text-dim);
text-decoration: none;
border-radius: 4px;
transition: color 0.15s, background 0.15s;
}
.toc-list a:hover { color: var(--text); background: var(--bg3); }
.toc-list a.toc-active { color: var(--accent); background: rgba(108,142,245,0.08); }
.toc-list ul {
list-style: none;
padding-left: 12px;
margin-top: 2px;
}
.toc-list ul a { font-size: 12px; }
.help-content {
flex: 1;
overflow-y: auto;
padding: 32px 40px;
max-width: 900px;
}
.help-content section {
margin-bottom: 48px;
scroll-margin-top: 32px;
}
.help-content h1 {
font-size: 22px;
font-weight: 700;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
color: var(--text);
}
.help-content h2 {
font-size: 15px;
font-weight: 600;
margin-top: 24px;
margin-bottom: 10px;
color: var(--text);
scroll-margin-top: 32px;
}
.help-content h3 {
font-size: 13px;
font-weight: 600;
margin-top: 20px;
margin-bottom: 8px;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.help-content p { margin-bottom: 10px; line-height: 1.7; }
.help-content ul, .help-content ol {
padding-left: 20px;
margin-bottom: 10px;
line-height: 1.7;
}
.help-content li { margin-bottom: 4px; }
.help-content dl { margin-bottom: 12px; }
.help-content dt { font-weight: 600; margin-top: 10px; color: var(--text); }
.help-content dd { padding-left: 16px; color: var(--text-dim); }
.help-content pre {
background: var(--bg3);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 12px 16px;
font-family: var(--mono);
font-size: 12px;
overflow-x: auto;
margin: 10px 0;
white-space: pre-wrap;
word-break: break-all;
}
.help-content code {
font-family: var(--mono);
font-size: 12px;
background: var(--bg3);
border: 1px solid var(--border);
border-radius: 3px;
padding: 1px 5px;
}
.help-content pre code {
background: none;
border: none;
padding: 0;
font-size: inherit;
}
.help-content a { color: var(--accent); text-decoration: none; }
.help-content a:hover { text-decoration: underline; }
.help-content kbd {
font-family: var(--mono);
font-size: 11px;
background: var(--bg3);
border: 1px solid var(--border);
border-radius: 3px;
padding: 1px 5px;
color: var(--text);
}
.help-note {
background: rgba(108,142,245,0.08);
border: 1px solid rgba(108,142,245,0.25);
border-radius: var(--radius);
padding: 10px 14px;
margin-bottom: 16px;
font-size: 13px;
}
/* Help API table — more compact than the default table */
.help-api-table { font-size: 12px; margin-bottom: 16px; }
.help-api-table th { font-size: 11px; }
.help-api-table td { padding: 7px 12px; vertical-align: top; }
/* HTTP method badges */
.http-get { color: var(--green); font-weight: 700; font-family: var(--mono); font-size: 11px; }
.http-post { color: var(--accent); font-weight: 700; font-family: var(--mono); font-size: 11px; }
.http-put { color: var(--yellow); font-weight: 700; font-family: var(--mono); font-size: 11px; }
.http-del { color: var(--red); font-weight: 700; font-family: var(--mono); font-size: 11px; }
/* ── Prompt mode toggle ───────────────────────────────────────────────────── */
.prompt-mode-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pm-btn { flex: 1; padding: 6px 8px; font-size: 12px; border: none; border-right: 1px solid var(--border); background: var(--bg2); color: var(--text-dim); cursor: pointer; transition: background 0.15s, color 0.15s; }
.pm-btn:last-child { border-right: none; }
.pm-btn.active { background: var(--accent); color: #fff; }
.pm-btn:hover:not(.active) { background: var(--bg3); color: var(--text); }