308 lines
9.2 KiB
CSS
308 lines
9.2 KiB
CSS
/* GuardDog Nexus — Web UI styles */
|
|
|
|
html { color-scheme: dark; }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Status / severity colours */
|
|
/* ------------------------------------------------------------------ */
|
|
.flagged { color: #e04040; font-weight: bold; }
|
|
.clean { color: #4caf50; }
|
|
|
|
.status-pending { color: #f0c000; }
|
|
.status-scanning { color: #2196f3; animation: pulse 1.5s ease-in-out infinite; }
|
|
.status-completed { color: #4caf50; }
|
|
.status-failed { color: #e04040; }
|
|
|
|
.severity-WARNING { color: #f0c000; }
|
|
.severity-ERROR { color: #e04040; }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Dashboard blocks */
|
|
/* ------------------------------------------------------------------ */
|
|
|
|
.dash-block {
|
|
padding: 1rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dash-block h3 {
|
|
margin-top: 0;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.dash-block-warn {
|
|
border-left: 3px solid #e04040;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Tables */
|
|
/* ------------------------------------------------------------------ */
|
|
table { font-size: 0.9rem; touch-action: manipulation; }
|
|
table.compact { font-size: 0.82rem; }
|
|
table.compact th,
|
|
table.compact td { padding: 0.35rem 0.5rem; }
|
|
table td:first-child { font-variant-numeric: tabular-nums; }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.spinner { animation: none; }
|
|
.status-scanning { animation: none; }
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
table { display: block; overflow-x: auto; white-space: nowrap; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Scan info block (detail page) */
|
|
/* ------------------------------------------------------------------ */
|
|
.scan-info-block {
|
|
padding: 1.25rem 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
background: var(--pico-card-background-color);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.scan-info-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 0.6rem 1.5rem;
|
|
}
|
|
|
|
.sha256 {
|
|
font-size: 0.72rem;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.scan-error {
|
|
margin-top: 0.75rem;
|
|
padding: 0.5rem 0.75rem;
|
|
background: rgba(224, 64, 64, 0.1);
|
|
border-left: 3px solid #e04040;
|
|
border-radius: 4px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Finding blocks (replaces accordion details/summary) */
|
|
/* ------------------------------------------------------------------ */
|
|
.finding-block {
|
|
margin-bottom: 1rem;
|
|
border: 1px solid #202632 !important;
|
|
border-left: 3px solid #2a3140 !important;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.finding-block.finding-warning { border-left-color: #f0c000 !important; }
|
|
.finding-block.finding-error { border-left-color: #e04040 !important; }
|
|
|
|
.finding-summary {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.6rem 0.85rem;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
font-size: 0.9rem;
|
|
border-bottom: 1px solid #202632;
|
|
}
|
|
|
|
.finding-body {
|
|
padding: 0.85rem 1rem;
|
|
}
|
|
|
|
.finding-body > p:first-child {
|
|
margin-bottom: 0.6rem;
|
|
padding-bottom: 0.6rem;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.finding-body pre {
|
|
background: #141924;
|
|
padding: 0.5rem;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
font-size: 0.8rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* LLM report — verdict-based colour scheme */
|
|
/* ------------------------------------------------------------------ */
|
|
.llm-report {
|
|
margin-top: 0.75rem;
|
|
padding: 0.8rem 1rem;
|
|
border-radius: 6px;
|
|
font-size: 0.85rem;
|
|
line-height: 1.55;
|
|
border-left: 4px solid #2a3140;
|
|
background: #1a1f2b;
|
|
}
|
|
|
|
.llm-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.llm-badge {
|
|
display: inline-block;
|
|
padding: 0.1rem 0.5rem;
|
|
border-radius: 3px;
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.llm-badge-safe { background: #1a5c2a; color: #4ade80; }
|
|
.llm-badge-suspicious { background: #5c4a1a; color: #facc15; }
|
|
.llm-badge-malicious { background: #5c1a1a; color: #f87171; }
|
|
|
|
.llm-safe { border-left-color: #4caf50; background: rgba(74,222,128,0.06); }
|
|
.llm-suspicious { border-left-color: #f0c000; background: rgba(250,204,21,0.06); }
|
|
.llm-malicious { border-left-color: #e04040; background: rgba(248,113,113,0.08); }
|
|
|
|
.llm-severity {
|
|
font-size: 0.72rem;
|
|
opacity: 0.6;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.llm-summary {
|
|
font-style: italic;
|
|
margin-bottom: 0.4rem;
|
|
color: #c2c7d0;
|
|
}
|
|
|
|
.llm-analysis {
|
|
margin-bottom: 0;
|
|
white-space: pre-line;
|
|
}
|
|
|
|
.llm-actions { margin-top: 0.5rem; }
|
|
.llm-actions button { font-size: 0.8rem; }
|
|
|
|
.llm-retry {
|
|
margin-left: auto;
|
|
font-size: 0.7rem;
|
|
opacity: 0.5;
|
|
cursor: pointer;
|
|
border: none;
|
|
border-bottom: 1px dashed;
|
|
background: none;
|
|
padding: 0;
|
|
color: inherit;
|
|
}
|
|
.llm-retry:hover { opacity: 0.8; }
|
|
.llm-retry:focus-visible { outline: 2px solid #2196f3; outline-offset: 2px; }
|
|
|
|
.llm-disclaimer {
|
|
margin-top: 0.6rem;
|
|
font-size: 0.72rem;
|
|
opacity: 0.5;
|
|
font-style: italic;
|
|
border-top: 1px solid #202632;
|
|
padding-top: 0.4rem;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Shared controls */
|
|
/* ------------------------------------------------------------------ */
|
|
.code-toolbar {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.copy-btn {
|
|
cursor: pointer;
|
|
background: none;
|
|
border: 1px solid #2a3140;
|
|
padding: 0.15rem 0.5rem;
|
|
font-size: 0.7rem;
|
|
border-radius: 3px;
|
|
color: #c2c7d0;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.copy-btn:hover { background: #202632; }
|
|
.copy-btn.copied { color: #4caf50; border-color: #4caf50; }
|
|
|
|
.htmx-indicator { display: inline; }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Nav / breadcrumbs / empty state */
|
|
/* ------------------------------------------------------------------ */
|
|
nav { margin-bottom: 1rem; }
|
|
nav.sticky { position: sticky; top: 0; z-index: 100; background: #13171f; padding: 0.5rem 0; border-bottom: 1px solid #2a3140; }
|
|
|
|
.breadcrumbs { margin-bottom: 1rem; font-size: 0.85rem; opacity: 0.7; }
|
|
.breadcrumbs a { text-decoration: none; }
|
|
.breadcrumbs .separator { margin: 0 0.5rem; opacity: 0.5; }
|
|
|
|
.empty-state { text-align: center; padding: 2rem 1rem; opacity: 0.5; font-style: italic; }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Filter bar / sortable cols */
|
|
/* ------------------------------------------------------------------ */
|
|
.filter-bar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.filter-bar input[type="text"],
|
|
.filter-bar select { margin-bottom: 0; }
|
|
|
|
th.sortable { cursor: pointer; user-select: none; }
|
|
th.sortable:hover { background: #202632; }
|
|
|
|
thead th { font-size: 0.9rem !important; font-weight: 600 !important; padding: 10px 14px !important; text-align: center !important; background: transparent !important; color: inherit !important; border: none !important; border-bottom: 3px solid #202632 !important; }
|
|
th.sortable .sort-icon { margin-left: 0.25rem; opacity: 1; }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Spinner / animations */
|
|
/* ------------------------------------------------------------------ */
|
|
.spinner {
|
|
display: inline-block;
|
|
width: 12px;
|
|
height: 12px;
|
|
border: 2px solid #2196f3;
|
|
border-top-color: transparent;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
margin-right: 0.25rem;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Responsive */
|
|
/* ------------------------------------------------------------------ */
|
|
@media (max-width: 768px) {
|
|
.scan-info-grid { grid-template-columns: 1fr 1fr; }
|
|
.filter-bar { flex-direction: column; align-items: stretch; }
|
|
nav ul { flex-wrap: wrap; }
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.scan-info-grid { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Print */
|
|
/* ------------------------------------------------------------------ */
|
|
@media print {
|
|
nav, .filter-bar, .copy-btn, nav.sticky,
|
|
.llm-actions, .breadcrumbs { display: none !important; }
|
|
body { background: white; color: black; }
|
|
.llm-report { border: 1px solid #ccc; background: none; }
|
|
}
|