Files
AIcreat/app/static/style.css
2026-04-06 14:20:53 +08:00

299 lines
4.4 KiB
CSS

:root {
--bg: #f3f7f5;
--panel: #ffffff;
--line: #d7e3dd;
--text: #1a3128;
--muted: #5e7a6f;
--accent: #18794e;
--accent-2: #0f5f3d;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: radial-gradient(circle at 10% 20%, #e6f4ec, transparent 35%),
radial-gradient(circle at 90% 80%, #dff0ff, transparent 30%),
var(--bg);
color: var(--text);
font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.topbar {
max-width: 1280px;
margin: 20px auto 0;
padding: 0 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.brand h1 {
margin: 0;
}
.brand .muted {
margin: 6px 0 0;
}
.backend-config {
margin: 8px 0 0;
line-height: 1.5;
}
.badge {
font-size: 12px;
font-weight: 700;
color: #0f5f3d;
background: #eaf7f0;
border: 1px solid #cde6d7;
padding: 5px 10px;
border-radius: 999px;
}
.layout {
max-width: 1280px;
margin: 14px auto 24px;
padding: 0 16px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 14px;
padding: 18px;
box-shadow: 0 8px 24px rgba(32, 84, 55, 0.07);
}
h1,
h2 {
margin-top: 0;
}
.muted {
color: var(--muted);
margin-top: -6px;
}
label {
display: block;
margin-top: 10px;
margin-bottom: 6px;
font-size: 14px;
font-weight: 600;
}
.field-head {
display: flex;
justify-content: space-between;
align-items: baseline;
}
.meta {
color: var(--muted);
font-size: 12px;
}
input,
textarea,
button {
width: 100%;
border-radius: 10px;
border: 1px solid var(--line);
padding: 10px 12px;
font-size: 14px;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
textarea {
resize: vertical;
line-height: 1.5;
}
input:focus,
textarea:focus {
outline: none;
border-color: #8ec6aa;
box-shadow: 0 0 0 3px rgba(24, 121, 78, 0.12);
}
button {
cursor: pointer;
margin-top: 12px;
font-weight: 700;
}
button:hover {
filter: brightness(0.98);
}
button.primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
button.primary:hover {
background: var(--accent-2);
}
button:disabled {
cursor: not-allowed;
opacity: 0.65;
}
.actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.grid2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.status {
min-height: 22px;
margin-top: 8px;
color: var(--accent-2);
font-weight: 600;
}
.small {
font-size: 13px;
margin: 0 0 12px;
}
.flow-hint {
margin: 0 0 14px 18px;
padding: 0;
font-size: 13px;
line-height: 1.6;
}
.trace-wrap {
margin-top: 12px;
padding: 10px 12px;
border: 1px dashed var(--line);
border-radius: 10px;
background: #f9fbf9;
}
.trace-wrap summary {
cursor: pointer;
font-weight: 700;
color: var(--text);
}
.trace-badge {
margin-left: 8px;
font-size: 11px;
padding: 2px 8px;
border-radius: 999px;
font-weight: 700;
}
.trace-badge.is-ai {
background: #eaf7f0;
color: #0f5f3d;
border: 1px solid #cde6d7;
}
.trace-badge.is-fallback {
background: #fff4e6;
color: #9a3412;
border: 1px solid #fed7aa;
}
.body-split {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
align-items: stretch;
}
.body-split textarea {
min-height: 280px;
}
.preview-panel {
display: flex;
flex-direction: column;
min-width: 0;
}
.markdown-preview {
flex: 1;
min-height: 280px;
max-height: 480px;
overflow: auto;
padding: 12px 14px;
border: 1px solid var(--line);
border-radius: 10px;
background: #fafcfb;
font-size: 14px;
line-height: 1.65;
}
.markdown-preview h2 {
font-size: 1.15rem;
margin: 1em 0 0.5em;
color: var(--accent-2);
}
.markdown-preview h3 {
font-size: 1.05rem;
margin: 0.9em 0 0.4em;
}
.markdown-preview p {
margin: 0.5em 0;
}
.markdown-preview ul,
.markdown-preview ol {
margin: 0.4em 0 0.6em 1.2em;
padding: 0;
}
.markdown-preview li {
margin: 0.25em 0;
}
.trace-json {
margin: 10px 0 0;
padding: 10px;
max-height: 220px;
overflow: auto;
font-size: 11px;
line-height: 1.45;
background: #fff;
border-radius: 8px;
border: 1px solid var(--line);
white-space: pre-wrap;
word-break: break-word;
}
@media (max-width: 960px) {
.layout {
grid-template-columns: 1fr;
}
.body-split {
grid-template-columns: 1fr;
}
.topbar {
align-items: flex-start;
gap: 8px;
flex-direction: column;
}
}