/* ═══════════════════════════════════════════════════════ ICD-10 Automated Coding System — Premium Dark Theme ═══════════════════════════════════════════════════════ */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap'); /* ── Root Variables ── */ :root { --bg-primary: #0a0e1a; --bg-secondary: #111827; --bg-card: #1a2235; --bg-card-hover: #1f2a42; --bg-elevated: #243049; --text-primary: #e8ecf4; --text-secondary: #94a3b8; --text-muted: #64748b; --accent-teal: #06d6a0; --accent-teal-dim: rgba(6, 214, 160, 0.15); --accent-blue: #4cc9f0; --accent-blue-dim: rgba(76, 201, 240, 0.12); --accent-purple: #7c3aed; --accent-amber: #f59e0b; --accent-rose: #f43f5e; --border-subtle: rgba(148, 163, 184, 0.08); --border-medium: rgba(148, 163, 184, 0.15); --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4); --shadow-glow: 0 0 30px rgba(6, 214, 160, 0.08); --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; } /* ── Global Styles ── */ .stApp { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary) !important; } .main .block-container { max-width: 1200px; padding-top: 2rem; } /* ── Sidebar ── */ [data-testid="stSidebar"] { background: linear-gradient(180deg, #0d1321 0%, #111827 100%) !important; border-right: 1px solid var(--border-subtle); } [data-testid="stSidebar"] .stMarkdown h1, [data-testid="stSidebar"] .stMarkdown h2, [data-testid="stSidebar"] .stMarkdown h3 { color: var(--accent-teal) !important; } /* ── Hero Section ── */ .hero-container { background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 50%, #162447 100%); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: 3rem 2.5rem; margin-bottom: 2rem; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); } .hero-container::before { content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(6, 214, 160, 0.06) 0%, transparent 70%); pointer-events: none; } .hero-container::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(76, 201, 240, 0.04) 0%, transparent 70%); pointer-events: none; } .hero-title { font-size: 2.6rem; font-weight: 800; background: linear-gradient(135deg, #06d6a0 0%, #4cc9f0 50%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.5rem; letter-spacing: -0.02em; line-height: 1.15; } .hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); font-weight: 400; line-height: 1.6; max-width: 650px; } /* ── Stat Cards ── */ .stat-card { background: #1a2235 !important; border: 1px solid rgba(148, 163, 184, 0.08) !important; border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; color: #e8ecf4 !important; } .stat-card:hover { border-color: var(--accent-teal); transform: translateY(-2px); box-shadow: var(--shadow-glow); } .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue)); opacity: 0; transition: opacity 0.3s ease; } .stat-card:hover::before { opacity: 1; } .stat-number { font-size: 2.2rem; font-weight: 800; color: var(--accent-teal); font-family: 'JetBrains Mono', monospace; line-height: 1.2; } .stat-label { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.4rem; font-weight: 500; } /* ── Prediction Result Cards ── */ .pred-card { background: #1a2235 !important; border: 1px solid rgba(148, 163, 184, 0.08) !important; border-radius: var(--radius-md); padding: 1.2rem 1.5rem; margin-bottom: 0.75rem; transition: all 0.25s ease; display: flex; align-items: center; gap: 1.2rem; color: #e8ecf4 !important; } .pred-card:hover { background: var(--bg-card-hover); border-color: var(--border-medium); transform: translateX(4px); } .pred-rank { font-size: 1.1rem; font-weight: 700; color: var(--text-muted); min-width: 30px; font-family: 'JetBrains Mono', monospace; } .pred-code { font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 600; color: var(--accent-teal); background: var(--accent-teal-dim); padding: 0.25rem 0.6rem; border-radius: 6px; min-width: 80px; text-align: center; } .pred-desc { flex: 1; } .pred-desc-en { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; } .pred-desc-zh { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; } .confidence-high { color: #06d6a0; } .confidence-med { color: #f59e0b; } .confidence-low { color: #f43f5e; } /* ── Confidence Bar ── */ .conf-bar-bg { background: rgba(255, 255, 255, 0.06); border-radius: 6px; height: 8px; width: 120px; overflow: hidden; } .conf-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .conf-bar-fill-high { background: linear-gradient(90deg, #06d6a0, #34d399); } .conf-bar-fill-med { background: linear-gradient(90deg, #f59e0b, #fbbf24); } .conf-bar-fill-low { background: linear-gradient(90deg, #f43f5e, #fb7185); } /* ── Section Headers ── */ .section-header { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.6rem; } .section-accent { width: 4px; height: 28px; background: linear-gradient(180deg, var(--accent-teal), var(--accent-blue)); border-radius: 4px; } /* ── Pipeline Diagram ── */ .pipeline-step { background: #1a2235 !important; border: 1px solid rgba(148, 163, 184, 0.08) !important; border-radius: var(--radius-md); padding: 1.2rem 1.5rem; margin-bottom: 0.5rem; position: relative; transition: all 0.3s ease; color: #e8ecf4 !important; } .pipeline-step:hover { border-color: var(--accent-teal); box-shadow: var(--shadow-glow); } .pipeline-arrow { text-align: center; font-size: 1.5rem; color: var(--accent-teal); margin: 0.3rem 0; } /* ── Model Cards ── */ .model-card { background: linear-gradient(135deg, #1a2235 0%, #243049 100%) !important; border: 1px solid rgba(148, 163, 184, 0.08) !important; border-radius: var(--radius-lg); padding: 1.8rem; transition: all 0.3s ease; color: #e8ecf4 !important; } .model-card:hover { border-color: var(--accent-blue); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(76, 201, 240, 0.1); } .model-card-title { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; } .model-card-metric { font-family: 'JetBrains Mono', monospace; font-size: 1.8rem; font-weight: 800; color: var(--accent-teal); } .model-card-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; } /* ── Badge ── */ .badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; } .badge-teal { background: var(--accent-teal-dim); color: var(--accent-teal); } .badge-blue { background: var(--accent-blue-dim); color: var(--accent-blue); } .badge-purple { background: rgba(124, 58, 237, 0.15); color: #a78bfa; } .badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; } /* ── Sample Note Cards ── */ .sample-card { background: #1a2235 !important; border: 1px solid rgba(148, 163, 184, 0.08) !important; border-radius: var(--radius-md); padding: 1rem 1.2rem; cursor: pointer; transition: all 0.25s ease; color: #e8ecf4 !important; } .sample-card:hover { background: #1f2a42 !important; border-color: #06d6a0 !important; transform: translateY(-2px); } /* ── ICD Browser Table ── */ .icd-row { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0.8rem 1.2rem; margin-bottom: 0.4rem; display: grid; grid-template-columns: 100px 1fr 1fr 120px; gap: 1rem; align-items: center; transition: all 0.2s ease; } .icd-row:hover { background: var(--bg-card-hover); border-color: var(--border-medium); } /* ── Misc ── */ .divider { height: 1px; background: var(--border-subtle); margin: 2rem 0; } /* Override Streamlit defaults for dark theme */ .stTextArea textarea { background: var(--bg-card) !important; border-color: var(--border-medium) !important; color: var(--text-primary) !important; border-radius: var(--radius-md) !important; font-family: 'JetBrains Mono', monospace !important; font-size: 0.9rem !important; } .stTextArea textarea:focus { border-color: var(--accent-teal) !important; box-shadow: 0 0 0 2px var(--accent-teal-dim) !important; } .stSelectbox>div>div { background: var(--bg-card) !important; border-color: var(--border-medium) !important; border-radius: var(--radius-md) !important; } .stSlider>div>div>div { background: var(--accent-teal) !important; } /* ── Animated gradient border for active predictions ── */ @keyframes borderGlow { 0% { border-color: rgba(6, 214, 160, 0.3); } 50% { border-color: rgba(76, 201, 240, 0.5); } 100% { border-color: rgba(6, 214, 160, 0.3); } } .result-active { animation: borderGlow 2s infinite; } /* ── Pulse animation for loading ── */ @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .loading-pulse { animation: pulse 1.5s infinite; } /* ── Metric comparison highlight ── */ .metric-best { background: var(--accent-teal-dim); padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 700; } /* ── Scrollbar ── */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: var(--bg-secondary); } ::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); } /* ── Footer ── */ .footer { text-align: center; padding: 2rem 0; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border-subtle); margin-top: 3rem; } /* ── Agreement Panel ── */ .agreement-full { border-left: 4px solid var(--accent-teal); background: rgba(6, 214, 160, 0.05); } .agreement-partial { border-left: 4px solid var(--accent-amber); background: rgba(245, 158, 11, 0.05); } .agreement-none { border-left: 4px solid var(--accent-rose); background: rgba(244, 63, 94, 0.05); } /* ── Batch Progress ── */ .stProgress>div>div>div>div { background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue)) !important; } /* ── File Upload Zone ── */ [data-testid="stFileUploader"] { border-color: var(--border-medium) !important; } [data-testid="stFileUploader"]:hover { border-color: var(--accent-teal) !important; } /* ── Download Button ── */ .stDownloadButton>button { background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue)) !important; color: #0a0e1a !important; font-weight: 600 !important; border: none !important; border-radius: var(--radius-md) !important; transition: all 0.3s ease !important; } .stDownloadButton>button:hover { transform: translateY(-2px) !important; box-shadow: 0 6px 20px rgba(6, 214, 160, 0.25) !important; } /* ── Comparison Mode Grid ── */ .compare-col .pred-card { padding: 0.7rem 1rem; margin-bottom: 0.3rem; } /* ── Batch Result Table Overrides ── */ .stDataFrame { border-radius: var(--radius-md) !important; overflow: hidden; } /* ═══════════════════════════════════════════════════════ FORCE DARK MODE ON ALL STREAMLIT ELEMENTS Overrides system light theme so the app is ALWAYS dark. ═══════════════════════════════════════════════════════ */ /* ── Force dark on root & main container ── */ html, body, [data-testid="stAppViewContainer"], [data-testid="stApp"], .stApp, [data-testid="stAppViewBlockContainer"], .main, .main .block-container, [data-testid="stHeader"], [data-testid="stToolbar"] { background-color: #0a0e1a !important; color: #e8ecf4 !important; } /* ── Force sidebar dark ── */ [data-testid="stSidebar"], [data-testid="stSidebar"]>div, [data-testid="stSidebarContent"], section[data-testid="stSidebar"] { background: linear-gradient(180deg, #0d1321 0%, #111827 100%) !important; color: #e8ecf4 !important; } /* ── All text elements ── */ .stApp p, .stApp span, .stApp label, .stApp div, .stApp li, .stApp td, .stApp th, [data-testid="stMarkdownContainer"], [data-testid="stMarkdownContainer"] p, [data-testid="stMarkdownContainer"] span, [data-testid="stMarkdownContainer"] li { color: #e8ecf4 !important; } /* ── Headings ── */ .stApp h1, .stApp h2, .stApp h3, .stApp h4, .stApp h5, .stApp h6 { color: #e8ecf4 !important; } /* ── Text inputs & text areas ── */ .stTextInput input, .stTextInput>div>div>input, [data-testid="stTextInput"] input { background: #1a2235 !important; color: #e8ecf4 !important; border-color: rgba(148, 163, 184, 0.15) !important; } .stTextArea textarea, [data-testid="stTextArea"] textarea { background: #1a2235 !important; color: #e8ecf4 !important; border-color: rgba(148, 163, 184, 0.15) !important; font-family: 'JetBrains Mono', monospace !important; } .stTextInput input:focus, .stTextArea textarea:focus { border-color: #06d6a0 !important; box-shadow: 0 0 0 2px rgba(6, 214, 160, 0.15) !important; } /* ── Number inputs ── */ .stNumberInput input, [data-testid="stNumberInput"] input { background: #1a2235 !important; color: #e8ecf4 !important; border-color: rgba(148, 163, 184, 0.15) !important; } /* ── Select boxes / dropdowns ── */ .stSelectbox>div>div, [data-testid="stSelectbox"]>div>div, .stMultiSelect>div>div { background: #1a2235 !important; color: #e8ecf4 !important; border-color: rgba(148, 163, 184, 0.15) !important; } [data-testid="stSelectbox"] span, .stSelectbox span { color: #e8ecf4 !important; } /* ── Radio buttons & checkboxes ── */ .stRadio label, .stCheckbox label, [data-testid="stRadio"] label, [data-testid="stCheckbox"] label { color: #e8ecf4 !important; } /* ── Sliders ── */ .stSlider label, [data-testid="stSlider"] label { color: #e8ecf4 !important; } .stSlider>div>div>div>div { background: #06d6a0 !important; } /* ── File uploader ── */ [data-testid="stFileUploader"], [data-testid="stFileUploader"]>div { background: #1a2235 !important; border-color: rgba(148, 163, 184, 0.15) !important; color: #e8ecf4 !important; } [data-testid="stFileUploader"] label, [data-testid="stFileUploader"] span, [data-testid="stFileUploader"] p, [data-testid="stFileUploader"] small { color: #e8ecf4 !important; } [data-testid="stFileUploaderDropzone"] { background: #1a2235 !important; border-color: rgba(148, 163, 184, 0.2) !important; } /* ── Buttons ── */ .stButton>button { color: #e8ecf4 !important; border-color: rgba(148, 163, 184, 0.15) !important; } .stButton>button[kind="primary"], .stButton>button[data-testid="stBaseButton-primary"] { background: linear-gradient(135deg, #06d6a0, #4cc9f0) !important; color: #0a0e1a !important; border: none !important; } /* ── Download button ── */ .stDownloadButton>button { background: linear-gradient(135deg, #06d6a0, #4cc9f0) !important; color: #0a0e1a !important; font-weight: 600 !important; border: none !important; border-radius: 12px !important; } .stDownloadButton>button:hover { transform: translateY(-2px) !important; box-shadow: 0 6px 20px rgba(6, 214, 160, 0.25) !important; } /* ── Expander ── */ [data-testid="stExpander"], [data-testid="stExpander"]>div { background: #1a2235 !important; border-color: rgba(148, 163, 184, 0.1) !important; color: #e8ecf4 !important; } [data-testid="stExpander"] summary, [data-testid="stExpander"] summary span, [data-testid="stExpander"] p { color: #e8ecf4 !important; } /* ── Data frame / tables ── */ [data-testid="stDataFrame"], [data-testid="stDataFrame"]>div, .stDataFrame { background: #1a2235 !important; border-radius: 12px !important; overflow: hidden; } [data-testid="stTable"], [data-testid="stTable"] table { background: #1a2235 !important; color: #e8ecf4 !important; } [data-testid="stTable"] th { background: #243049 !important; color: #e8ecf4 !important; } [data-testid="stTable"] td { background: #1a2235 !important; color: #e8ecf4 !important; } /* ── Alerts / info / warning / error ── */ [data-testid="stAlert"], .stAlert { background: #1a2235 !important; border-color: rgba(148, 163, 184, 0.15) !important; color: #e8ecf4 !important; } .stAlert p, .stAlert span { color: #e8ecf4 !important; } /* ── Spinner ── */ [data-testid="stSpinner"] { color: #e8ecf4 !important; } /* ── Progress bar ── */ .stProgress>div>div>div>div { background: linear-gradient(90deg, #06d6a0, #4cc9f0) !important; } /* ── Tabs ── */ .stTabs [data-baseweb="tab-list"] { background: transparent !important; } .stTabs [data-baseweb="tab"] { color: #94a3b8 !important; } .stTabs [aria-selected="true"] { color: #06d6a0 !important; } /* ── Metric ── */ [data-testid="stMetric"], [data-testid="stMetricValue"], [data-testid="stMetricLabel"] { color: #e8ecf4 !important; } /* ── Tooltip / popover ── */ [data-testid="stTooltipIcon"] { color: #94a3b8 !important; } /* ── Bottom page padding (removes white strip) ── */ .block-container { padding-bottom: 3rem !important; } footer, .reportview-container .main footer { background: #0a0e1a !important; color: #64748b !important; } /* Hide Streamlit's default footer */ footer { visibility: hidden; } /* ── Plotly chart backgrounds ── */ .js-plotly-plot .plotly .main-svg { background: transparent !important; }