stock-ai-agent/frontend/css/style.css
2026-04-22 11:03:24 +08:00

581 lines
12 KiB
CSS

/* ========================================
XClaw Console Theme
======================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
:root {
/* Console core palette */
--bg: #08111a;
--bg-elevated: #0d1823;
--panel: rgba(11, 21, 32, 0.86);
--panel-strong: rgba(8, 18, 28, 0.96);
--panel-soft: rgba(16, 28, 41, 0.74);
--line: rgba(128, 169, 202, 0.18);
--line-strong: rgba(128, 169, 202, 0.32);
--text: #edf6ff;
--muted: #8ea6bc;
--cold: #7ec8ff;
--accent: #9cff57;
--warn: #ffb84d;
--danger: #ff6f61;
--good: #30d158;
--shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
--shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.24);
--glow-cold: 0 0 0 1px rgba(126, 200, 255, 0.2), 0 14px 38px rgba(18, 51, 78, 0.3);
/* Compatibility mapping */
--primary: var(--cold);
--primary-light: rgba(126, 200, 255, 0.14);
--primary-dark: #4eaef2;
--bg-primary: rgba(11, 21, 32, 0.86);
--bg-secondary: rgba(16, 28, 41, 0.72);
--bg-tertiary: rgba(26, 41, 58, 0.86);
--text-primary: var(--text);
--text-secondary: var(--muted);
--text-tertiary: #6f8598;
--success: var(--good);
--success-light: rgba(48, 209, 88, 0.14);
--error: var(--danger);
--error-light: rgba(255, 111, 97, 0.14);
--warning: var(--warn);
--warning-light: rgba(255, 184, 77, 0.14);
--info: var(--cold);
--info-light: rgba(126, 200, 255, 0.14);
--border: var(--line);
--border-light: rgba(128, 169, 202, 0.1);
--shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.18);
--shadow-md: var(--shadow-soft);
--shadow-lg: var(--shadow);
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
--space-2xl: 48px;
--radius-sm: 10px;
--radius-md: 16px;
--radius-lg: 22px;
--radius-xl: 28px;
--font-xs: 11px;
--font-sm: 13px;
--font-base: 14px;
--font-md: 16px;
--font-lg: 18px;
--font-xl: 24px;
--font-2xl: 30px;
--font-3xl: 38px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
min-height: 100%;
}
html {
background:
radial-gradient(circle at top left, rgba(64, 127, 255, 0.16), transparent 28%),
radial-gradient(circle at top right, rgba(156, 255, 87, 0.12), transparent 22%),
linear-gradient(180deg, #071018 0%, #08111a 48%, #050b11 100%);
}
body {
font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
background: transparent;
color: var(--text-primary);
font-size: var(--font-base);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: relative;
}
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background-image:
linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
background-size: 28px 28px;
mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.92));
}
#app {
min-height: 100vh;
position: relative;
z-index: 1;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
line-height: 1.2;
color: var(--text-primary);
letter-spacing: -0.02em;
}
h1 { font-size: var(--font-3xl); }
h2 { font-size: var(--font-2xl); }
h3 { font-size: var(--font-xl); }
a {
color: var(--primary);
text-decoration: none;
transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
color: var(--primary-dark);
}
button,
input,
select,
textarea {
font: inherit;
}
code,
pre,
.mono {
font-family: "IBM Plex Mono", monospace;
}
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 600; }
.font-semibold { font-weight: 500; }
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 42px;
padding: 10px 18px;
border-radius: 14px;
border: 1px solid transparent;
background: rgba(126, 200, 255, 0.1);
color: var(--text-primary);
cursor: pointer;
transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.02em;
backdrop-filter: blur(14px);
}
.btn:hover:not(:disabled) {
transform: translateY(-1px);
border-color: rgba(126, 200, 255, 0.24);
box-shadow: var(--shadow-sm);
}
.btn:disabled {
opacity: 0.48;
cursor: not-allowed;
}
.btn-primary {
background: linear-gradient(135deg, #8fd7ff, #63e6be);
color: #071018;
border-color: rgba(126, 200, 255, 0.34);
box-shadow: 0 10px 30px rgba(49, 132, 189, 0.22);
}
.btn-primary:hover:not(:disabled) {
background: linear-gradient(135deg, #9ce0ff, #7aeecb);
}
.btn-secondary {
background: rgba(126, 200, 255, 0.08);
border-color: var(--border);
color: var(--primary);
}
.btn-secondary:hover:not(:disabled) {
background: rgba(126, 200, 255, 0.14);
}
.btn-danger {
background: rgba(255, 111, 97, 0.12);
color: var(--error);
border-color: rgba(255, 111, 97, 0.22);
}
.btn-danger:hover:not(:disabled) {
background: rgba(255, 111, 97, 0.18);
}
.btn-success {
background: rgba(48, 209, 88, 0.12);
color: var(--success);
border-color: rgba(48, 209, 88, 0.2);
}
.btn-success:hover:not(:disabled) {
background: rgba(48, 209, 88, 0.18);
}
.btn-small {
min-height: 34px;
padding: 6px 12px;
font-size: 12px;
border-radius: 12px;
}
.card,
.table-container {
position: relative;
overflow: hidden;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
backdrop-filter: blur(16px);
}
.card::after,
.table-container::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 22%, transparent 72%, rgba(158, 214, 255, 0.04));
}
.card {
padding: 20px;
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
transform: translateY(-1px);
border-color: var(--line-strong);
box-shadow: var(--shadow);
}
.badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 12px;
border-radius: 999px;
border: 1px solid transparent;
font-size: 12px;
font-weight: 600;
}
.badge-success {
background: var(--success-light);
color: var(--success);
border-color: rgba(48, 209, 88, 0.2);
}
.badge-error {
background: var(--error-light);
color: var(--error);
border-color: rgba(255, 111, 97, 0.22);
}
.badge-warning {
background: var(--warning-light);
color: var(--warning);
border-color: rgba(255, 184, 77, 0.22);
}
.badge-info {
background: var(--info-light);
color: var(--info);
border-color: rgba(126, 200, 255, 0.22);
}
.badge-neutral {
background: rgba(128, 169, 202, 0.12);
color: var(--text-secondary);
border-color: var(--border);
}
table {
width: 100%;
border-collapse: collapse;
}
th {
background: rgba(20, 34, 48, 0.92);
padding: 14px 16px;
text-align: left;
font-size: 11px;
font-weight: 600;
color: var(--text-secondary);
border-bottom: 1px solid var(--border);
text-transform: uppercase;
letter-spacing: 0.08em;
}
td {
padding: 14px 16px;
font-size: 13px;
color: var(--text-primary);
border-bottom: 1px solid var(--border);
}
tr:last-child td {
border-bottom: none;
}
tr:hover {
background: rgba(126, 200, 255, 0.05);
}
.input,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="search"],
select,
textarea {
width: 100%;
padding: 12px 16px;
background: rgba(10, 20, 31, 0.78);
border: 1px solid var(--border);
border-radius: 14px;
color: var(--text-primary);
transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
backdrop-filter: blur(10px);
}
.input::placeholder,
input::placeholder,
textarea::placeholder {
color: var(--text-tertiary);
}
.input:focus,
input:focus,
select:focus,
textarea:focus {
outline: none;
border-color: rgba(126, 200, 255, 0.34);
box-shadow: 0 0 0 3px rgba(126, 200, 255, 0.12);
background: rgba(12, 24, 36, 0.9);
}
.spinner {
display: inline-block;
width: 32px;
height: 32px;
border: 3px solid rgba(128, 169, 202, 0.14);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.container {
width: min(1440px, calc(100vw - 32px));
margin: 0 auto;
padding: 24px 0 40px;
position: relative;
z-index: 1;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
margin-bottom: 24px;
padding: 22px 24px;
background: var(--panel-strong);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
backdrop-filter: blur(18px);
}
.page-title {
display: flex;
align-items: center;
gap: 12px;
font-size: clamp(28px, 4vw, 40px);
font-weight: 700;
letter-spacing: -0.04em;
color: var(--text-primary);
}
.page-subtitle {
margin-top: 6px;
color: var(--text-secondary);
font-size: 14px;
line-height: 1.6;
}
.grid {
display: grid;
gap: 16px;
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-auto-fit {
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tabs {
display: flex;
gap: 8px;
margin-bottom: 24px;
padding: 8px;
background: rgba(10, 20, 31, 0.72);
border: 1px solid var(--border);
border-radius: 18px;
overflow-x: auto;
}
.tab {
padding: 12px 18px;
background: transparent;
border: 1px solid transparent;
border-radius: 12px;
color: var(--text-secondary);
font-size: 13px;
font-weight: 600;
cursor: pointer;
white-space: nowrap;
transition: all 0.2s ease;
}
.tab:hover {
color: var(--text-primary);
background: rgba(126, 200, 255, 0.08);
}
.tab.active {
color: #071018;
background: linear-gradient(135deg, #8fd7ff, #63e6be);
border-color: rgba(126, 200, 255, 0.26);
box-shadow: 0 8px 20px rgba(49, 132, 189, 0.24);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: rgba(8, 18, 28, 0.82);
}
::-webkit-scrollbar-thumb {
background: rgba(128, 169, 202, 0.26);
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(128, 169, 202, 0.42);
}
::selection {
background: rgba(126, 200, 255, 0.22);
color: var(--text-primary);
}
:focus-visible {
outline: 2px solid rgba(126, 200, 255, 0.52);
outline-offset: 2px;
}
@media (max-width: 768px) {
:root {
--font-xl: 20px;
--font-2xl: 24px;
--font-3xl: 30px;
--radius-md: 14px;
--radius-lg: 18px;
}
.container {
width: min(100vw - 20px, 100%);
padding: 16px 0 28px;
}
.page-header {
flex-direction: column;
align-items: flex-start;
padding: 18px;
}
.grid-cols-2,
.grid-cols-3,
.grid-cols-4 {
grid-template-columns: 1fr;
}
.table-container {
overflow-x: auto;
}
table {
min-width: 720px;
}
}
@media (max-width: 480px) {
.container {
width: min(100vw - 16px, 100%);
}
.page-header {
border-radius: 16px;
}
.page-title {
font-size: 26px;
}
}