Spaces:
Sleeping
Sleeping
| """Global CSS injection for visual polish.""" | |
| import streamlit as st | |
| def inject_css() -> None: | |
| st.markdown("""<style> | |
| /* ββ Page top padding ββ */ | |
| .main .block-container { padding-top: 1.6rem; } | |
| /* ββ Section headers ββ */ | |
| h1 { font-weight: 800; letter-spacing: -0.02em; } | |
| h2, h3 { | |
| padding-bottom: 6px; | |
| border-bottom: 2px solid rgba(59,130,246,0.22); | |
| margin-top: 1.4rem !important; | |
| } | |
| /* ββ Divider ββ */ | |
| hr { border-color: rgba(59,130,246,0.15) !important; margin: 1.2rem 0 !important; } | |
| /* ββ Sidebar ββ */ | |
| [data-testid="stSidebar"] { | |
| background: rgba(15,23,42,0.03); | |
| border-right: 1px solid rgba(59,130,246,0.1); | |
| } | |
| /* Sidebar nav section labels */ | |
| [data-testid="stSidebarNavSeparator"] { | |
| border-color: rgba(59,130,246,0.15) !important; | |
| } | |
| /* Sidebar nav links */ | |
| [data-testid="stSidebarNavLink"] { | |
| border-radius: 8px !important; | |
| margin: 1px 4px !important; | |
| font-weight: 500; | |
| } | |
| [data-testid="stSidebarNavLink"]:hover { | |
| background: rgba(59,130,246,0.1) !important; | |
| } | |
| [data-testid="stSidebarNavLink"][aria-selected="true"] { | |
| background: rgba(59,130,246,0.15) !important; | |
| border-left: 3px solid #3B82F6 !important; | |
| } | |
| /* ββ Metric containers (used in some pages still) ββ */ | |
| [data-testid="metric-container"] { | |
| background: rgba(59,130,246,0.06); | |
| border: 1px solid rgba(59,130,246,0.18); | |
| border-left: 4px solid #3B82F6; | |
| border-radius: 10px; | |
| padding: 14px 18px; | |
| box-shadow: 0 2px 6px rgba(0,0,0,0.07); | |
| } | |
| [data-testid="stMetricValue"] { | |
| font-size: 1.6rem !important; | |
| font-weight: 700 !important; | |
| } | |
| /* ββ Dataframe ββ */ | |
| [data-testid="stDataFrame"] { border-radius: 8px; overflow: hidden; } | |
| /* ββ Alert/info boxes ββ */ | |
| [data-testid="stAlert"] { border-radius: 8px !important; } | |
| /* ββ Buttons ββ */ | |
| .stButton > button { | |
| border-radius: 8px !important; | |
| font-weight: 600 !important; | |
| border: 1px solid rgba(59,130,246,0.35) !important; | |
| } | |
| .stButton > button:hover { | |
| background: rgba(59,130,246,0.1) !important; | |
| border-color: #3B82F6 !important; | |
| } | |
| /* ββ Text inputs ββ */ | |
| [data-testid="stTextInput"] input { | |
| border-radius: 8px !important; | |
| } | |
| </style>""", unsafe_allow_html=True) | |