mirror of
https://github.com/This-weiyuqing/mi-fitness-health.git
synced 2026-10-18 11:13:48 +08:00
- REST API (FastAPI): all data endpoints, sync (foreground/background), coverage stats, interactive docs at /docs - API key system: exchange Xiaomi credentials for mif_sk_* keys (multi-account contexts, last-used tracking, prefix revocation); static key via MI_FITNESS_API_KEY, admin endpoints via MI_FITNESS_ADMIN_KEY - QR code login: reverse-engineered Xiaomi universal QR flow (sid=xiaomiio), auto-issues API key after scan confirmation - Built-in web dashboard (Flask): visual console for all endpoints, key management, QR login; reverse proxy with server-side key relay - Standalone testpage/ console (python app.py, no install needed) - Fix: pin mcp<2 (SDK 2.x removed Server.list_tools, broke startup) - CI: install [all,dev] extras; docs: full technical documentation and QR login implementation guide
1746 lines
39 KiB
CSS
1746 lines
39 KiB
CSS
/**
|
|
* Mi Fitness Dashboard & Developer Console Design System
|
|
* Modern Glassmorphism & High-Density Health Analytics UI
|
|
* Designed for Mi Fitness MCP CN
|
|
*/
|
|
|
|
/* ==========================================================================
|
|
1. Design Tokens & CSS Custom Properties
|
|
========================================================================== */
|
|
|
|
:root {
|
|
/* Color Palette - Dark Mode (Default) */
|
|
--bg-base: #090d16;
|
|
--bg-gradient: radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
|
|
radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
|
|
#090d16;
|
|
--bg-surface: rgba(17, 24, 39, 0.72);
|
|
--bg-surface-hover: rgba(30, 41, 59, 0.85);
|
|
--bg-surface-active: rgba(51, 65, 85, 0.9);
|
|
--bg-card: rgba(15, 23, 42, 0.65);
|
|
--bg-card-hover: rgba(30, 41, 59, 0.75);
|
|
--bg-input: rgba(11, 18, 32, 0.85);
|
|
--bg-input-focus: rgba(15, 23, 42, 0.95);
|
|
--bg-code: #070b12;
|
|
--bg-modal-overlay: rgba(0, 0, 0, 0.75);
|
|
|
|
/* Borders & Dividers */
|
|
--border-subtle: rgba(255, 255, 255, 0.06);
|
|
--border-default: rgba(255, 255, 255, 0.1);
|
|
--border-active: rgba(56, 189, 248, 0.4);
|
|
--border-focus: #38bdf8;
|
|
|
|
/* Typography Colors */
|
|
--text-primary: #f8fafc;
|
|
--text-secondary: #cbd5e1;
|
|
--text-muted: #94a3b8;
|
|
--text-dim: #64748b;
|
|
--text-inverted: #0f172a;
|
|
|
|
/* Brand & Accent Colors */
|
|
--accent-cyan: #38bdf8;
|
|
--accent-cyan-glow: rgba(56, 189, 248, 0.35);
|
|
--accent-indigo: #818cf8;
|
|
--accent-indigo-glow: rgba(129, 140, 248, 0.35);
|
|
--accent-purple: #a855f7;
|
|
--accent-emerald: #10b981;
|
|
--accent-rose: #f43f5e;
|
|
--accent-amber: #f59e0b;
|
|
--accent-teal: #14b8a6;
|
|
--accent-pink: #ec4899;
|
|
|
|
/* Status Colors */
|
|
--status-success: #10b981;
|
|
--status-success-bg: rgba(16, 185, 129, 0.15);
|
|
--status-warning: #f59e0b;
|
|
--status-warning-bg: rgba(245, 158, 11, 0.15);
|
|
--status-error: #ef4444;
|
|
--status-error-bg: rgba(239, 68, 68, 0.15);
|
|
--status-info: #38bdf8;
|
|
--status-info-bg: rgba(56, 189, 248, 0.15);
|
|
|
|
/* Shadows & Elevation */
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
|
|
--shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
|
|
--shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
|
|
--shadow-glow: 0 0 20px -2px var(--accent-cyan-glow);
|
|
--shadow-glow-indigo: 0 0 20px -2px var(--accent-indigo-glow);
|
|
|
|
/* Glassmorphism & Blurs */
|
|
--backdrop-blur: blur(16px);
|
|
--backdrop-blur-sm: blur(8px);
|
|
|
|
/* Transitions & Animation Timings */
|
|
--transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
|
|
/* Border Radii */
|
|
--radius-xs: 4px;
|
|
--radius-sm: 8px;
|
|
--radius-md: 12px;
|
|
--radius-lg: 16px;
|
|
--radius-xl: 20px;
|
|
--radius-full: 9999px;
|
|
|
|
/* Layout Constants */
|
|
--header-height: 68px;
|
|
--sidebar-width: 240px;
|
|
--sidebar-collapsed-width: 72px;
|
|
--inspector-width: 460px;
|
|
}
|
|
|
|
/* Light Theme Variables */
|
|
[data-theme="light"] {
|
|
--bg-base: #f8fafc;
|
|
--bg-gradient: radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
|
|
radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
|
|
#f8fafc;
|
|
--bg-surface: rgba(255, 255, 255, 0.85);
|
|
--bg-surface-hover: rgba(241, 245, 249, 0.95);
|
|
--bg-surface-active: #e2e8f0;
|
|
--bg-card: rgba(255, 255, 255, 0.75);
|
|
--bg-card-hover: rgba(255, 255, 255, 0.95);
|
|
--bg-input: #ffffff;
|
|
--bg-input-focus: #ffffff;
|
|
--bg-code: #0f172a;
|
|
--bg-modal-overlay: rgba(15, 23, 42, 0.6);
|
|
|
|
--border-subtle: rgba(0, 0, 0, 0.05);
|
|
--border-default: rgba(0, 0, 0, 0.1);
|
|
--border-active: rgba(14, 165, 233, 0.5);
|
|
--border-focus: #0284c7;
|
|
|
|
--text-primary: #0f172a;
|
|
--text-secondary: #334155;
|
|
--text-muted: #64748b;
|
|
--text-dim: #94a3b8;
|
|
--text-inverted: #f8fafc;
|
|
|
|
--accent-cyan: #0284c7;
|
|
--accent-cyan-glow: rgba(2, 132, 199, 0.25);
|
|
--accent-indigo: #4f46e5;
|
|
--accent-indigo-glow: rgba(79, 70, 229, 0.25);
|
|
|
|
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
|
|
--shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.1);
|
|
--shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
2. Reset, Base & Typography
|
|
========================================================================== */
|
|
|
|
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
|
font-size: 13.5px;
|
|
line-height: 1.55;
|
|
color: var(--text-primary);
|
|
background: var(--bg-gradient);
|
|
background-attachment: fixed;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* Custom Sleek Scrollbar */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: rgba(148, 163, 184, 0.25);
|
|
border-radius: var(--radius-full);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(56, 189, 248, 0.5);
|
|
}
|
|
|
|
h1, h2, h3, h4, h5, h6 {
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
p {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
a {
|
|
color: var(--accent-cyan);
|
|
text-decoration: none;
|
|
transition: color var(--transition-fast);
|
|
}
|
|
|
|
a:hover {
|
|
color: #7dd3fc;
|
|
}
|
|
|
|
code, pre {
|
|
font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
3. Application Shell & Top Header
|
|
========================================================================== */
|
|
|
|
#app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.top-header {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
height: var(--header-height);
|
|
padding: 0 24px;
|
|
background: var(--bg-surface);
|
|
backdrop-filter: var(--backdrop-blur);
|
|
-webkit-backdrop-filter: var(--backdrop-blur);
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
box-shadow: var(--shadow-sm);
|
|
transition: background var(--transition-normal), border-color var(--transition-normal);
|
|
}
|
|
|
|
.header-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: max-content;
|
|
}
|
|
|
|
.brand-icon {
|
|
width: 38px;
|
|
height: 38px;
|
|
background: linear-gradient(135deg, #0284c7, #6366f1);
|
|
border-radius: var(--radius-md);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
font-size: 20px;
|
|
box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.brand-icon::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
|
|
animation: shine 4s infinite;
|
|
}
|
|
|
|
@keyframes shine {
|
|
0% { transform: translateX(-100%) translateY(-100%); }
|
|
20% { transform: translateX(100%) translateY(100%); }
|
|
100% { transform: translateX(100%) translateY(100%); }
|
|
}
|
|
|
|
.brand-titles {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: linear-gradient(to right, #f8fafc, #94a3b8);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
[data-theme="light"] .brand-title {
|
|
background: linear-gradient(to right, #0f172a, #475569);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.brand-badge {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
padding: 1px 6px;
|
|
border-radius: var(--radius-full);
|
|
background: rgba(56, 189, 248, 0.15);
|
|
color: var(--accent-cyan);
|
|
border: 1px solid rgba(56, 189, 248, 0.3);
|
|
text-transform: uppercase;
|
|
-webkit-text-fill-color: var(--accent-cyan);
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Header Status & Controls */
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.status-indicator-badge {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 12px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-full);
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--status-success);
|
|
box-shadow: 0 0 8px var(--status-success);
|
|
position: relative;
|
|
}
|
|
|
|
.status-dot.pulsing::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: -3px;
|
|
left: -3px;
|
|
right: -3px;
|
|
bottom: -3px;
|
|
border-radius: 50%;
|
|
border: 1px solid var(--status-success);
|
|
animation: pulseDot 2s infinite;
|
|
}
|
|
|
|
.status-dot.offline {
|
|
background: var(--status-error);
|
|
box-shadow: 0 0 8px var(--status-error);
|
|
}
|
|
|
|
.status-dot.offline.pulsing::after {
|
|
border-color: var(--status-error);
|
|
}
|
|
|
|
@keyframes pulseDot {
|
|
0% { transform: scale(1); opacity: 0.8; }
|
|
70% { transform: scale(2.2); opacity: 0; }
|
|
100% { transform: scale(2.2); opacity: 0; }
|
|
}
|
|
|
|
.api-key-input-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
min-width: 240px;
|
|
}
|
|
|
|
.api-key-input-wrapper input {
|
|
width: 100%;
|
|
padding: 7px 32px 7px 12px;
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--border-default);
|
|
background: var(--bg-input);
|
|
color: var(--text-primary);
|
|
font-size: 12.5px;
|
|
font-family: inherit;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.api-key-input-wrapper input:focus {
|
|
outline: none;
|
|
border-color: var(--border-focus);
|
|
box-shadow: var(--shadow-glow);
|
|
background: var(--bg-input-focus);
|
|
}
|
|
|
|
.api-key-icon-btn {
|
|
position: absolute;
|
|
right: 8px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
transition: color var(--transition-fast);
|
|
}
|
|
|
|
.api-key-icon-btn:hover {
|
|
color: var(--accent-cyan);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
4. App Main Layout (Sidebar + Workspace + Inspector)
|
|
========================================================================== */
|
|
|
|
.main-layout {
|
|
display: grid;
|
|
grid-template-columns: var(--sidebar-width) 1fr var(--inspector-width);
|
|
gap: 0;
|
|
min-height: calc(100vh - var(--header-height));
|
|
position: relative;
|
|
}
|
|
|
|
/* Left Sidebar Navigation */
|
|
.app-sidebar {
|
|
background: var(--bg-surface);
|
|
border-right: 1px solid var(--border-subtle);
|
|
padding: 20px 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
position: sticky;
|
|
top: var(--header-height);
|
|
height: calc(100vh - var(--header-height));
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.nav-section-title {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
color: var(--text-dim);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
padding: 0 12px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.nav-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-md);
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: 1px solid transparent;
|
|
background: transparent;
|
|
width: 100%;
|
|
text-align: left;
|
|
transition: all var(--transition-fast);
|
|
user-select: none;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-surface-hover);
|
|
border-color: var(--border-subtle);
|
|
}
|
|
|
|
.nav-item.active {
|
|
color: var(--accent-cyan);
|
|
background: rgba(56, 189, 248, 0.12);
|
|
border-color: rgba(56, 189, 248, 0.25);
|
|
font-weight: 600;
|
|
box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.1);
|
|
}
|
|
|
|
.nav-icon {
|
|
font-size: 16px;
|
|
width: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.nav-item.active .nav-icon {
|
|
opacity: 1;
|
|
transform: scale(1.1);
|
|
filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
|
|
}
|
|
|
|
.nav-badge {
|
|
margin-left: auto;
|
|
font-size: 10.5px;
|
|
padding: 1px 7px;
|
|
border-radius: var(--radius-full);
|
|
background: rgba(255, 255, 255, 0.08);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.nav-item.active .nav-badge {
|
|
background: rgba(56, 189, 248, 0.2);
|
|
color: var(--accent-cyan);
|
|
}
|
|
|
|
/* Central Workspace Area */
|
|
.app-content {
|
|
padding: 24px;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.tab-pane {
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 18px;
|
|
animation: fadeIn 0.25s ease-out;
|
|
}
|
|
|
|
.tab-pane.active {
|
|
display: flex;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ==========================================================================
|
|
5. UI Cards, Panels & Glass Containers
|
|
========================================================================== */
|
|
|
|
.glass-panel {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-lg);
|
|
padding: 18px 20px;
|
|
box-shadow: var(--shadow-sm);
|
|
backdrop-filter: var(--backdrop-blur);
|
|
-webkit-backdrop-filter: var(--backdrop-blur);
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.glass-panel:hover {
|
|
border-color: var(--border-active);
|
|
}
|
|
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 14px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.panel-title {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.panel-title .title-icon {
|
|
font-size: 16px;
|
|
color: var(--accent-cyan);
|
|
}
|
|
|
|
.panel-subtitle {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.panel-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Overview Stat Cards Grid */
|
|
.stat-cards-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 14px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-md);
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.stat-card:hover {
|
|
transform: translateY(-3px);
|
|
border-color: var(--border-active);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.stat-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3px;
|
|
background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
|
|
opacity: 0;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.stat-card:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.stat-card-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.stat-card-title {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.stat-card-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--radius-sm);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.stat-card.steps .stat-card-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
|
|
.stat-card.hr .stat-card-icon { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
|
|
.stat-card.sleep .stat-card-icon { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
|
|
.stat-card.calories .stat-card-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
|
|
.stat-card.spo2 .stat-card-icon { background: rgba(20, 184, 166, 0.15); color: var(--accent-teal); }
|
|
.stat-card.stress .stat-card-icon { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
|
|
|
|
.stat-card-value {
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
color: var(--text-primary);
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 4px;
|
|
}
|
|
|
|
.stat-card-unit {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.stat-card-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 11.5px;
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
.stat-card-badge {
|
|
padding: 1px 6px;
|
|
border-radius: var(--radius-xs);
|
|
font-weight: 600;
|
|
font-size: 10.5px;
|
|
}
|
|
|
|
.stat-card-badge.up { background: var(--status-success-bg); color: var(--status-success); }
|
|
.stat-card-badge.down { background: var(--status-error-bg); color: var(--status-error); }
|
|
.stat-card-badge.neutral { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
|
|
|
|
/* ==========================================================================
|
|
6. Form Controls, Datepickers, Inputs & Buttons
|
|
========================================================================== */
|
|
|
|
.form-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
flex: 1;
|
|
min-width: 140px;
|
|
}
|
|
|
|
.form-group.sm {
|
|
max-width: 140px;
|
|
}
|
|
|
|
.form-label {
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.input-control, .select-control {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--border-default);
|
|
background: var(--bg-input);
|
|
color: var(--text-primary);
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.input-control:hover, .select-control:hover {
|
|
border-color: var(--border-active);
|
|
}
|
|
|
|
.input-control:focus, .select-control:focus {
|
|
outline: none;
|
|
border-color: var(--border-focus);
|
|
background: var(--bg-input-focus);
|
|
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
|
|
}
|
|
|
|
/* Date Preset Quick Filter Pills */
|
|
.date-preset-pills {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.preset-pill {
|
|
padding: 4px 10px;
|
|
border-radius: var(--radius-full);
|
|
border: 1px solid var(--border-subtle);
|
|
background: var(--bg-card);
|
|
color: var(--text-muted);
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.preset-pill:hover {
|
|
border-color: var(--border-active);
|
|
color: var(--text-primary);
|
|
background: var(--bg-card-hover);
|
|
}
|
|
|
|
.preset-pill.active {
|
|
background: var(--accent-cyan-glow);
|
|
border-color: var(--accent-cyan);
|
|
color: var(--accent-cyan);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Custom Checkbox & Toggle Switch */
|
|
.custom-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 12.5px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.custom-checkbox input {
|
|
display: none;
|
|
}
|
|
|
|
.checkbox-box {
|
|
width: 17px;
|
|
height: 17px;
|
|
border-radius: var(--radius-xs);
|
|
border: 1.5px solid var(--border-default);
|
|
background: var(--bg-input);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: transparent;
|
|
font-size: 12px;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.custom-checkbox input:checked + .checkbox-box {
|
|
background: var(--accent-cyan);
|
|
border-color: var(--accent-cyan);
|
|
color: var(--text-inverted);
|
|
box-shadow: 0 0 8px var(--accent-cyan-glow);
|
|
}
|
|
|
|
/* Switch Toggle */
|
|
.switch-control {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.switch-control input {
|
|
display: none;
|
|
}
|
|
|
|
.switch-track {
|
|
width: 36px;
|
|
height: 20px;
|
|
background: var(--bg-surface-active);
|
|
border-radius: var(--radius-full);
|
|
position: relative;
|
|
transition: background var(--transition-fast);
|
|
border: 1px solid var(--border-default);
|
|
}
|
|
|
|
.switch-thumb {
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #ffffff;
|
|
border-radius: 50%;
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
transition: transform var(--transition-bounce);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.switch-control input:checked + .switch-track {
|
|
background: var(--accent-cyan);
|
|
border-color: var(--accent-cyan);
|
|
}
|
|
|
|
.switch-control input:checked + .switch-track .switch-thumb {
|
|
transform: translateX(16px);
|
|
}
|
|
|
|
/* Buttons System */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 8px 16px;
|
|
border-radius: var(--radius-md);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
border: 1px solid transparent;
|
|
transition: all var(--transition-fast);
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #0284c7, #2563eb);
|
|
color: #ffffff;
|
|
border-color: rgba(255, 255, 255, 0.15);
|
|
box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: linear-gradient(135deg, #0369a1, #1d4ed8);
|
|
box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-card);
|
|
border-color: var(--border-default);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--bg-card-hover);
|
|
border-color: var(--border-active);
|
|
color: var(--accent-cyan);
|
|
}
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
border-color: var(--border-default);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
border-color: var(--accent-cyan);
|
|
color: var(--accent-cyan);
|
|
background: rgba(56, 189, 248, 0.08);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: rgba(239, 68, 68, 0.15);
|
|
border-color: rgba(239, 68, 68, 0.3);
|
|
color: var(--status-error);
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
background: rgba(239, 68, 68, 0.25);
|
|
border-color: var(--status-error);
|
|
}
|
|
|
|
.btn-success {
|
|
background: rgba(16, 185, 129, 0.15);
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
color: var(--status-success);
|
|
}
|
|
|
|
.btn-success:hover {
|
|
background: rgba(16, 185, 129, 0.25);
|
|
border-color: var(--status-success);
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 5px 10px;
|
|
font-size: 12px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.btn-lg {
|
|
padding: 10px 20px;
|
|
font-size: 14px;
|
|
border-radius: var(--radius-lg);
|
|
}
|
|
|
|
.btn-icon-only {
|
|
padding: 8px;
|
|
border-radius: var(--radius-md);
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-default);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.btn-icon-only:hover {
|
|
border-color: var(--border-active);
|
|
color: var(--accent-cyan);
|
|
}
|
|
|
|
/* Button Group */
|
|
.btn-group {
|
|
display: inline-flex;
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
border: 1px solid var(--border-default);
|
|
}
|
|
|
|
.btn-group .btn {
|
|
border-radius: 0;
|
|
border: none;
|
|
border-right: 1px solid var(--border-default);
|
|
}
|
|
|
|
.btn-group .btn:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
7. Data Visualization & Component Badges
|
|
========================================================================== */
|
|
|
|
/* Sleep Stage Visual Timeline */
|
|
.sleep-timeline-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin: 14px 0;
|
|
}
|
|
|
|
.sleep-timeline-bar {
|
|
display: flex;
|
|
height: 28px;
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
background: var(--bg-code);
|
|
border: 1px solid var(--border-default);
|
|
}
|
|
|
|
.sleep-segment {
|
|
height: 100%;
|
|
position: relative;
|
|
transition: opacity var(--transition-fast);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.sleep-segment:hover {
|
|
opacity: 0.8;
|
|
filter: brightness(1.2);
|
|
}
|
|
|
|
.sleep-segment.deep { background: #3b82f6; }
|
|
.sleep-segment.light { background: #60a5fa; }
|
|
.sleep-segment.rem { background: #8b5cf6; }
|
|
.sleep-segment.awake { background: #f59e0b; }
|
|
|
|
.sleep-legend {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
font-size: 11.5px;
|
|
color: var(--text-muted);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.legend-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.legend-dot.deep { background: #3b82f6; }
|
|
.legend-dot.light { background: #60a5fa; }
|
|
.legend-dot.rem { background: #8b5cf6; }
|
|
.legend-dot.awake { background: #f59e0b; }
|
|
|
|
/* Metric Series Custom Chart Canvas Container */
|
|
.chart-container {
|
|
width: 100%;
|
|
height: 240px;
|
|
position: relative;
|
|
background: var(--bg-code);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-md);
|
|
padding: 16px;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.chart-bar-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
flex: 1;
|
|
height: 100%;
|
|
justify-content: flex-end;
|
|
min-width: 28px;
|
|
position: relative;
|
|
}
|
|
|
|
.chart-bar {
|
|
width: 18px;
|
|
background: linear-gradient(180deg, var(--accent-cyan), #2563eb);
|
|
border-radius: var(--radius-xs) var(--radius-xs) 0 0;
|
|
transition: height 0.4s ease-out, background var(--transition-fast);
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.chart-bar:hover {
|
|
background: linear-gradient(180deg, #7dd3fc, #3b82f6);
|
|
box-shadow: 0 0 10px var(--accent-cyan-glow);
|
|
}
|
|
|
|
.chart-bar-label {
|
|
font-size: 10px;
|
|
color: var(--text-dim);
|
|
margin-top: 6px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chart-bar-tooltip {
|
|
position: absolute;
|
|
bottom: calc(100% + 6px);
|
|
background: var(--bg-surface-active);
|
|
color: var(--text-primary);
|
|
font-size: 11px;
|
|
padding: 3px 8px;
|
|
border-radius: var(--radius-xs);
|
|
border: 1px solid var(--border-default);
|
|
white-space: nowrap;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transform: translateY(4px);
|
|
transition: all var(--transition-fast);
|
|
z-index: 10;
|
|
}
|
|
|
|
.chart-bar:hover .chart-bar-tooltip {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Multi-select sync type tags */
|
|
.tag-pills-selector {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.tag-pill {
|
|
padding: 6px 12px;
|
|
border-radius: var(--radius-full);
|
|
border: 1px solid var(--border-default);
|
|
background: var(--bg-card);
|
|
color: var(--text-secondary);
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.tag-pill:hover {
|
|
border-color: var(--border-active);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.tag-pill.selected {
|
|
background: rgba(56, 189, 248, 0.15);
|
|
border-color: var(--accent-cyan);
|
|
color: var(--accent-cyan);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tag-pill .tag-check {
|
|
font-size: 11px;
|
|
opacity: 0;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.tag-pill.selected .tag-check {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Data Table Grid */
|
|
.data-table-container {
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
background: var(--bg-card);
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.data-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 12.5px;
|
|
text-align: left;
|
|
}
|
|
|
|
.data-table th {
|
|
background: rgba(255, 255, 255, 0.03);
|
|
padding: 10px 14px;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
border-bottom: 1px solid var(--border-default);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.data-table td {
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.data-table tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.data-table tr:hover td {
|
|
background: rgba(255, 255, 255, 0.02);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Pill Badges */
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-full);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.badge-success { background: var(--status-success-bg); color: var(--status-success); border: 1px solid rgba(16, 185, 129, 0.3); }
|
|
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
|
|
.badge-danger { background: var(--status-error-bg); color: var(--status-error); border: 1px solid rgba(239, 68, 68, 0.3); }
|
|
.badge-info { background: var(--status-info-bg); color: var(--status-info); border: 1px solid rgba(56, 189, 248, 0.3); }
|
|
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
|
|
|
|
/* ==========================================================================
|
|
8. Right-Side Live Developer Console & Response Inspector
|
|
========================================================================== */
|
|
|
|
.app-inspector {
|
|
background: var(--bg-surface);
|
|
border-left: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: sticky;
|
|
top: var(--header-height);
|
|
height: calc(100vh - var(--header-height));
|
|
overflow: hidden;
|
|
}
|
|
|
|
.inspector-header {
|
|
padding: 14px 18px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
.inspector-title {
|
|
font-size: 13.5px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.inspector-meta-bar {
|
|
padding: 10px 18px;
|
|
background: var(--bg-card);
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
gap: 8px;
|
|
}
|
|
|
|
.meta-badges-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.http-method-pill {
|
|
padding: 2px 7px;
|
|
border-radius: var(--radius-xs);
|
|
font-weight: 700;
|
|
font-size: 10.5px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.http-method-pill.get { background: #0369a1; color: #e0f2fe; }
|
|
.http-method-pill.post { background: #047857; color: #d1fae5; }
|
|
.http-method-pill.delete { background: #b91c1c; color: #fee2e2; }
|
|
.http-method-pill.put { background: #b45309; color: #fef3c7; }
|
|
|
|
.status-pill {
|
|
padding: 2px 7px;
|
|
border-radius: var(--radius-xs);
|
|
font-weight: 700;
|
|
font-size: 10.5px;
|
|
}
|
|
|
|
.status-pill.ok { background: #064e3b; color: #34d399; }
|
|
.status-pill.err { background: #7f1d1d; color: #f87171; }
|
|
.status-pill.pending { background: #1e1b4b; color: #a5b4fc; }
|
|
|
|
.latency-pill {
|
|
padding: 2px 7px;
|
|
border-radius: var(--radius-xs);
|
|
background: rgba(255, 255, 255, 0.06);
|
|
color: var(--text-secondary);
|
|
font-size: 11px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.inspector-actions-bar {
|
|
padding: 8px 18px;
|
|
background: var(--bg-surface);
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.inspector-search-input {
|
|
flex: 1;
|
|
padding: 4px 8px;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border-default);
|
|
background: var(--bg-input);
|
|
color: var(--text-primary);
|
|
font-size: 11.5px;
|
|
}
|
|
|
|
.inspector-body {
|
|
flex: 1;
|
|
padding: 14px 18px;
|
|
background: var(--bg-code);
|
|
overflow-y: auto;
|
|
font-family: 'JetBrains Mono', Consolas, monospace;
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
color: #e2e8f0;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
position: relative;
|
|
}
|
|
|
|
/* JSON Viewer Syntax Highlighting */
|
|
.json-key { color: #38bdf8; font-weight: 600; }
|
|
.json-string { color: #4ade80; }
|
|
.json-number { color: #fbbf24; }
|
|
.json-boolean { color: #f472b6; font-weight: 600; }
|
|
.json-null { color: #94a3b8; font-style: italic; }
|
|
|
|
.inspector-empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
color: var(--text-dim);
|
|
gap: 12px;
|
|
text-align: center;
|
|
}
|
|
|
|
.inspector-empty-icon {
|
|
font-size: 42px;
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
9. Modal Dialogs & Popup Overlays
|
|
========================================================================== */
|
|
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: var(--bg-modal-overlay);
|
|
backdrop-filter: var(--backdrop-blur);
|
|
-webkit-backdrop-filter: var(--backdrop-blur);
|
|
z-index: 1000;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
animation: fadeIn 0.2s ease-out;
|
|
}
|
|
|
|
.modal-backdrop.active {
|
|
display: flex;
|
|
}
|
|
|
|
.modal-card {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-xl);
|
|
width: 100%;
|
|
max-width: 480px;
|
|
box-shadow: var(--shadow-lg);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
}
|
|
|
|
@keyframes modalPop {
|
|
0% { transform: scale(0.9) translateY(20px); opacity: 0; }
|
|
100% { transform: scale(1) translateY(0); opacity: 1; }
|
|
}
|
|
|
|
.modal-header {
|
|
padding: 18px 22px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.modal-close-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
border-radius: var(--radius-sm);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.modal-close-btn:hover {
|
|
color: var(--text-primary);
|
|
background: var(--bg-surface-hover);
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 22px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
max-height: 70vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 16px 22px;
|
|
border-top: 1px solid var(--border-subtle);
|
|
background: var(--bg-card);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
|
|
/* QR Code Display in Modal */
|
|
.qr-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 16px 0;
|
|
}
|
|
|
|
.qr-image-frame {
|
|
width: 220px;
|
|
height: 220px;
|
|
background: #ffffff;
|
|
border-radius: var(--radius-lg);
|
|
padding: 12px;
|
|
box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.qr-image-frame img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.qr-scan-beam {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: linear-gradient(90deg, transparent, #0284c7, transparent);
|
|
box-shadow: 0 0 10px #38bdf8;
|
|
animation: scanBeam 2.5s infinite ease-in-out;
|
|
}
|
|
|
|
@keyframes scanBeam {
|
|
0% { top: 5%; opacity: 0; }
|
|
20% { opacity: 1; }
|
|
80% { opacity: 1; }
|
|
100% { top: 95%; opacity: 0; }
|
|
}
|
|
|
|
.qr-timer-bar {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: var(--bg-surface-active);
|
|
border-radius: var(--radius-full);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.qr-timer-progress {
|
|
height: 100%;
|
|
background: var(--accent-cyan);
|
|
width: 100%;
|
|
transition: width 1s linear;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
10. Toast Notification System
|
|
========================================================================== */
|
|
|
|
.toast-container {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
z-index: 2000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast-message {
|
|
pointer-events: auto;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-default);
|
|
border-radius: var(--radius-lg);
|
|
padding: 12px 18px;
|
|
box-shadow: var(--shadow-lg);
|
|
backdrop-filter: var(--backdrop-blur);
|
|
-webkit-backdrop-filter: var(--backdrop-blur);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 280px;
|
|
max-width: 420px;
|
|
animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
transition: all var(--transition-normal);
|
|
}
|
|
|
|
@keyframes toastSlideIn {
|
|
0% { transform: translateX(120%) scale(0.9); opacity: 0; }
|
|
100% { transform: translateX(0) scale(1); opacity: 1; }
|
|
}
|
|
|
|
.toast-message.toast-leaving {
|
|
transform: translateX(120%) scale(0.9);
|
|
opacity: 0;
|
|
}
|
|
|
|
.toast-icon {
|
|
font-size: 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toast-message.success { border-color: rgba(16, 185, 129, 0.4); }
|
|
.toast-message.success .toast-icon { color: var(--status-success); }
|
|
.toast-message.error { border-color: rgba(239, 68, 68, 0.4); }
|
|
.toast-message.error .toast-icon { color: var(--status-error); }
|
|
.toast-message.warning { border-color: rgba(245, 158, 11, 0.4); }
|
|
.toast-message.warning .toast-icon { color: var(--status-warning); }
|
|
.toast-message.info { border-color: rgba(56, 189, 248, 0.4); }
|
|
.toast-message.info .toast-icon { color: var(--status-info); }
|
|
|
|
.toast-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.toast-title {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.toast-desc {
|
|
font-size: 11.5px;
|
|
color: var(--text-muted);
|
|
margin-top: 1px;
|
|
}
|
|
|
|
/* ==========================================================================
|
|
11. Micro-animations, Loaders & Skeleton States
|
|
========================================================================== */
|
|
|
|
.spinner {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid rgba(255, 255, 255, 0.2);
|
|
border-top-color: currentColor;
|
|
border-radius: 50%;
|
|
animation: spin 0.7s linear infinite;
|
|
display: inline-block;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.skeleton {
|
|
background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
|
|
background-size: 200% 100%;
|
|
animation: shimmer 1.8s infinite;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% { background-position: 200% 0; }
|
|
100% { background-position: -200% 0; }
|
|
}
|
|
|
|
/* Pulse animation for live updates */
|
|
.live-pulse {
|
|
animation: pulseGlow 2s infinite;
|
|
}
|
|
|
|
@keyframes pulseGlow {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
/* Tooltip Styling */
|
|
[data-tooltip] {
|
|
position: relative;
|
|
}
|
|
|
|
[data-tooltip]::after {
|
|
content: attr(data-tooltip);
|
|
position: absolute;
|
|
bottom: calc(100% + 6px);
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(4px);
|
|
background: var(--bg-surface-active);
|
|
color: var(--text-primary);
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
padding: 4px 8px;
|
|
border-radius: var(--radius-xs);
|
|
border: 1px solid var(--border-default);
|
|
white-space: nowrap;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: all var(--transition-fast);
|
|
z-index: 100;
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
[data-tooltip]:hover::after {
|
|
opacity: 1;
|
|
transform: translateX(-50%) translateY(0);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
12. Responsive Breakpoints & Mobile Adaptations
|
|
========================================================================== */
|
|
|
|
@media (max-width: 1400px) {
|
|
:root {
|
|
--inspector-width: 380px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.main-layout {
|
|
grid-template-columns: var(--sidebar-collapsed-width) 1fr var(--inspector-width);
|
|
}
|
|
|
|
.nav-item span:not(.nav-icon) {
|
|
display: none;
|
|
}
|
|
|
|
.nav-section-title {
|
|
display: none;
|
|
}
|
|
|
|
.nav-item {
|
|
justify-content: center;
|
|
padding: 10px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.main-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.app-sidebar {
|
|
display: none; /* Can be toggled with mobile drawer */
|
|
}
|
|
|
|
.app-inspector {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 320px;
|
|
z-index: 90;
|
|
border-left: none;
|
|
border-top: 1px solid var(--border-default);
|
|
}
|
|
|
|
.app-content {
|
|
padding-bottom: 340px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.top-header {
|
|
padding: 0 14px;
|
|
}
|
|
|
|
.brand-subtitle, .api-key-input-wrapper {
|
|
display: none;
|
|
}
|
|
|
|
.stat-cards-grid {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
|
|
.form-row {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.form-group {
|
|
width: 100%;
|
|
max-width: none !important;
|
|
}
|
|
}
|