ducklm/duck_core/web/static/style.css

1003 lines
16 KiB
CSS

:root {
color-scheme: light;
--bg: #eef2f6;
--sidebar: #111827;
--sidebar-soft: #1f2937;
--panel: #ffffff;
--panel-strong: #f8fafc;
--text: #111827;
--muted: #64748b;
--border: #d7dee8;
--accent: #1f6feb;
--accent-strong: #174ea6;
--ok: #12805c;
--warn: #b7791f;
--bad: #b42318;
--shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: var(--bg);
color: var(--text);
}
.simple-page {
max-width: 980px;
margin: 0 auto;
padding: 28px;
}
.simple-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 18px;
}
.simple-header h1,
.simple-header p {
margin: 0;
}
.simple-header h1 {
font-size: 24px;
}
.simple-header p {
margin-top: 4px;
color: var(--muted);
}
.approval-list {
display: grid;
gap: 14px;
}
.approval-card {
display: grid;
gap: 14px;
padding: 16px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: var(--shadow);
}
.approval-card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.approval-card h2 {
margin: 0;
font-size: 17px;
}
.approval-card-header span {
padding: 3px 8px;
border-radius: 999px;
background: #fef3c7;
color: #854d0e;
font-size: 12px;
font-weight: 800;
}
.approval-meta {
display: grid;
gap: 6px;
}
.approval-meta div {
justify-content: flex-start;
}
.approval-meta dd {
max-width: none;
color: var(--text);
}
.approval-action {
margin: 0;
max-height: 220px;
overflow: auto;
padding: 12px;
background: #0f172a;
border-radius: 8px;
color: #d1fae5;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
line-height: 1.5;
}
.approval-actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.approval-actions button {
border: 0;
border-radius: 8px;
padding: 9px 12px;
background: var(--accent);
color: #ffffff;
font-weight: 750;
}
.approval-actions button[data-tone="danger"] {
background: var(--bad);
}
.approval-actions button:disabled {
cursor: wait;
opacity: 0.65;
}
.empty-state {
margin: 0;
padding: 16px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--muted);
}
button, input, textarea {
font: inherit;
}
button {
cursor: pointer;
}
.app-shell {
display: grid;
grid-template-columns: 292px minmax(0, 1fr);
min-height: 100vh;
}
.sidebar {
display: flex;
flex-direction: column;
gap: 18px;
min-height: 100vh;
padding: 22px;
background: var(--sidebar);
color: #e5edf7;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(255,255,255,0.12);
}
.brand-mark, .avatar {
display: grid;
place-items: center;
width: 36px;
height: 36px;
border-radius: 8px;
font-weight: 800;
}
.brand-mark {
background: #f8fafc;
color: #111827;
}
.brand h1, .brand p,
.chat-header h2, .chat-header p,
.settings-panel h2, .status-panel h2 {
margin: 0;
}
.brand h1 {
font-size: 18px;
line-height: 1.2;
}
.brand p {
margin-top: 2px;
color: #9ca3af;
font-size: 12px;
}
.utility-menu {
border-bottom: 1px solid rgba(255,255,255,0.12);
padding-bottom: 12px;
}
.utility-menu summary {
cursor: pointer;
color: #cbd5e1;
font-size: 13px;
font-weight: 750;
}
.side-nav {
display: grid;
gap: 6px;
margin-top: 10px;
}
.side-nav a {
color: #cbd5e1;
text-decoration: none;
padding: 10px 12px;
border-radius: 7px;
font-size: 14px;
}
.side-nav a:hover,
.side-nav a.active {
background: var(--sidebar-soft);
color: #ffffff;
}
.settings-panel,
.status-panel,
.conversation-panel {
display: grid;
gap: 12px;
padding: 14px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.10);
border-radius: 8px;
}
.settings-panel h2,
.status-panel h2,
.conversation-panel h2 {
font-size: 13px;
color: #f8fafc;
}
.panel-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.panel-heading button {
display: grid;
place-items: center;
width: 28px;
height: 28px;
border: 0;
border-radius: 7px;
background: #f8fafc;
color: #111827;
font-size: 18px;
font-weight: 800;
}
.conversation-list {
display: grid;
gap: 6px;
max-height: 260px;
overflow: auto;
}
.conversation-item {
display: grid;
gap: 3px;
width: 100%;
border: 1px solid transparent;
border-radius: 7px;
padding: 9px 10px;
background: transparent;
color: #e5edf7;
text-align: left;
}
.conversation-item:hover,
.conversation-item.active {
background: var(--sidebar-soft);
border-color: rgba(255,255,255,0.12);
}
.conversation-item strong,
.conversation-item span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.conversation-item strong {
font-size: 13px;
}
.conversation-item span,
.conversation-empty {
color: #9ca3af;
font-size: 11px;
}
.conversation-empty {
margin: 0;
}
label {
display: grid;
gap: 7px;
font-size: 13px;
font-weight: 650;
}
.toggle-row {
grid-template-columns: auto 1fr;
align-items: center;
font-weight: 500;
color: #cbd5e1;
}
input,
textarea {
width: 100%;
border: 1px solid var(--border);
border-radius: 8px;
padding: 11px 12px;
background: #ffffff;
color: var(--text);
}
.sidebar input {
border-color: rgba(255,255,255,0.16);
background: rgba(255,255,255,0.08);
color: #ffffff;
}
dl {
display: grid;
gap: 9px;
margin: 0;
}
dl div {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
dt {
color: #9ca3af;
font-size: 12px;
}
dd {
margin: 0;
max-width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #e5edf7;
font-size: 12px;
}
[data-tone="ok"] { color: #86efac; }
[data-tone="warn"] { color: #fde68a; }
[data-tone="bad"] { color: #fca5a5; }
.chat-shell {
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
gap: 16px;
min-width: 0;
height: 100vh;
padding: 22px;
}
.chat-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px 20px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: var(--shadow);
}
.chat-header h2 {
font-size: 20px;
}
.chat-header p {
margin-top: 4px;
color: var(--muted);
font-size: 13px;
}
.secondary-button,
.composer button {
border: 0;
border-radius: 8px;
padding: 10px 14px;
font-weight: 750;
}
.header-actions {
display: flex;
align-items: center;
gap: 8px;
}
.secondary-button {
background: #edf2f7;
color: #1f2937;
}
.messages {
display: flex;
flex-direction: column;
gap: 14px;
min-height: 0;
overflow-y: auto;
padding: 18px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: var(--shadow);
}
.message {
display: grid;
grid-template-columns: 36px minmax(0, 1fr);
gap: 10px;
max-width: 860px;
}
.message.user {
align-self: flex-end;
grid-template-columns: minmax(0, 1fr) 36px;
}
.message.user .avatar {
grid-column: 2;
grid-row: 1;
background: #dbeafe;
color: #1d4ed8;
}
.message.assistant .avatar {
background: #e5e7eb;
color: #111827;
}
.message.user .bubble {
grid-column: 1;
grid-row: 1;
background: #eff6ff;
border-color: #bfdbfe;
}
.bubble {
padding: 12px 14px;
background: var(--panel-strong);
border: 1px solid var(--border);
border-radius: 8px;
}
.bubble p {
margin: 8px 0 0;
white-space: pre-wrap;
overflow-wrap: anywhere;
line-height: 1.5;
}
.message-reasoning {
display: grid;
gap: 8px;
margin-top: 10px;
padding: 9px 10px;
background: #f1f5f9;
border: 1px solid #dbe3ee;
border-radius: 8px;
}
.message-reasoning.is-collapsed {
gap: 0;
}
.message-reasoning-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
border: 0;
padding: 0;
background: transparent;
color: #475569;
font-size: 12px;
font-weight: 750;
text-align: left;
}
.message-reasoning-status {
flex: 0 0 auto;
padding: 2px 7px;
border-radius: 999px;
background: #e2e8f0;
color: #64748b;
font-size: 11px;
}
.message-reasoning pre {
margin: 0;
max-height: 220px;
overflow: auto;
color: #334155;
font-size: 12px;
line-height: 1.45;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.tool-terminal {
margin-top: 10px;
overflow: hidden;
background: #0f172a;
border: 1px solid #1e293b;
border-radius: 8px;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.tool-terminal-header {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 34px;
padding: 8px 10px;
background: #111827;
border-bottom: 1px solid #1e293b;
}
.terminal-dots {
display: flex;
gap: 5px;
}
.terminal-dots i {
width: 9px;
height: 9px;
border-radius: 999px;
}
.terminal-dots i:nth-child(1) { background: #ef4444; }
.terminal-dots i:nth-child(2) { background: #f59e0b; }
.terminal-dots i:nth-child(3) { background: #22c55e; }
.tool-terminal-title {
min-width: 0;
overflow: hidden;
color: #d1d5db;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.tool-terminal-status {
padding: 2px 7px;
border-radius: 999px;
background: #1d4ed8;
color: #dbeafe;
font-size: 11px;
font-weight: 800;
}
.tool-terminal.is-error .tool-terminal-status {
background: #7f1d1d;
color: #fecaca;
}
.tool-terminal.is-waiting .tool-terminal-status {
background: #854d0e;
color: #fef3c7;
}
.tool-terminal-body {
margin: 0;
max-height: 220px;
overflow: auto;
padding: 10px 12px;
color: #d1fae5;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
line-height: 1.55;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.tool-approval-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
padding: 10px 12px 12px;
border-top: 1px solid #1e293b;
background: #111827;
}
.tool-approval-actions button {
border: 0;
border-radius: 7px;
padding: 8px 10px;
background: #2563eb;
color: #ffffff;
font-size: 12px;
font-weight: 800;
}
.tool-approval-actions button[data-tone="danger"] {
background: #b42318;
}
.tool-approval-actions button:disabled {
cursor: wait;
opacity: 0.65;
}
.tool-password-form {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
padding: 10px 12px 12px;
border-top: 1px solid #1e293b;
background: #111827;
}
.tool-password-form input {
min-width: 0;
border-color: #334155;
background: #0f172a;
color: #f8fafc;
}
.tool-password-form button {
border: 0;
border-radius: 7px;
padding: 8px 10px;
background: #2563eb;
color: #ffffff;
font-size: 12px;
font-weight: 800;
}
.tool-password-form input:disabled,
.tool-password-form button:disabled {
cursor: wait;
opacity: 0.65;
}
.message-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
color: var(--muted);
font-size: 12px;
}
.message-meta strong {
color: var(--text);
font-size: 13px;
}
.debug-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 10px;
}
.activity-backdrop {
position: fixed;
inset: 0;
z-index: 20;
background: rgba(15, 23, 42, 0.28);
}
.activity-drawer {
position: fixed;
top: 0;
right: 0;
z-index: 21;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
width: min(520px, 100vw);
height: 100vh;
background: var(--panel);
border-left: 1px solid var(--border);
box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
}
.drawer-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 14px;
padding: 18px;
border-bottom: 1px solid var(--border);
}
.drawer-header h2,
.drawer-header p {
margin: 0;
}
.drawer-header h2 {
font-size: 18px;
}
.drawer-header p {
margin-top: 4px;
color: var(--muted);
font-size: 12px;
}
.icon-button {
display: grid;
place-items: center;
width: 32px;
height: 32px;
border: 0;
border-radius: 7px;
background: #edf2f7;
color: #1f2937;
font-weight: 800;
}
.drawer-tabs {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
padding: 12px 14px;
border-bottom: 1px solid var(--border);
}
.drawer-tab {
border: 0;
border-radius: 7px;
padding: 8px 10px;
background: #edf2f7;
color: #475569;
font-size: 12px;
font-weight: 800;
}
.drawer-tab.active {
background: var(--accent);
color: #ffffff;
}
.drawer-section {
display: none;
min-height: 0;
overflow: auto;
padding: 14px;
}
.drawer-section.active {
display: block;
}
.debug-heading h3 {
margin: 0;
}
.mini-button,
.memory-form button,
.memory-search-row button {
border: 0;
border-radius: 7px;
padding: 7px 9px;
background: #edf2f7;
color: #1f2937;
font-size: 12px;
font-weight: 800;
}
pre,
#events {
margin: 0;
max-height: 170px;
overflow: auto;
color: #334155;
font-size: 12px;
line-height: 1.45;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
#events {
display: grid;
gap: 8px;
padding-left: 18px;
}
#events li strong,
#events li span {
display: block;
}
#events li span {
color: var(--muted);
}
.audit-list,
.memory-list {
display: grid;
gap: 8px;
max-height: none;
overflow: auto;
}
.audit-item,
.memory-item {
display: grid;
gap: 6px;
padding: 9px;
background: #f8fafc;
border: 1px solid #dbe3ee;
border-radius: 8px;
}
.audit-item code {
min-width: 0;
overflow: hidden;
color: #0f172a;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.audit-meta {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.audit-badge {
padding: 2px 7px;
border-radius: 999px;
background: #e2e8f0;
color: #475569;
font-size: 11px;
font-weight: 800;
}
.audit-badge[data-tone="low"],
.audit-badge[data-tone="ok"] {
background: #dcfce7;
color: #166534;
}
.audit-badge[data-tone="medium"],
.audit-badge[data-tone="high"] {
background: #fef3c7;
color: #854d0e;
}
.audit-badge[data-tone="critical"],
.audit-badge[data-tone="bad"] {
background: #fee2e2;
color: #991b1b;
}
.audit-item > span,
.memory-item span,
.compact-empty {
margin: 0;
color: var(--muted);
font-size: 11px;
}
.memory-form,
.memory-search-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
margin-bottom: 8px;
}
.memory-form input,
.memory-search-row input {
min-width: 0;
padding: 8px 9px;
font-size: 12px;
}
.memory-item p {
margin: 0;
color: #0f172a;
font-size: 12px;
line-height: 1.35;
}
.composer {
display: grid;
gap: 10px;
padding: 14px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: var(--shadow);
}
.composer textarea {
min-height: 86px;
resize: vertical;
}
.composer-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
#composer-hint {
color: var(--muted);
font-size: 12px;
}
.composer button {
min-width: 96px;
background: var(--accent);
color: #ffffff;
}
.composer button:hover {
background: var(--accent-strong);
}
.composer button:disabled {
cursor: wait;
opacity: 0.7;
}
[hidden] {
display: none !important;
}
@media (max-width: 860px) {
.app-shell {
grid-template-columns: 1fr;
}
.sidebar {
min-height: auto;
}
.chat-shell {
height: auto;
min-height: 100vh;
}
.chat-header,
.composer-actions {
grid-template-columns: 1fr;
flex-direction: column;
align-items: stretch;
}
}