NetWokie-AI / dashboard /style.css
KaustavMP
Publish clean source-only NetWokie-AI snapshot
1336f19
Raw History Blame Contribute Delete
11.9 kB
:root {
--bg-main: #0b0e14;
--bg-card: rgba(20, 25, 33, 0.7);
--bg-sidebar: #10141d;
--text-main: #e2e8f0;
--text-muted: #94a3b8;
--accent: #3b82f6;
--accent-glow: rgba(59, 130, 246, 0.4);
--success: #10b981;
--warning: #f59e0b;
--danger: #ef4444;
--border: rgba(255, 255, 255, 0.08);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', sans-serif;
}
body {
background-color: var(--bg-main);
color: var(--text-main);
display: flex;
min-height: 100vh;
overflow: hidden;
}
/* Sidebar */
.sidebar {
width: 250px;
background-color: var(--bg-sidebar);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 24px;
}
.logo {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 40px;
}
.logo-icon {
width: 24px;
height: 24px;
background: linear-gradient(135deg, var(--accent), #8b5cf6);
border-radius: 6px;
box-shadow: 0 0 10px var(--accent-glow);
}
.logo h2 {
font-size: 1.25rem;
font-weight: 600;
background: linear-gradient(to right, #fff, #94a3b8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.nav {
list-style: none;
flex: 1;
}
.nav li {
padding: 12px 16px;
color: var(--text-muted);
border-radius: 8px;
cursor: pointer;
margin-bottom: 8px;
transition: all 0.2s;
font-weight: 500;
}
.nav li:hover {
color: var(--text-main);
background-color: rgba(255, 255, 255, 0.05);
}
.nav li.active {
background-color: rgba(59, 130, 246, 0.1);
color: var(--accent);
border-left: 3px solid var(--accent);
}
.nav-footer {
font-size: 0.8rem;
color: var(--text-muted);
text-align: center;
padding: 12px;
background: rgba(255, 255, 255, 0.03);
border-radius: 8px;
}
/* Main Content */
.main-content {
flex: 1;
overflow-y: auto;
padding: 32px 40px;
min-width: 0;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
}
header h1 {
font-size: 1.75rem;
font-weight: 600;
}
.status-indicator {
display: flex;
align-items: center;
gap: 8px;
background: rgba(16, 185, 129, 0.1);
color: var(--success);
padding: 6px 16px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.dot {
width: 8px;
height: 8px;
background-color: var(--success);
border-radius: 50%;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}
70% {
box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
/* Cards */
.grid-cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
margin-bottom: 24px;
min-width: 0;
}
.card {
background: var(--bg-card);
backdrop-filter: blur(10px);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.card h3 {
font-size: 0.95rem;
color: var(--text-muted);
margin-bottom: 16px;
font-weight: 500;
}
/* Health Card */
.health-score {
font-size: 3rem;
font-weight: 700;
line-height: 1;
margin-bottom: 8px;
}
.health-score .total {
font-size: 1.25rem;
color: var(--text-muted);
font-weight: 500;
}
.status-good {
color: var(--success);
}
.status-warning {
color: var(--warning);
}
.status-critical {
color: var(--danger);
}
.progress-bar {
height: 6px;
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
margin-top: 16px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--success), #34d399);
border-radius: 3px;
transition: width 1s ease-in-out;
}
/* AI Card */
.risk-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 6px;
font-size: 0.8rem;
font-weight: 600;
margin-bottom: 12px;
background: rgba(59, 130, 246, 0.1);
color: var(--accent);
}
.risk-Low {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
}
.risk-Medium {
background: rgba(245, 158, 11, 0.1);
color: var(--warning);
}
.risk-High,
.risk-Critical {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
}
.explanation {
font-size: 0.9rem;
line-height: 1.5;
margin-bottom: 16px;
color: #cbd5e1;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.action-box {
background: rgba(255, 255, 255, 0.03);
padding: 12px;
border-radius: 8px;
font-size: 0.85rem;
margin-bottom: 16px;
}
.btn-primary {
width: 100%;
background: var(--accent);
color: #fff;
border: none;
padding: 10px;
border-radius: 8px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover {
background: #2563eb;
}
/* Stats Card */
.stat-row {
display: flex;
justify-content: space-between;
height: 100%;
align-items: center;
}
.stat-val {
font-size: 2.5rem;
font-weight: 700;
}
.text-red {
color: var(--danger);
}
/* Chart and Table */
.grid-content {
display: grid;
grid-template-columns: 2fr 3fr;
gap: 24px;
min-width: 0;
}
.chart-container {
height: 250px;
width: 100%;
}
.table-container {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
table {
width: 100%;
border-collapse: collapse;
}
th {
text-align: left;
padding: 12px 16px;
color: var(--text-muted);
font-weight: 500;
font-size: 0.85rem;
border-bottom: 1px solid var(--border);
}
td {
padding: 14px 16px;
font-size: 0.9rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
tbody tr:hover {
background: rgba(255, 255, 255, 0.02);
}
.badge {
padding: 4px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
.badge-normal {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
}
.badge-suspicious {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
}
/* Loader */
.loader {
border: 3px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
border-top: 3px solid var(--accent);
width: 24px;
height: 24px;
animation: spin 1s linear infinite;
margin: 20px auto;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* --- NEW VIEWS AND TABS --- */
/* View Sections */
.view-section {
display: none;
animation: fadeIn 0.3s ease-in-out;
}
.view-section.active {
display: block;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}
/* Alerts View */
.alert-list {
list-style: none;
margin-top: 10px;
}
.alert-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
margin-bottom: 12px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.02);
border-left: 4px solid var(--accent);
transition: background 0.2s;
}
.alert-item:hover {
background: rgba(255, 255, 255, 0.04);
}
.alert-item.risk-High {
border-left-color: var(--danger);
}
.alert-item.risk-Medium {
border-left-color: var(--warning);
}
.alert-item.risk-Low {
border-left-color: var(--success);
}
.alert-time {
font-size: 0.8rem;
color: var(--text-muted);
}
.alert-subtext {
margin-top: 4px;
color: var(--text-muted);
font-size: 0.85rem;
}
/* Devices View */
.device-card {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.device-empty {
min-height: 220px;
justify-content: center;
}
.device-card p {
margin-bottom: 8px;
font-size: 0.9rem;
color: var(--text-muted);
}
.device-card h3 {
color: var(--text-main);
font-size: 1.1rem;
margin-bottom: 8px;
}
.device-icon {
font-size: 3rem;
margin-bottom: 15px;
}
/* Settings View */
.settings-card {
max-width: 800px;
}
.setting-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.setting-row h3 {
margin-bottom: 4px;
color: var(--text-main);
font-size: 1.05rem;
}
.settings-select {
background: rgba(0, 0, 0, 0.2);
border: 1px solid var(--border);
color: var(--text-main);
padding: 10px 16px;
border-radius: 8px;
font-size: 0.9rem;
outline: none;
cursor: pointer;
}
.settings-select:focus {
border-color: var(--accent);
}
/* Toggle Switch */
.switch {
position: relative;
display: inline-block;
width: 50px;
height: 24px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(255, 255, 255, 0.1);
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
}
input:checked + .slider {
background-color: var(--accent);
}
input:checked + .slider:before {
transform: translateX(26px);
}
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
@media (max-width: 720px) {
body {
flex-direction: column;
height: auto;
min-height: 100vh;
overflow-x: hidden;
overflow-y: auto;
}
.sidebar {
width: 100%;
flex-direction: column;
gap: 12px;
padding: 14px 16px;
border-right: none;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 50;
backdrop-filter: blur(12px);
background: rgba(16, 20, 29, 0.96);
}
.logo {
margin-bottom: 0;
}
.logo h2 {
font-size: 1rem;
}
.nav {
display: flex;
flex: initial;
gap: 8px;
overflow-x: auto;
padding-bottom: 2px;
scrollbar-width: none;
}
.nav::-webkit-scrollbar {
display: none;
}
.nav li {
flex: 0 0 auto;
margin-bottom: 0;
padding: 10px 12px;
white-space: nowrap;
font-size: 0.9rem;
}
.nav li.active {
border-left: none;
border-bottom: 3px solid var(--accent);
}
.nav-footer {
display: none;
}
.main-content {
padding: 14px 14px 24px;
overflow-y: visible;
}
header {
flex-direction: column;
align-items: flex-start;
gap: 12px;
margin-bottom: 20px;
}
header h1 {
font-size: 1.35rem;
}
.status-indicator {
width: 100%;
justify-content: flex-start;
}
.grid-cards,
.grid-content {
grid-template-columns: 1fr;
gap: 14px;
margin-bottom: 14px;
}
.card {
padding: 16px;
border-radius: 14px;
}
.health-score {
font-size: 2.3rem;
}
.stat-row {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.stat-val {
font-size: 2rem;
}
.chart-container {
height: 200px;
}
.alert-item {
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.setting-row {
flex-direction: column;
align-items: stretch;
gap: 12px;
}
.settings-select {
width: 100%;
}
table th,
table td {
padding: 10px 12px;
white-space: nowrap;
}
.device-empty {
min-height: 180px;
}
}