prompt-analyser/dashboard/styles.css

634 lines
13 KiB
CSS

/* ── Dashboard Design System ───────────────────────────────── */
:root {
--bg-primary: #0a0e1a;
--bg-secondary: #111827;
--bg-card: #1a2235;
--bg-card-hover: #1e2840;
--bg-input: #0f1629;
--border: #2a3452;
--border-hover: #3b4a70;
--text-primary: #f1f5f9;
--text-secondary: #8899b4;
--text-muted: #5a6a85;
--accent-blue: #3b82f6;
--accent-purple: #8b5cf6;
--accent-green: #10b981;
--accent-red: #ef4444;
--accent-amber: #f59e0b;
--accent-cyan: #06b6d4;
--font-sans: 'Inter', -apple-system, sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 16px;
--shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font-sans);
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
line-height: 1.6;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
/* ── Header ────────────────────────────────────────────────── */
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 32px;
border-bottom: 1px solid var(--border);
background: var(--bg-secondary);
position: sticky;
top: 0;
z-index: 50;
}
.header-brand {
display: flex;
align-items: center;
gap: 12px;
}
.brand-icon {
width: 40px;
height: 40px;
border-radius: var(--radius-md);
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.brand-title {
font-size: 18px;
font-weight: 700;
}
.brand-version {
font-size: 11px;
color: var(--text-muted);
}
.header-actions {
display: flex;
gap: 8px;
}
/* ── Buttons ───────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
font-size: 14px;
font-weight: 600;
font-family: var(--font-sans);
border-radius: var(--radius-md);
border: none;
cursor: pointer;
transition: all 0.2s;
text-decoration: none;
}
.btn .material-symbols-outlined {
font-size: 18px;
}
.btn-ghost {
background: transparent;
color: var(--text-secondary);
padding: 8px 16px;
}
.btn-ghost:hover {
background: var(--bg-card);
color: var(--text-primary);
}
.btn-outline {
background: transparent;
color: var(--text-secondary);
border: 1px solid var(--border);
}
.btn-outline:hover {
border-color: var(--text-secondary);
color: var(--text-primary);
}
.btn-outline:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.btn-sm {
padding: 6px 14px;
font-size: 13px;
}
/* ── Main ──────────────────────────────────────────────────── */
.dash-content {
max-width: 1300px;
margin: 0 auto;
padding: 28px 24px 64px;
}
/* ── KPI Cards ─────────────────────────────────────────────── */
.kpi-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
}
.kpi-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 20px;
display: flex;
align-items: center;
gap: 14px;
transition: border-color 0.2s, transform 0.2s;
box-shadow: var(--shadow-card);
}
.kpi-card:hover {
border-color: var(--accent-blue);
transform: translateY(-2px);
}
.kpi-icon {
width: 44px;
height: 44px;
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.kpi-icon .material-symbols-outlined {
font-size: 22px;
color: white;
}
.kpi-blue {
background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.kpi-green {
background: linear-gradient(135deg, #10b981, #059669);
}
.kpi-cyan {
background: linear-gradient(135deg, #06b6d4, #0891b2);
}
.kpi-purple {
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.kpi-amber {
background: linear-gradient(135deg, #f59e0b, #d97706);
}
.kpi-red {
background: linear-gradient(135deg, #ef4444, #dc2626);
}
.kpi-teal {
background: linear-gradient(135deg, #14b8a6, #0d9488);
}
.kpi-orange {
background: linear-gradient(135deg, #f97316, #ea580c);
}
.kpi-value {
font-size: 22px;
font-weight: 800;
line-height: 1.2;
}
.kpi-label {
font-size: 12px;
color: var(--text-secondary);
font-weight: 500;
}
.kpi-hint {
font-size: 10px;
color: var(--text-muted);
margin-top: 2px;
line-height: 1.3;
}
/* ── Charts ────────────────────────────────────────────────── */
.charts-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-top: 24px;
}
.chart-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
overflow: hidden;
}
.chart-header {
padding: 18px 22px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.chart-header h3 {
display: flex;
align-items: center;
gap: 8px;
font-size: 15px;
font-weight: 600;
}
.chart-header h3 .material-symbols-outlined {
font-size: 20px;
color: var(--accent-blue);
}
.trend-filters {
display: flex;
gap: 4px;
}
.filter-btn {
background: var(--bg-input);
border: 1px solid var(--border);
color: var(--text-muted);
font-family: var(--font-sans);
font-size: 11px;
font-weight: 600;
padding: 4px 10px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: all 0.2s;
}
.filter-btn:hover {
border-color: var(--accent-blue);
color: var(--text-primary);
}
.filter-btn.active {
background: var(--accent-blue);
border-color: var(--accent-blue);
color: white;
}
.chart-body {
padding: 16px 22px 22px;
}
.chart-empty {
text-align: center;
color: var(--text-muted);
padding: 40px 20px;
font-size: 14px;
}
/* ── Feed / Table ──────────────────────────────────────────── */
.feed-section,
.leaderboard-section {
margin-top: 24px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
overflow: hidden;
}
.feed-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 22px;
border-bottom: 1px solid var(--border);
}
.feed-header h2 {
display: flex;
align-items: center;
gap: 10px;
font-size: 16px;
font-weight: 600;
}
.feed-header h2 .material-symbols-outlined {
font-size: 20px;
color: var(--accent-blue);
}
.feed-search {
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 8px 14px;
font-family: var(--font-sans);
font-size: 13px;
color: var(--text-primary);
width: 220px;
outline: none;
transition: border-color 0.2s;
}
.feed-search:focus {
border-color: var(--accent-blue);
}
.feed-table-wrap {
overflow-x: auto;
}
.feed-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.feed-table th {
text-align: left;
padding: 12px 16px;
font-weight: 600;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-muted);
background: var(--bg-input);
border-bottom: 1px solid var(--border);
white-space: nowrap;
}
.feed-table td {
padding: 12px 16px;
border-bottom: 1px solid rgba(42, 52, 82, 0.5);
color: var(--text-secondary);
white-space: nowrap;
}
.feed-table tbody tr {
transition: background 0.15s;
}
.feed-table tbody tr:hover {
background: var(--bg-card-hover);
}
.feed-empty {
text-align: center;
padding: 40px !important;
color: var(--text-muted) !important;
white-space: normal !important;
}
/* Score badge in table */
.score-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 999px;
font-weight: 700;
font-size: 12px;
}
.score-badge.excellent {
background: rgba(16, 185, 129, .15);
color: var(--accent-green);
}
.score-badge.good {
background: rgba(59, 130, 246, .15);
color: var(--accent-blue);
}
.score-badge.fair {
background: rgba(245, 158, 11, .15);
color: var(--accent-amber);
}
.score-badge.poor {
background: rgba(239, 68, 68, .15);
color: var(--accent-red);
}
.source-badge {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
}
.view-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--accent-blue);
font-size: 12px;
padding: 4px 10px;
border-radius: var(--radius-sm);
cursor: pointer;
font-family: var(--font-sans);
transition: all 0.2s;
}
.view-btn:hover {
background: var(--accent-blue);
color: white;
}
.feed-pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 16px;
padding: 16px;
border-top: 1px solid var(--border);
}
.page-info {
font-size: 13px;
color: var(--text-muted);
}
/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
backdrop-filter: blur(4px);
}
.modal-content {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
width: 90%;
max-width: 800px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 24px;
border-bottom: 1px solid var(--border);
}
.modal-header h3 {
font-size: 16px;
}
.modal-body {
padding: 24px;
}
.modal-scores {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 12px;
margin-bottom: 20px;
}
.modal-score-item {
text-align: center;
padding: 12px;
background: var(--bg-input);
border-radius: var(--radius-md);
}
.modal-score-item .score-val {
font-size: 24px;
font-weight: 800;
display: block;
}
.modal-score-item .score-name {
font-size: 11px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.modal-prompt-section {
margin-top: 16px;
}
.modal-prompt-label {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 6px;
}
.modal-prompt-text {
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 14px;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.7;
white-space: pre-wrap;
word-break: break-word;
max-height: 200px;
overflow-y: auto;
}
/* ── Utilities ─────────────────────────────────────────────── */
.hidden {
display: none !important;
}
/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
.kpi-grid {
grid-template-columns: repeat(3, 1fr);
}
.trend-filters {
flex-wrap: wrap;
}
}
@media (max-width: 768px) {
.header {
padding: 12px 16px;
}
.dash-content {
padding: 16px 12px 48px;
}
.kpi-grid {
grid-template-columns: repeat(2, 1fr);
}
.charts-row {
grid-template-columns: 1fr;
}
.modal-scores {
grid-template-columns: repeat(3, 1fr);
}
}