Spaces:
Runtime error
Runtime error
HsiehMinChieh
Major update: UI refactor, Real Price features, Import/Export, SPV removal (Clean Commit)
74728c6 | /* Finance Planning - Custom CSS */ | |
| /* Dark Mode + Glassmorphism Theme */ | |
| /* Google Fonts */ | |
| @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap"); | |
| /* Root Variables */ | |
| :root { | |
| --primary: #f59e0b; | |
| --secondary: #fbbf24; | |
| --cta: #8b5cf6; | |
| --bg-dark: #0f172a; | |
| --bg-card: #1e293b; | |
| --text-primary: #f8fafc; | |
| --text-muted: #94a3b8; | |
| --border: #334155; | |
| --income: #10b981; | |
| --expense: #ef4444; | |
| --glass-bg: rgba(30, 41, 59, 0.7); | |
| --glass-border: rgba(255, 255, 255, 0.1); | |
| } | |
| /* Global Styles */ | |
| html, | |
| body, | |
| [class*="stApp"] { | |
| font-family: "Inter", "Noto Sans TC", sans-serif ; | |
| } | |
| /* Main container */ | |
| .stApp { | |
| background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) ; | |
| } | |
| /* Headers */ | |
| h1, | |
| h2, | |
| h3 { | |
| font-family: "Noto Sans TC", "Inter", sans-serif ; | |
| color: var(--text-primary) ; | |
| font-weight: 600 ; | |
| } | |
| h1 { | |
| background: linear-gradient( | |
| 90deg, | |
| var(--primary), | |
| var(--secondary) | |
| ) ; | |
| -webkit-background-clip: text ; | |
| -webkit-text-fill-color: transparent ; | |
| background-clip: text ; | |
| } | |
| /* Sidebar */ | |
| [data-testid="stSidebar"] { | |
| background: var(--glass-bg) ; | |
| backdrop-filter: blur(20px) ; | |
| -webkit-backdrop-filter: blur(20px) ; | |
| border-right: 1px solid var(--glass-border) ; | |
| } | |
| [data-testid="stSidebar"] h1, | |
| [data-testid="stSidebar"] h2, | |
| [data-testid="stSidebar"] h3 { | |
| color: var(--primary) ; | |
| -webkit-text-fill-color: var(--primary) ; | |
| } | |
| /* Cards / Metric containers */ | |
| [data-testid="stMetric"] { | |
| background: var(--glass-bg) ; | |
| backdrop-filter: blur(10px) ; | |
| -webkit-backdrop-filter: blur(10px) ; | |
| border: 1px solid var(--glass-border) ; | |
| border-radius: 12px ; | |
| padding: 1rem ; | |
| transition: | |
| transform 0.2s ease-out, | |
| box-shadow 0.2s ease-out ; | |
| } | |
| [data-testid="stMetric"]:hover { | |
| transform: translateY(-2px) ; | |
| box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15) ; | |
| } | |
| [data-testid="stMetricLabel"] { | |
| color: var(--text-muted) ; | |
| font-size: 0.875rem ; | |
| } | |
| [data-testid="stMetricValue"] { | |
| color: var(--text-primary) ; | |
| font-weight: 600 ; | |
| font-size: 1.5rem ; | |
| } | |
| /* Tabs */ | |
| .stTabs [data-baseweb="tab-list"] { | |
| gap: 8px ; | |
| background: var(--glass-bg) ; | |
| padding: 0.5rem ; | |
| border-radius: 12px ; | |
| border: 1px solid var(--glass-border) ; | |
| } | |
| .stTabs [data-baseweb="tab"] { | |
| background: transparent ; | |
| color: var(--text-muted) ; | |
| border-radius: 8px ; | |
| padding: 0.5rem 1rem ; | |
| transition: all 0.2s ease-out ; | |
| } | |
| .stTabs [aria-selected="true"] { | |
| background: var(--primary) ; | |
| color: var(--bg-dark) ; | |
| font-weight: 600 ; | |
| } | |
| /* DataFrames */ | |
| [data-testid="stDataFrame"] { | |
| background: var(--glass-bg) ; | |
| border: 1px solid var(--glass-border) ; | |
| border-radius: 12px ; | |
| overflow: hidden ; | |
| } | |
| [data-testid="stDataFrame"] th { | |
| background: var(--bg-card) ; | |
| color: var(--primary) ; | |
| font-weight: 600 ; | |
| } | |
| [data-testid="stDataFrame"] td { | |
| color: var(--text-primary) ; | |
| } | |
| /* Buttons */ | |
| .stButton > button { | |
| background: linear-gradient( | |
| 135deg, | |
| var(--primary), | |
| var(--secondary) | |
| ) ; | |
| color: var(--bg-dark) ; | |
| border: none ; | |
| border-radius: 8px ; | |
| font-weight: 600 ; | |
| padding: 0.5rem 1.5rem ; | |
| transition: | |
| transform 0.2s ease-out, | |
| box-shadow 0.2s ease-out ; | |
| } | |
| .stButton > button:hover { | |
| transform: translateY(-2px) ; | |
| box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3) ; | |
| } | |
| .stButton > button[kind="primary"] { | |
| background: linear-gradient(135deg, var(--cta), #a78bfa) ; | |
| color: white ; | |
| } | |
| /* Form inputs */ | |
| .stTextInput > div > div > input, | |
| .stNumberInput > div > div > input, | |
| .stSelectbox > div > div > div { | |
| background: var(--bg-card) ; | |
| border: 1px solid var(--border) ; | |
| border-radius: 8px ; | |
| color: var(--text-primary) ; | |
| } | |
| .stTextInput > div > div > input:focus, | |
| .stNumberInput > div > div > input:focus { | |
| border-color: var(--primary) ; | |
| box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) ; | |
| } | |
| /* Dividers */ | |
| hr { | |
| border-color: var(--border) ; | |
| opacity: 0.5 ; | |
| } | |
| /* Plotly charts - transparent background */ | |
| .js-plotly-plot .plotly .main-svg { | |
| background: transparent ; | |
| } | |
| /* Info/Warning boxes */ | |
| .stAlert { | |
| background: var(--glass-bg) ; | |
| border: 1px solid var(--glass-border) ; | |
| border-radius: 12px ; | |
| backdrop-filter: blur(10px) ; | |
| } | |
| /* Scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: var(--bg-dark); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: var(--border); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: var(--primary); | |
| } | |
| /* Reduced motion */ | |
| @media (prefers-reduced-motion: reduce) { | |
| * { | |
| transition: none ; | |
| animation: none ; | |
| } | |
| } | |