/* ===================================================================== MedGemma-Micro Modern Medical Dark UI Design System ===================================================================== */ :root { --bg-primary: #070a12; --bg-secondary: #0d121f; --bg-card: rgba(16, 23, 38, 0.7); --bg-card-hover: rgba(22, 32, 54, 0.85); --border-subtle: rgba(255, 255, 255, 0.08); --border-active: rgba(0, 240, 255, 0.4); --accent-cyan: #00f0ff; --accent-cyan-glow: rgba(0, 240, 255, 0.25); --accent-emerald: #10b981; --accent-emerald-glow: rgba(16, 185, 129, 0.25); --accent-crimson: #ff4757; --accent-crimson-glow: rgba(255, 71, 87, 0.3); --accent-amber: #ffa502; --accent-amber-glow: rgba(255, 165, 2, 0.25); --accent-purple: #8b5cf6; --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b; --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; --font-display: 'Outfit', sans-serif; --font-mono: 'JetBrains Mono', monospace; --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 20px; --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37); --glass-blur: blur(12px); --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font-sans); background-color: var(--bg-primary); background-image: radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 40%), radial-gradient(circle at 85% 85%, rgba(255, 71, 87, 0.03) 0%, transparent 40%); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; } /* Layout Container */ .app-layout { display: flex; flex-direction: column; height: 100vh; max-width: 1720px; margin: 0 auto; padding: 12px 20px; gap: 14px; } /* Top Navigation Bar */ .top-nav { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); } .nav-brand { display: flex; align-items: center; gap: 12px; } .logo-pulse { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(255, 71, 87, 0.15)); border: 1px solid rgba(0, 240, 255, 0.3); border-radius: var(--radius-md); color: var(--accent-cyan); box-shadow: 0 0 15px var(--accent-cyan-glow); animation: heartPulse 2.4s infinite ease-in-out; } @keyframes heartPulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 14% { transform: scale(1.1); opacity: 1; } 28% { transform: scale(1); opacity: 0.9; } 42% { transform: scale(1.15); opacity: 1; } 70% { transform: scale(1); opacity: 0.9; } } .brand-text { display: flex; flex-direction: column; } .brand-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(90deg, #ffffff 40%, var(--accent-cyan) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .brand-sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; } /* Telemetry HUD Badges */ .telemetry-hud { display: flex; align-items: center; gap: 10px; } .hud-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); font-size: 0.75rem; font-family: var(--font-mono); } .hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); } .hud-label { color: var(--text-muted); font-size: 0.68rem; font-weight: 600; } .hud-val { color: var(--text-primary); font-weight: 600; } .hud-val.highlight { color: var(--accent-emerald); } .hud-sub { color: var(--text-muted); font-size: 0.65rem; } .text-cyan { color: var(--accent-cyan) !important; } .text-emerald { color: var(--accent-emerald) !important; } .text-crimson { color: var(--accent-crimson) !important; } /* Main Dashboard Grid */ .dashboard-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; flex: 1; min-height: 0; } /* Panel Common Styles */ .panel { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); display: flex; flex-direction: column; overflow: hidden; } .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px 18px; border-bottom: 1px solid var(--border-subtle); } .panel-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: #fff; letter-spacing: -0.01em; } .panel-caption { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); } /* Rhythm Status Badge */ .rhythm-status-badge { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 30px; font-size: 0.78rem; font-weight: 600; color: var(--accent-emerald); transition: var(--transition-smooth); } .rhythm-status-badge.badge-afib { background: rgba(255, 71, 87, 0.12); border-color: rgba(255, 71, 87, 0.4); color: var(--accent-crimson); } .rhythm-status-badge.badge-tachy { background: rgba(255, 165, 2, 0.12); border-color: rgba(255, 165, 2, 0.4); color: var(--accent-amber); } .pulse-indicator { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: blinkDot 1s infinite alternate; } @keyframes blinkDot { 0% { opacity: 0.4; } 100% { opacity: 1; } } /* Oscilloscope Container */ .oscilloscope-container { position: relative; width: 100%; height: 200px; background: #04070d; margin: 12px 18px 0 18px; width: calc(100% - 36px); border-radius: var(--radius-md); border: 1px solid rgba(0, 240, 255, 0.2); box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 240, 255, 0.05); overflow: hidden; } .scope-grid-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; } #ppg-canvas { width: 100%; height: 100%; display: block; } .scope-hud { position: absolute; bottom: 6px; left: 10px; right: 10px; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.65rem; color: rgba(0, 240, 255, 0.6); pointer-events: none; } /* Scope Controls */ .scope-controls { padding: 12px 18px 0 18px; display: flex; flex-direction: column; gap: 10px; } .control-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .control-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; } .condition-chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { display: flex; align-items: center; gap: 6px; padding: 5px 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle); border-radius: 20px; color: var(--text-secondary); font-size: 0.74rem; font-weight: 500; cursor: pointer; transition: var(--transition-smooth); } .chip:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.2); } .chip.active { background: rgba(0, 240, 255, 0.12); border-color: var(--accent-cyan); color: #fff; box-shadow: 0 0 10px var(--accent-cyan-glow); } .chip-dot { width: 6px; height: 6px; border-radius: 50%; } .chip-dot.normal { background: var(--accent-emerald); } .chip-dot.afib { background: var(--accent-crimson); } .chip-dot.brady { background: var(--accent-cyan); } .chip-dot.tachy { background: var(--accent-amber); } .chip-dot.pvc { background: var(--accent-purple); } .actions-row { display: flex; align-items: center; gap: 12px; } .btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; cursor: pointer; border: none; transition: var(--transition-smooth); } .btn-primary { background: linear-gradient(135deg, #00d2ff, #00f0ff); color: #040b17; box-shadow: 0 2px 10px var(--accent-cyan-glow); } .btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); } .btn-secondary { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-subtle); color: var(--text-primary); } .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); } .btn-sm { padding: 5px 10px; font-size: 0.72rem; } .toggle-switch-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.74rem; color: var(--text-secondary); } .toggle-switch-label input { display: none; } .switch-slider { width: 28px; height: 16px; background: rgba(255, 255, 255, 0.15); border-radius: 20px; position: relative; transition: var(--transition-smooth); } .switch-slider::before { content: ''; position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: var(--transition-smooth); } input:checked + .switch-slider { background: var(--accent-cyan); } input:checked + .switch-slider::before { transform: translateX(12px); background: #040b17; } /* Metrics Grid */ .metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 18px; } .metric-card { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 8px 10px; display: flex; flex-direction: column; } .metric-header { display: flex; justify-content: space-between; align-items: baseline; } .metric-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; } .metric-unit { font-size: 0.6rem; color: var(--text-muted); font-family: var(--font-mono); } .metric-value { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: #fff; margin: 2px 0; } .metric-sub { font-size: 0.65rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Arrhythmia Classifier Section */ .classification-section { padding: 10px 18px 16px 18px; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 10px; flex: 1; } .class-header { display: flex; justify-content: space-between; align-items: center; } .section-heading { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; } .section-sub { font-size: 0.68rem; color: var(--text-muted); font-family: var(--font-mono); } .probability-bars { display: flex; flex-direction: column; gap: 7px; } .prob-row { display: flex; flex-direction: column; gap: 2px; } .prob-meta { display: flex; justify-content: space-between; font-size: 0.72rem; } .prob-name { color: var(--text-secondary); font-weight: 500; } .prob-pct { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); } .prob-track { height: 6px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; overflow: hidden; } .prob-fill { height: 100%; width: 0%; background: var(--accent-cyan); border-radius: 4px; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); } .prob-row.highlight .prob-name { color: #fff; font-weight: 600; } .prob-row.highlight .prob-fill { background: var(--accent-emerald); box-shadow: 0 0 10px var(--accent-emerald-glow); } .prob-row.danger .prob-fill { background: var(--accent-crimson); box-shadow: 0 0 10px var(--accent-crimson-glow); } /* Right Column: Chat Panel */ .chat-panel { display: flex; flex-direction: column; height: 100%; } .chat-header { padding: 14px 18px 10px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; } .multimodal-switch-container { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; } .bridge-tag { display: flex; align-items: center; gap: 5px; font-size: 0.65rem; font-family: var(--font-mono); color: var(--accent-cyan); } .bridge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); } /* Presets Drawer */ .presets-drawer { padding: 8px 18px; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 8px; overflow: hidden; } .presets-caption { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; white-space: nowrap; } .presets-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .presets-scroll::-webkit-scrollbar { display: none; } .preset-chip { padding: 4px 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); border-radius: 20px; font-size: 0.7rem; color: var(--text-secondary); white-space: nowrap; cursor: pointer; transition: var(--transition-smooth); } .preset-chip:hover { background: rgba(0, 240, 255, 0.1); border-color: var(--accent-cyan); color: #fff; } /* Chat Messages */ .chat-messages { flex: 1; padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; } .message-bubble { display: flex; gap: 10px; max-width: 92%; } .message-bubble.user-msg { align-self: flex-end; flex-direction: row-reverse; } .msg-avatar { width: 32px; height: 32px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; } .user-msg .msg-avatar { background: linear-gradient(135deg, #3b82f6, #1d4ed8); } .msg-body { display: flex; flex-direction: column; gap: 4px; } .msg-author { display: flex; align-items: center; gap: 6px; } .msg-author .name { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); } .msg-author .tag { font-size: 0.6rem; font-family: var(--font-mono); padding: 1px 5px; background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); border-radius: 4px; } .msg-content { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle); padding: 12px 14px; border-radius: var(--radius-md); font-size: 0.85rem; line-height: 1.5; color: #e2e8f0; } .user-msg .msg-content { background: rgba(0, 240, 255, 0.12); border-color: rgba(0, 240, 255, 0.3); color: #fff; } .msg-content p { margin-bottom: 8px; } .msg-content p:last-child { margin-bottom: 0; } .msg-content ul { padding-left: 18px; margin-bottom: 8px; } .msg-content li { margin-bottom: 4px; } .msg-content code { background: rgba(0, 0, 0, 0.4); padding: 2px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-cyan); } /* Chat Input Area */ .chat-input-area { padding: 12px 18px; border-top: 1px solid var(--border-subtle); background: rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; gap: 8px; } .chat-form { position: relative; display: flex; flex-direction: column; gap: 8px; } #user-input { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 10px 14px; color: #fff; font-family: var(--font-sans); font-size: 0.85rem; resize: none; outline: none; transition: var(--transition-smooth); } #user-input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan-glow); background: rgba(255, 255, 255, 0.07); } .chat-form-actions { display: flex; justify-content: space-between; align-items: center; } .telemetry-tag { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-muted); } .btn-send { padding: 7px 18px; } .chat-disclaimer { font-size: 0.65rem; color: var(--text-muted); text-align: center; } /* Loading Dots */ .loading-dots { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; } .loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); animation: waveDot 1.2s infinite ease-in-out; } .loading-dots span:nth-child(2) { animation-delay: 0.2s; } .loading-dots span:nth-child(3) { animation-delay: 0.4s; } @keyframes waveDot { 0%, 80%, 100% { transform: scale(0); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } } /* Responsive adjustments */ @media (max-width: 1100px) { .dashboard-grid { grid-template-columns: 1fr; overflow-y: auto; } .app-layout { height: auto; } .panel { min-height: 480px; } }