kenmandal's picture
Add persona chatbots, sample diagnostic files, and enhanced Lab Admin views
048b72d verified
"""Custom CSS styles for the SeniorCare Intelligence Engine."""
def get_global_css() -> str:
"""Return global CSS to inject into the Streamlit app."""
return """
<style>
/* Global Layout */
.main { background-color: #f8fafc; }
.block-container { padding-top: 1.5rem; }
/* Agent Swarm Log Console */
.agent-console {
font-family: 'JetBrains Mono', 'Courier New', monospace;
background: #0f172a;
color: #10b981;
padding: 16px 20px;
border-radius: 10px;
font-size: 0.78rem;
line-height: 1.7;
border-left: 4px solid #3b82f6;
max-height: 220px;
overflow-y: auto;
}
.agent-console .agent-name { color: #38bdf8; font-weight: bold; }
.agent-console .timestamp { color: #64748b; }
/* Wellness Score Card */
.wellness-card {
background: white;
padding: 30px;
border-radius: 20px;
text-align: center;
border: 1px solid #e2e8f0;
box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
transition: transform 0.2s;
}
.wellness-card:hover { transform: translateY(-2px); }
.wellness-score {
font-size: 4.5rem;
font-weight: 800;
margin: 5px 0;
line-height: 1;
}
.wellness-label {
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.wellness-target {
color: #64748b;
font-size: 0.8rem;
margin-top: 8px;
}
/* Shift Handoff Box */
.handoff-box {
background: linear-gradient(135deg, #eff6ff, #f0f9ff);
border-left: 5px solid #3b82f6;
padding: 20px 24px;
border-radius: 10px;
font-size: 0.92rem;
line-height: 1.65;
margin: 10px 0;
}
/* Alert Badges */
.alert-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
margin: 2px 4px;
}
.alert-high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-moderate { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.alert-low { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
/* Clinical Flag Tags */
.clinical-tag {
display: inline-block;
background: #f1f5f9;
color: #475569;
padding: 4px 12px;
border-radius: 6px;
font-size: 0.78rem;
font-weight: 500;
margin: 2px 3px;
border: 1px solid #e2e8f0;
}
/* Metric Enhancement */
div[data-testid="stMetric"] {
background: white;
padding: 15px 20px;
border-radius: 12px;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
/* Sidebar Branding */
section[data-testid="stSidebar"] > div {
background: linear-gradient(180deg, #0f172a, #1e293b);
}
section[data-testid="stSidebar"] .stMarkdown,
section[data-testid="stSidebar"] label,
section[data-testid="stSidebar"] .stSelectbox label {
color: #e2e8f0 !important;
}
/* Data Table */
.resident-row {
background: white;
border: 1px solid #e2e8f0;
border-radius: 10px;
padding: 15px 20px;
margin: 8px 0;
}
/* Chatbot Header */
.chat-header {
background: linear-gradient(135deg, #0f172a, #1e3a5f);
padding: 14px 20px;
border-radius: 12px 12px 0 0;
display: flex;
align-items: center;
gap: 10px;
margin-bottom: -1px;
}
.chat-header-icon { font-size: 1.4rem; }
.chat-header-title {
color: #f1f5f9;
font-weight: 700;
font-size: 1rem;
letter-spacing: 0.01em;
}
.chat-header-badge {
background: rgba(16, 185, 129, 0.2);
color: #10b981;
padding: 2px 10px;
border-radius: 20px;
font-size: 0.7rem;
font-weight: 600;
margin-left: auto;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Suggestion Chips */
.suggestion-chips {
margin-top: 4px;
}
.suggestion-chips button,
div[data-testid="stHorizontalBlock"] .suggestion-chips button {
font-size: 0.72rem !important;
padding: 4px 8px !important;
border-radius: 20px !important;
}
/* Hide Streamlit branding */
#MainMenu { visibility: hidden; }
footer { visibility: hidden; }
</style>
"""