WFM / src /style.css
Dhom1's picture
Upload 13 files
42ccbd9 verified
/* Health Matrix AI Command Center - Modern Streamlit Styling */
/* Import fonts for Arabic/English support */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');
/* CSS Variables for Health Matrix Theme */
:root {
/* Health Matrix Color Palette */
--primary-blue: #003B70;
--secondary-blue: #004C97;
--accent-teal: #14B8A6;
--accent-green: #36BA01;
--silver: #94A3B8;
--light-silver: #CBD5E1;
/* Semantic Colors */
--success: #16a34a;
--warning: #D97706;
--error: #DC2626;
--info: #0EA5E9;
/* Background Colors */
--bg-primary: #FFFFFF;
--bg-secondary: #F8FAFC;
--bg-tertiary: #F1F5F9;
--bg-card: rgba(255, 255, 255, 0.9);
--bg-glass: rgba(255, 255, 255, 0.6);
/* Text Colors */
--text-primary: #0F172A;
--text-secondary: #1F2937;
--text-muted: #64748B;
--text-light: #94A3B8;
/* Border Colors */
--border-light: #E5E7EB;
--border-medium: #D1D5DB;
/* Shadows */
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
--shadow-glow: 0 0 20px rgba(20, 184, 166, 0.3);
/* Spacing */
--spacing-xs: 0.25rem;
--spacing-sm: 0.5rem;
--spacing-md: 1rem;
--spacing-lg: 1.5rem;
--spacing-xl: 2rem;
--spacing-2xl: 3rem;
/* Border Radius */
--radius-sm: 0.375rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-2xl: 1.5rem;
/* Transitions */
--transition-fast: 0.15s ease;
--transition-normal: 0.3s ease;
--transition-slow: 0.5s ease;
}
/* Base Styles */
html, body {
font-family: 'Inter', 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
color: var(--text-primary);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Hide Streamlit default elements */
.stDeployButton {
display: none;
}
header[data-testid="stHeader"] {
display: none;
}
.stMainBlockContainer {
padding-top: 0;
max-width: 1400px;
}
/* Hero Section */
.hero-section {
text-align: center;
padding: var(--spacing-2xl) var(--spacing-md);
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
position: relative;
overflow: hidden;
}
.hero-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
radial-gradient(circle at 80% 70%, rgba(0, 59, 112, 0.1) 0%, transparent 50%);
pointer-events: none;
}
.hero-content {
position: relative;
z-index: 1;
max-width: 1200px;
margin: 0 auto;
}
.hero-logo img {
width: 180px;
height: auto;
margin-bottom: var(--spacing-lg);
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}
.hero-title {
margin: 0 0 var(--spacing-lg);
font-weight: 900;
line-height: 1.2;
}
.gradient-text {
font-size: 3.5rem;
background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 50%, var(--secondary-blue) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 200% 200%;
animation: gradientShift 8s ease-in-out infinite;
}
.subtitle {
font-size: 2.5rem;
color: var(--text-secondary);
font-weight: 700;
}
.hero-description {
font-size: 1.25rem;
color: var(--text-muted);
max-width: 800px;
margin: 0 auto var(--spacing-2xl);
line-height: 1.7;
}
.hero-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: var(--spacing-lg);
max-width: 800px;
margin: 0 auto;
}
.stat-item {
background: var(--bg-glass);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--spacing-lg);
text-align: center;
transition: all var(--transition-normal);
box-shadow: var(--shadow-md);
}
.stat-item:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-xl);
border-color: var(--accent-teal);
}
.stat-value {
font-size: 2.5rem;
font-weight: 900;
color: var(--primary-blue);
margin-bottom: var(--spacing-xs);
}
.stat-label {
font-size: 1rem;
color: var(--text-muted);
font-weight: 500;
}
/* Business Case Card */
.business-case {
background: var(--bg-card);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--spacing-lg);
margin: var(--spacing-xl) auto;
max-width: 1200px;
box-shadow: var(--shadow-md);
}
.business-case h4 {
color: var(--primary-blue);
font-weight: 700;
margin-bottom: var(--spacing-md);
font-size: 1.25rem;
}
.business-case ul {
list-style: none;
padding: 0;
margin: 0;
}
.business-case li {
padding: var(--spacing-sm) 0;
color: var(--text-secondary);
font-weight: 500;
}
/* Status Indicator */
.status-indicator {
display: flex;
align-items: center;
justify-content: center;
gap: var(--spacing-sm);
background: var(--bg-glass);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--spacing-md) var(--spacing-lg);
margin: var(--spacing-lg) auto;
max-width: 600px;
font-weight: 500;
transition: all var(--transition-normal);
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.ready {
background: var(--accent-green);
}
.status-dot.processing {
background: var(--info);
}
.status-dot.completed {
background: var(--success);
}
.status-dot.pulsing {
animation: pulse 1.5s ease-in-out infinite;
}
.status-indicator.processing {
border-color: var(--info);
background: rgba(14, 165, 233, 0.1);
}
.status-indicator.completed {
border-color: var(--success);
background: rgba(22, 163, 74, 0.1);
}
/* CTA Container */
.cta-container {
text-align: center;
margin: var(--spacing-xl) 0;
}
/* Streamlit Button Styling */
.stButton > button {
background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-teal) 50%, var(--secondary-blue) 100%) !important;
color: white !important;
border: none !important;
border-radius: var(--radius-xl) !important;
padding: var(--spacing-md) var(--spacing-2xl) !important;
font-size: 1.125rem !important;
font-weight: 700 !important;
transition: all var(--transition-normal) !important;
box-shadow: var(--shadow-lg) !important;
background-size: 200% 200% !important;
animation: gradientShift 8s ease-in-out infinite !important;
}
.stButton > button:hover {
transform: translateY(-2px) scale(1.02) !important;
box-shadow: var(--shadow-glow) !important;
}
.stButton > button:active {
transform: translateY(0) scale(0.98) !important;
}
/* Overview Metrics */
.overview-metrics {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-sm);
justify-content: center;
margin: var(--spacing-lg) 0;
}
.metric-chip {
background: var(--bg-glass);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-2xl);
padding: var(--spacing-sm) var(--spacing-md);
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
white-space: nowrap;
}
/* KPI Grid */
.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: var(--spacing-lg);
margin: var(--spacing-xl) 0;
}
.kpi-card {
background: var(--bg-card);
backdrop-filter: blur(10px);
border: 2px solid transparent;
border-radius: var(--radius-xl);
padding: var(--spacing-lg);
text-align: center;
position: relative;
overflow: hidden;
transition: all var(--transition-normal);
box-shadow: var(--shadow-md);
}
.kpi-card::before {
content: '';
position: absolute;
inset: 0;
padding: 2px;
background: linear-gradient(135deg, var(--accent-green), var(--accent-teal), var(--secondary-blue));
border-radius: inherit;
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask-composite: exclude;
background-size: 300% 300%;
animation: borderShift 8s ease infinite;
}
.kpi-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-xl);
}
.kpi-icon {
font-size: 2rem;
margin-bottom: var(--spacing-md);
}
.kpi-value {
font-size: 2.5rem;
font-weight: 900;
color: var(--primary-blue);
margin-bottom: var(--spacing-xs);
line-height: 1;
}
.kpi-label {
font-size: 1rem;
color: var(--text-muted);
font-weight: 500;
margin-bottom: var(--spacing-sm);
}
.kpi-change {
font-size: 0.875rem;
font-weight: 600;
padding: var(--spacing-xs) var(--spacing-sm);
border-radius: var(--radius-2xl);
background: rgba(22, 163, 74, 0.1);
color: var(--success);
display: inline-block;
}
/* Timeline */
.timeline-container {
background: var(--bg-card);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--spacing-lg);
margin: var(--spacing-lg) 0;
box-shadow: var(--shadow-md);
position: sticky;
top: var(--spacing-lg);
}
.timeline {
position: relative;
padding-left: var(--spacing-xl);
}
.timeline::before {
content: '';
position: absolute;
left: 12px;
top: 0;
bottom: 0;
width: 2px;
background: var(--border-medium);
}
.timeline-item {
position: relative;
margin-bottom: var(--spacing-lg);
opacity: 0;
transform: translateX(-20px);
animation: slideInLeft 0.6s ease-out forwards;
}
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-marker {
position: absolute;
left: -18px;
top: 8px;
width: 12px;
height: 12px;
border-radius: 50%;
border: 2px solid var(--bg-primary);
background: var(--silver);
box-shadow: 0 0 0 2px var(--border-medium);
transition: all var(--transition-normal);
}
.timeline-item.done .timeline-marker {
background: var(--accent-green);
}
.timeline-item.current .timeline-marker {
background: var(--secondary-blue);
animation: pulse 2s ease-in-out infinite;
}
.timeline-content {
background: var(--bg-glass);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: var(--spacing-md);
transition: all var(--transition-normal);
}
.timeline-content:hover {
border-color: var(--accent-teal);
box-shadow: var(--shadow-md);
}
.timeline-title {
font-weight: 700;
color: var(--text-primary);
margin-bottom: var(--spacing-xs);
}
.timeline-meta {
font-size: 0.875rem;
color: var(--text-light);
margin-bottom: var(--spacing-xs);
}
.timeline-desc {
font-size: 0.9rem;
color: var(--text-muted);
line-height: 1.5;
}
/* Kanban Board */
.kanban-board {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: var(--spacing-lg);
margin: var(--spacing-xl) 0;
}
.kanban-lane {
background: var(--bg-card);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--spacing-lg);
box-shadow: var(--shadow-md);
min-height: 400px;
}
.lane-header {
display: flex;
align-items: center;
gap: var(--spacing-sm);
margin-bottom: var(--spacing-lg);
font-weight: 700;
font-size: 1.125rem;
}
.lane-icon {
font-size: 1.25rem;
}
.lane-title {
flex: 1;
}
.lane-count {
background: var(--bg-tertiary);
color: var(--text-muted);
padding: var(--spacing-xs) var(--spacing-sm);
border-radius: var(--radius-2xl);
font-size: 0.875rem;
font-weight: 500;
border: 1px solid var(--border-light);
}
.assigned-header {
color: var(--success);
}
.notify-header {
color: var(--info);
}
.skipped-header {
color: var(--warning);
}
.lane-content {
display: flex;
flex-direction: column;
gap: var(--spacing-md);
}
/* Employee Cards */
.employee-card {
background: var(--bg-glass);
backdrop-filter: blur(10px);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: var(--spacing-md);
transition: all var(--transition-normal);
position: relative;
overflow: hidden;
opacity: 0;
transform: translateY(20px);
animation: slideInUp 0.5s ease-out forwards;
}
.employee-card::before {
content: '';
position: absolute;
top: -50%;
left: -20%;
right: -20%;
height: 100%;
background:
radial-gradient(circle at 30% 40%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
radial-gradient(circle at 70% 60%, rgba(0, 59, 112, 0.08) 0%, transparent 50%);
filter: blur(20px);
opacity: 0.7;
pointer-events: none;
animation: aurora 15s linear infinite;
}
.employee-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--accent-teal);
}
.assigned-card {
border-left: 4px solid var(--success);
}
.notify-card {
border-left: 4px solid var(--info);
}
.skipped-card {
border-left: 4px solid var(--warning);
}
.emp-header {
display: flex;
align-items: center;
gap: var(--spacing-md);
margin-bottom: var(--spacing-md);
position: relative;
z-index: 1;
}
.emp-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent-teal), var(--secondary-blue));
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
color: white;
font-size: 1.125rem;
flex-shrink: 0;
}
.emp-info {
flex: 1;
}
.emp-name {
font-weight: 700;
color: var(--text-primary);
margin-bottom: var(--spacing-xs);
}
.emp-shift {
font-size: 0.875rem;
color: var(--text-muted);
}
.emp-chip {
padding: var(--spacing-xs) var(--spacing-sm);
border-radius: var(--radius-2xl);
font-size: 0.75rem;
font-weight: 600;
border: 1px solid;
white-space: nowrap;
}
.chip-ok {
background: rgba(22, 163, 74, 0.1);
color: var(--success);
border-color: rgba(22, 163, 74, 0.3);
}
.chip-warn {
background: rgba(217, 119, 6, 0.1);
color: var(--warning);
border-color: rgba(217, 119, 6, 0.3);
}
.chip-fail {
background: rgba(220, 38, 38, 0.1);
color: var(--error);
border-color: rgba(220, 38, 38, 0.3);
}
.emp-divider {
height: 1px;
background: var(--border-light);
margin: var(--spacing-md) 0;
}
.emp-badges {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: var(--spacing-sm);
margin-bottom: var(--spacing-md);
position: relative;
z-index: 1;
}
.emp-badge {
display: flex;
align-items: center;
gap: var(--spacing-xs);
padding: var(--spacing-sm);
border-radius: var(--radius-md);
font-size: 0.875rem;
font-weight: 500;
border: 1px solid;
}
.badge-ok {
background: rgba(22, 163, 74, 0.1);
color: var(--success);
border-color: rgba(22, 163, 74, 0.2);
}
.badge-fail {
background: rgba(220, 38, 38, 0.1);
color: var(--error);
border-color: rgba(220, 38, 38, 0.2);
}
.badge-info {
background: rgba(14, 165, 233, 0.1);
color: var(--info);
border-color: rgba(14, 165, 233, 0.2);
}
.badge-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.badge-ok .badge-dot {
background: var(--success);
}
.badge-fail .badge-dot {
background: var(--error);
}
.badge-info .badge-dot {
background: var(--info);
}
.emp-footer {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-sm);
align-items: center;
position: relative;
z-index: 1;
}
.emp-certs {
flex: 1;
font-size: 0.875rem;
color: var(--text-muted);
padding: var(--spacing-xs) var(--spacing-sm);
background: var(--bg-tertiary);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
}
.emp-meta {
font-size: 0.75rem;
color: var(--text-light);
font-style: italic;
}
/* Footer */
.footer {
margin-top: var(--spacing-2xl);
padding-top: var(--spacing-xl);
}
.footer hr {
border: none;
height: 1px;
background: var(--border-light);
margin-bottom: var(--spacing-lg);
}
.footer-content {
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
}
.footer-content a {
color: var(--accent-teal);
text-decoration: none;
transition: color var(--transition-fast);
}
.footer-content a:hover {
color: var(--secondary-blue);
}
/* Streamlit Expander Styling */
.streamlit-expanderHeader {
background: var(--bg-glass) !important;
backdrop-filter: blur(10px) !important;
border: 1px solid var(--border-light) !important;
border-radius: var(--radius-lg) !important;
font-weight: 600 !important;
}
.streamlit-expanderContent {
background: var(--bg-card) !important;
backdrop-filter: blur(10px) !important;
border: 1px solid var(--border-light) !important;
border-top: none !important;
border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}
/* Streamlit DataFrame Styling */
.stDataFrame {
background: var(--bg-card);
backdrop-filter: blur(10px);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-md);
}
.stDataFrame table {
border-collapse: collapse;
width: 100%;
}
.stDataFrame thead th {
background: var(--primary-blue) !important;
color: white !important;
font-weight: 600 !important;
padding: var(--spacing-md) !important;
position: sticky;
top: 0;
z-index: 10;
}
.stDataFrame tbody tr:nth-child(odd) {
background: var(--bg-secondary);
}
.stDataFrame tbody td {
padding: var(--spacing-sm) var(--spacing-md) !important;
border-bottom: 1px solid var(--border-light);
}
/* Animations */
@keyframes gradientShift {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
@keyframes borderShift {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
@keyframes pulse {
0%, 100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(20, 184, 166, 0);
}
}
@keyframes slideInLeft {
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInUp {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes aurora {
0%, 100% { transform: translateX(-10%) rotate(0deg); }
33% { transform: translateX(10%) rotate(1deg); }
66% { transform: translateX(-5%) rotate(-1deg); }
}
/* Responsive Design */
@media (max-width: 1200px) {
.timeline-container {
position: static;
}
}
@media (max-width: 768px) {
.gradient-text {
font-size: 2.5rem;
}
.subtitle {
font-size: 1.75rem;
}
.hero-description {
font-size: 1.125rem;
}
.hero-stats {
grid-template-columns: 1fr;
}
.kpi-grid {
grid-template-columns: 1fr;
}
.kanban-board {
grid-template-columns: 1fr;
}
.timeline {
padding-left: 0;
}
.timeline::before {
display: none;
}
.timeline-marker {
position: static;
margin-bottom: var(--spacing-sm);
}
.emp-badges {
grid-template-columns: 1fr;
}
.emp-footer {
flex-direction: column;
align-items: flex-start;
}
}
@media (max-width: 480px) {
.hero-section {
padding: var(--spacing-xl) var(--spacing-sm);
}
.gradient-text {
font-size: 2rem;
}
.subtitle {
font-size: 1.5rem;
}
.overview-metrics {
flex-direction: column;
}
.metric-chip {
text-align: center;
}
}
/* RTL Support */
[dir="rtl"] {
font-family: 'Cairo', 'Tajawal', 'Inter', system-ui, -apple-system, sans-serif;
}
[dir="rtl"] .timeline {
padding-right: var(--spacing-xl);
padding-left: 0;
}
[dir="rtl"] .timeline::before {
right: 12px;
left: auto;
}
[dir="rtl"] .timeline-marker {
right: -18px;
left: auto;
}
/* High Contrast Mode Support */
@media (prefers-contrast: high) {
:root {
--border-light: #000000;
--border-medium: #000000;
--text-muted: #000000;
--bg-glass: rgba(255, 255, 255, 1);
--bg-card: rgba(255, 255, 255, 1);
}
}
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Print Styles */
@media print {
.hero-section::before,
.employee-card::before {
display: none;
}
.status-indicator,
.cta-container {
display: none;
}
.timeline-container {
position: static;
}
* {
background: white !important;
color: black !important;
box-shadow: none !important;
}
}