Spaces:
Sleeping
Sleeping
Download theme.py from procurement-tools/auto-form: direct link, hf CLI and curl.
- Browser
- Download file 39.5 kB
-
https://huggingface.co/spaces/procurement-tools/auto-form/resolve/main/theme.py
- Command line
-
hf download hf://spaces/procurement-tools/auto-form/theme.py
-
curl -L -o theme.py https://huggingface.co/spaces/procurement-tools/auto-form/resolve/main/theme.py
39.5 kB
| # -*- coding: utf-8 -*- | |
| """ | |
| theme β presentation constants for the Streamlit UI (no logic). | |
| THEME_CSS : the full Warm Peach page theme (fonts + <style> + | |
| the pure-CSS .mobile-block overlay markup). | |
| AI_CREATE_ANIM_HTML : the "AI is composing" animation card shown while | |
| generation blocks on the AI Builder call. | |
| Inject with st.markdown(..., unsafe_allow_html=True). | |
| """ | |
| # AI "creating" animation shown while the document is being written (pure CSS, runs in the | |
| # browser while Python blocks on the AI Builder call + docx render). Ember theme. | |
| AI_CREATE_ANIM_HTML = """ | |
| <div class="ai-create-wrap"> | |
| <div class="ai-create-card"> | |
| <div class="ai-orb"><span class="ai-spark">✨</span></div> | |
| <div class="ai-lines"> | |
| <div class="ai-line"></div> | |
| <div class="ai-line"></div> | |
| <div class="ai-line short"></div> | |
| </div> | |
| <div class="ai-label">AI ΰΈΰΈ³ΰΈ₯ΰΈ±ΰΈΰΉΰΈ£ΰΈ΅ΰΈ’ΰΈΰΉΰΈ£ΰΈ΅ΰΈ’ΰΈΰΉΰΈΰΈΰΈͺΰΈ²ΰΈ£<span class="ai-dots"></span></div> | |
| </div> | |
| </div> | |
| <style> | |
| .ai-create-wrap{display:flex;justify-content:center;padding:6px 0 14px;} | |
| .ai-create-card{width:100%;max-width:430px;padding:22px 24px; | |
| background:#FFFFFF; | |
| border:1px solid rgba(242,106,58,.22);border-radius:16px; | |
| box-shadow:0 18px 40px rgba(214,120,60,.18),0 0 34px rgba(242,106,58,.10); | |
| display:flex;flex-direction:column;align-items:center;gap:16px;} | |
| .ai-orb{width:60px;height:60px;border-radius:50%;display:flex;align-items:center;justify-content:center; | |
| background:radial-gradient(circle at 50% 38%,#FF8A52,#E85D27 60%,#B5471F); | |
| animation:ai-pulse 1.6s ease-out infinite;} | |
| .ai-spark{font-size:26px;line-height:1;animation:ai-spin 2.6s linear infinite; | |
| filter:drop-shadow(0 0 6px rgba(255,180,120,.85));} | |
| @keyframes ai-pulse{0%{box-shadow:0 0 0 0 rgba(242,106,58,.55);}70%{box-shadow:0 0 0 16px rgba(242,106,58,0);}100%{box-shadow:0 0 0 0 rgba(242,106,58,0);}} | |
| @keyframes ai-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}} | |
| .ai-lines{width:100%;display:flex;flex-direction:column;gap:10px;} | |
| .ai-line{height:10px;border-radius:6px; | |
| background:linear-gradient(90deg,rgba(214,128,72,.14) 0%,rgba(245,160,110,.45) 40%,rgba(242,106,58,.85) 50%,rgba(245,160,110,.45) 60%,rgba(214,128,72,.14) 100%); | |
| background-size:220% 100%;animation:ai-shimmer 1.5s linear infinite;} | |
| .ai-line:nth-child(2){animation-delay:.25s;} | |
| .ai-line.short{width:62%;animation-delay:.5s;} | |
| @keyframes ai-shimmer{0%{background-position:120% 0}100%{background-position:-120% 0}} | |
| .ai-label{color:#1E3A8A;font-size:14px;font-weight:600;letter-spacing:.2px;} | |
| .ai-dots::after{content:'';animation:ai-dots 1.4s steps(4,end) infinite;} | |
| @keyframes ai-dots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}100%{content:''}} | |
| </style> | |
| """ | |
| # Warm Peach CSS Theme (light cream canvas + burnt-orange accents) | |
| THEME_CSS = """ | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Sarabun:wght@400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| /* βββ COLORS βββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| Page bg : #FFF4EC β #FCE7D6 (warm peach, coral glow) | |
| Card surface : #FFFFFF (white panel) | |
| Field bg : #FFFFFF (white input) | |
| Text primary : #3E2A1E (espresso brown) | |
| Text label : #6E5848 (warm brown) | |
| Text muted : #9C8676 (muted brown) | |
| Primary action: linear-gradient #F26A3A β #E85D27 (orangeβrust) | |
| Accent orange : #F26A3A Accent rust: #E85D27 Accent ink: #C25A1E | |
| Step done : #F26A3A Step active: orange-tint chip | |
| Border : rgba(214, 128, 72, 0.18) | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* GLOBAL */ | |
| html, body, [class*="css"], .stApp { | |
| font-family: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif !important; | |
| color: #3E2A1E !important; | |
| } | |
| /* Page background β soft warm peach with coral glow blooms (top-left + bottom-right) */ | |
| /* Background lives on <html> with fixed attachment so it fills the viewport | |
| uniformly regardless of document scroll. (Putting it on .stApp caused a | |
| two-tone seam, because .stApp is only viewport-tall while content overflows | |
| below it.) */ | |
| html { | |
| background: | |
| radial-gradient(at 15% 6%, rgba(245, 150, 82, 0.42) 0px, transparent 48%), | |
| radial-gradient(at 86% 94%, rgba(245, 150, 82, 0.22) 0px, transparent 52%), | |
| linear-gradient(180deg, #FFF4EC 0%, #FCE7D6 100%) !important; | |
| background-attachment: fixed !important; | |
| /* Base colour under the fixed gradient β fills any area the fixed image | |
| doesn't paint (below the first viewport on tall pages) so there's no | |
| seam at the bottom. */ | |
| background-color: #FCE7D6 !important; | |
| } | |
| .stApp { background: transparent !important; } | |
| /* Solid peach base behind everything β the html gradient uses fixed | |
| attachment and won't paint below the first viewport on tall pages, which | |
| otherwise shows as a seam at the bottom. */ | |
| body { background-color: #FCE7D6 !important; } | |
| /* Slim, theme-matched scrollbar. No scrollbar-gutter reservation β that left | |
| an empty gutter on the non-scrolling edge which painted with the native | |
| white track color (unreachable by ::-webkit-scrollbar-track), showing as a | |
| white bar. Just a normal right scrollbar with a transparent track + soft | |
| coral thumb, so there is no white bar on either side. */ | |
| html { scrollbar-color: rgba(242, 106, 58, 0.45) transparent; scrollbar-width: thin; } | |
| ::-webkit-scrollbar { width: 10px; height: 10px; } | |
| ::-webkit-scrollbar-track { background: transparent; } | |
| ::-webkit-scrollbar-thumb { | |
| background: rgba(242, 106, 58, 0.45); | |
| border-radius: 8px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { background: rgba(242, 106, 58, 0.65); } | |
| /* Hide Streamlit chrome */ | |
| [data-testid="stToolbar"] { visibility: hidden; height: 0; position: fixed; } | |
| [data-testid="stDecoration"] { display: none; } | |
| footer { visibility: hidden; } | |
| #MainMenu { visibility: hidden; } | |
| [data-testid="stHeader"] { | |
| background: transparent !important; | |
| height: 0 !important; | |
| min-height: 0 !important; | |
| padding: 0 !important; | |
| } | |
| [data-testid="stHeader"] > div { background: transparent !important; } | |
| /* HIDE SIDEBAR ENTIRELY */ | |
| section[data-testid="stSidebar"] { | |
| display: none !important; | |
| width: 0 !important; | |
| min-width: 0 !important; | |
| max-width: 0 !important; | |
| } | |
| [data-testid="collapsedControl"], | |
| [data-testid="stSidebarCollapsedControl"], | |
| button[kind="headerNoPadding"] { | |
| display: none !important; | |
| } | |
| .block-container { | |
| padding-top: 1.5rem !important; | |
| padding-bottom: 4rem !important; | |
| max-width: 1200px !important; | |
| margin-left: auto !important; | |
| margin-right: auto !important; | |
| } | |
| /* Natural page-level scrolling + centering. Streamlit confines scrolling to | |
| an inner container (no page scrollbar), which often reads as "can't scroll". | |
| Let the document scroll instead, and keep .stApp covering the viewport so the | |
| fixed gradient background still fills the screen. */ | |
| html, body { height: auto !important; overflow-y: auto !important; } | |
| .stApp { | |
| height: auto !important; | |
| min-height: 100vh !important; | |
| overflow: visible !important; | |
| } | |
| [data-testid="stAppViewContainer"], | |
| [data-testid="stMain"] { | |
| height: auto !important; | |
| overflow: visible !important; | |
| } | |
| /* βββ ANIMATIONS βββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| @keyframes fadeInUp { | |
| from { opacity: 0; transform: translateY(20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 106, 58, 0.4); } | |
| 50% { box-shadow: 0 0 0 7px rgba(242, 106, 58, 0); } | |
| } | |
| @keyframes blob { | |
| 0%, 100% { transform: translate(0, 0) scale(1); } | |
| 33% { transform: translate(30px, -50px) scale(1.1); } | |
| 66% { transform: translate(-20px, 20px) scale(0.9); } | |
| } | |
| /* Stepper gimmicks: breathing active circle, pop-in checkmark, growing bar */ | |
| @keyframes stepBreathe { | |
| 0%, 100% { transform: scale(1); } | |
| 50% { transform: scale(1.08); } | |
| } | |
| @keyframes stepPop { | |
| 0% { transform: scale(0.4); opacity: 0; } | |
| 60% { transform: scale(1.18); opacity: 1; } | |
| 100% { transform: scale(1); } | |
| } | |
| @keyframes growX { | |
| from { transform: scaleX(0); } | |
| to { transform: scaleX(1); } | |
| } | |
| @keyframes barFlow { | |
| 0% { background-position: 200% 0; } | |
| 100% { background-position: 0% 0; } | |
| } | |
| /* βββ HERO βββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* Centered hero sitting directly on the peach gradient β no panel: | |
| a floating PTT pill, an eyebrow, a two-tone "Auto Form" wordmark, | |
| a Thai subtitle, a highlighted description, and a feature line. */ | |
| .hero { | |
| position: relative; | |
| background: transparent; | |
| border: none; | |
| padding: 0.5rem 1rem 0.5rem; | |
| margin-bottom: 1.6rem; | |
| animation: fadeInUp 0.6s ease; | |
| } | |
| .hero-content { position: relative; z-index: 2; text-align: center; } | |
| /* Floating white "access pill" with an orange status dot. */ | |
| .hero-badge { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.55rem; | |
| background: #FFFFFF; | |
| border: 1px solid rgba(214, 128, 72, 0.20); | |
| color: #6E5848; | |
| padding: 0.5rem 1.15rem; | |
| border-radius: 999px; | |
| font-size: 0.7rem; | |
| font-weight: 700; | |
| letter-spacing: 0.22em; | |
| margin-bottom: 1.5rem; | |
| text-transform: uppercase; | |
| box-shadow: 0 8px 24px rgba(214, 120, 60, 0.14); | |
| } | |
| .hero-badge-dot { | |
| width: 8px; height: 8px; border-radius: 50%; | |
| background: #F26A3A; | |
| box-shadow: 0 0 10px 1px rgba(242, 106, 58, 0.6); | |
| } | |
| .hero-eyebrow { | |
| color: #D98A5B; | |
| font-size: 0.92rem; | |
| font-weight: 700; | |
| letter-spacing: 0.28em; | |
| text-transform: uppercase; | |
| margin-bottom: 0.35rem; | |
| } | |
| .hero .hero-title { | |
| text-align: center !important; | |
| font-size: 5rem !important; | |
| font-weight: 900 !important; | |
| margin: 0 0 0.5rem 0 !important; | |
| letter-spacing: -0.03em !important; | |
| line-height: 0.98 !important; | |
| color: #3E2A1E !important; | |
| } | |
| .hero .hero-title .accent { | |
| background: linear-gradient(135deg, #F58A3C 0%, #F26A1F 55%, #E85D1A 100%); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| color: #F26A1F; | |
| } | |
| .hero .hero-subtitle { | |
| color: #3E2A1E !important; | |
| text-align: center !important; | |
| font-size: 1.85rem !important; | |
| font-weight: 700 !important; | |
| max-width: 820px; | |
| margin: 0 auto !important; | |
| line-height: 1.25; | |
| } | |
| .hero .hero-subtitle .hl { color: #F26A1F !important; } | |
| /* βββ STEPS ββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .steps-wrapper { | |
| background: #FFFFFF; | |
| border: 1px solid rgba(214, 128, 72, 0.18); | |
| border-radius: 16px; | |
| padding: 1.25rem 1.5rem; | |
| margin-bottom: 2rem; | |
| box-shadow: 0 8px 28px rgba(214, 120, 60, 0.12); | |
| animation: fadeInUp 0.6s ease 0.1s both; | |
| } | |
| .steps-row { display: flex; align-items: center; gap: 0; } | |
| .step { display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; } | |
| .step-circle { | |
| height: 40px; border-radius: 999px; | |
| padding: 0 1rem; | |
| display: flex; align-items: center; justify-content: center; | |
| gap: 0.3rem; | |
| font-weight: 700; font-size: 0.95rem; white-space: nowrap; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| .step-default .step-circle { | |
| background: #F7ECE3; | |
| color: #9C8676; | |
| border: 2px solid rgba(214, 128, 72, 0.18); | |
| } | |
| .step-active .step-circle { | |
| background: rgba(242, 106, 58, 0.10); | |
| color: #C25A1E; | |
| border: 2px solid rgba(242, 106, 58, 0.45); | |
| box-shadow: 0 4px 16px rgba(242, 106, 58, 0.20); | |
| animation: stepBreathe 2.6s ease-in-out infinite; | |
| } | |
| .step-done .step-circle { | |
| background: linear-gradient(135deg, #F26A3A 0%, #E85D27 100%); | |
| color: white; | |
| box-shadow: 0 4px 12px rgba(242, 106, 58, 0.35); | |
| animation: stepPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; | |
| } | |
| .step-label { font-size: 0.85rem; font-weight: 500; color: #9C8676; white-space: nowrap; } | |
| .step-active .step-label { color: #3E2A1E; font-weight: 600; } | |
| .step-done .step-label { color: #C25A1E; font-weight: 600; } | |
| .step-bar { | |
| flex: 1; height: 3px; | |
| background: rgba(214, 128, 72, 0.18); | |
| margin: 0 1rem; border-radius: 999px; | |
| overflow: hidden; position: relative; | |
| } | |
| .step-bar-fill { | |
| position: absolute; inset: 0; | |
| background: linear-gradient(90deg, #F26A3A 0%, #E85D27 100%); | |
| transform-origin: left; | |
| transition: transform 0.5s ease; | |
| } | |
| .step-bar-fill.empty { transform: scaleX(0); } | |
| .step-bar-fill.full { | |
| transform: scaleX(1); | |
| background: linear-gradient(90deg, #F26A3A 0%, #E85D27 100%); | |
| animation: growX 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both; | |
| } | |
| /* βββ CARDS ββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .card-header { | |
| display: flex; align-items: center; gap: 0.75rem; | |
| margin-bottom: 1.25rem; | |
| } | |
| .card-icon { | |
| width: 40px; height: 40px; | |
| border-radius: 12px; | |
| display: flex; align-items: center; justify-content: center; | |
| font-size: 1.25rem; | |
| } | |
| .card-icon-1 { background: linear-gradient(135deg, rgba(242, 106, 58, 0.3) 0%, rgba(242, 106, 58, 0.18) 100%); } | |
| .card-icon-2 { background: linear-gradient(135deg, rgba(242, 106, 58, 0.28) 0%, rgba(242, 106, 58, 0.16) 100%); } | |
| .card-icon-3 { background: linear-gradient(135deg, rgba(232, 93, 39, 0.30) 0%, rgba(232, 93, 39, 0.16) 100%); } | |
| .card-title { | |
| font-size: 1.1rem; font-weight: 700; color: #3E2A1E; margin: 0; line-height: 1.2; | |
| } | |
| .card-subtitle { | |
| font-size: 0.8rem; color: #9C8676; margin: 0.15rem 0 0 0; font-weight: 500; | |
| } | |
| /* βββ STEP NUMBER BADGES (popup, straddling the card's top-left corner) ββ */ | |
| .step-badge { | |
| position: absolute; | |
| top: -18px; left: -44px; | |
| width: 44px; height: 44px; | |
| border-radius: 14px; /* squircle β softer, more modern than a full circle */ | |
| display: flex; align-items: center; justify-content: center; | |
| font-size: 1.4rem; font-weight: 800; color: #FFFFFF; | |
| border: 3px solid #FFFFFF; /* white ring β reads as a chip on the card */ | |
| box-shadow: 0 6px 16px rgba(242, 106, 58, 0.35); | |
| z-index: 5; | |
| background: linear-gradient(135deg, #F58A3C 0%, #F26A1F 100%); | |
| animation: stepPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; | |
| } | |
| /* βββ STEP CARDS (top-level columns become distinct panels) ββββ */ | |
| /* :not(...) excludes nested column rows (e.g. the PO input + button row) */ | |
| [data-testid="stColumn"]:not([data-testid="stColumn"] [data-testid="stColumn"]) { | |
| position: relative; /* anchor for the popup step badges */ | |
| background: #FFFFFF; | |
| border: 1px solid rgba(214, 128, 72, 0.18); | |
| border-radius: 18px; | |
| padding: 1.6rem 1.7rem; | |
| box-shadow: 0 10px 30px rgba(214, 120, 60, 0.12); | |
| } | |
| /* Locked next step: dim the whole panel when its lock marker is rendered */ | |
| [data-testid="stColumn"]:has(.step2-lock) { opacity: 0.5; transition: opacity 0.25s ease; } | |
| .step2-lock { display: none; } | |
| .step2-lock-hint { | |
| display: flex; align-items: center; gap: 0.4rem; | |
| font-size: 0.82rem; color: #9C8676; font-weight: 600; | |
| margin: 0 0 0.9rem 0; | |
| } | |
| /* βββ VENDOR CARDS βββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .vendor-card { | |
| background: linear-gradient(135deg, rgba(242, 106, 58, 0.10) 0%, rgba(232, 93, 39, 0.04) 100%); | |
| border: 1px solid rgba(242, 106, 58, 0.22); | |
| padding: 1rem 1.25rem; | |
| border-radius: 14px; | |
| margin: 0.6rem 0; | |
| position: relative; | |
| overflow: hidden; | |
| transition: all 0.2s ease; | |
| } | |
| .vendor-card:hover { | |
| transform: translateX(2px); | |
| box-shadow: 0 4px 16px rgba(242, 106, 58, 0.18); | |
| } | |
| .vendor-card::before { | |
| content: ""; | |
| position: absolute; | |
| left: 0; top: 0; bottom: 0; | |
| width: 4px; | |
| background: linear-gradient(180deg, #F26A3A 0%, #E85D27 100%); | |
| } | |
| .vendor-card-label { | |
| font-size: 0.7rem; | |
| text-transform: uppercase; | |
| color: #C25A1E; | |
| font-weight: 700; | |
| letter-spacing: 0.06em; | |
| margin-bottom: 0.4rem; | |
| display: flex; align-items: center; gap: 0.4rem; | |
| } | |
| .vendor-card-value { | |
| font-size: 1.05rem; | |
| color: #3E2A1E; | |
| font-weight: 600; | |
| line-height: 1.4; | |
| } | |
| /* βββ BUTTONS ββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .stButton button[kind="primary"] { | |
| background: linear-gradient(135deg, #F26A3A 0%, #E85D27 100%) !important; | |
| border: none !important; | |
| color: #FFFFFF !important; | |
| box-shadow: 0 4px 14px rgba(242, 106, 58, 0.35) !important; | |
| font-weight: 700 !important; | |
| height: 3.25rem !important; | |
| font-size: 1.05rem !important; | |
| transition: all 0.3s ease !important; | |
| border-radius: 999px !important; | |
| } | |
| .stButton button[kind="primary"]:hover { | |
| transform: translateY(-1px); | |
| box-shadow: 0 6px 20px rgba(232, 93, 39, 0.45) !important; | |
| background: linear-gradient(135deg, #FF8A52 0%, #D2602F 100%) !important; | |
| } | |
| .stButton button[kind="secondary"] { | |
| background: rgba(242, 106, 58, 0.08) !important; | |
| border: 1.5px solid rgba(242, 106, 58, 0.35) !important; | |
| color: #C25A1E !important; | |
| font-weight: 600 !important; | |
| height: 3rem !important; | |
| border-radius: 999px !important; | |
| transition: all 0.2s ease !important; | |
| } | |
| .stButton button[kind="secondary"]:hover { | |
| background: rgba(242, 106, 58, 0.15) !important; | |
| border-color: #F26A3A !important; | |
| transform: translateY(-1px); | |
| } | |
| /* PO lookup button β match the PO input height (both pinned to 3rem via their | |
| widget keys), bottom-aligned by the column; enlarge the Material check glyph */ | |
| .st-key-po_lookup_btn button { height: 3rem !important; padding: 0 !important; } | |
| .st-key-po_lookup_btn button p, | |
| .st-key-po_lookup_btn button span, | |
| .st-key-po_lookup_btn button [data-testid="stIconMaterial"] { | |
| font-size: 1.5rem !important; | |
| } | |
| .st-key-po_input_widget [data-baseweb="input"], | |
| .st-key-po_input_widget [data-baseweb="base-input"] { | |
| height: 3rem !important; | |
| } | |
| /* Highlight the "AI" in the generate button: the :violet[AI] markdown span becomes a | |
| white chip/badge with dark-blue text so it showcases the AI feature. | |
| NOTE: the selector must out-specify the later '.stButton button[kind="primary"] | |
| [data-testid="stMarkdownContainer"] span { color:#fff }' rule, or the AI text gets | |
| forced white-on-white (invisible). Hence the [kind="primary"] + container chain + html body. */ | |
| html body .st-key-generate_btn button[kind="primary"] [data-testid="stMarkdownContainer"] span[style*="color"] { | |
| color: #1E3A8A !important; /* dark blue */ | |
| -webkit-text-fill-color: #1E3A8A !important; | |
| font-weight: 800; | |
| letter-spacing: .6px; | |
| padding: 2px 10px; | |
| border-radius: 8px; | |
| background: rgba(255, 255, 255, .95); | |
| box-shadow: 0 0 10px rgba(255, 255, 255, .45), inset 0 0 0 1px rgba(30, 58, 138, .30); | |
| text-shadow: none; | |
| } | |
| .stDownloadButton button { | |
| background: linear-gradient(135deg, #F26A3A 0%, #E85D27 100%) !important; | |
| color: #FFFFFF !important; | |
| border: none !important; | |
| box-shadow: 0 4px 14px rgba(242, 106, 58, 0.35) !important; | |
| font-weight: 700 !important; | |
| height: 3.25rem !important; | |
| font-size: 1.05rem !important; | |
| border-radius: 999px !important; | |
| transition: all 0.3s ease !important; | |
| } | |
| .stDownloadButton button:hover { | |
| transform: translateY(-1px); | |
| box-shadow: 0 6px 20px rgba(232, 93, 39, 0.45) !important; | |
| background: linear-gradient(135deg, #FF8A52 0%, #D2602F 100%) !important; | |
| } | |
| /* Cream buttons render their label inside a stMarkdownContainer <p>, which the | |
| global markdown rule forces to light text. Re-assert purple on the label text | |
| and any Material-icon glyph so it stays readable on the cream surface. */ | |
| .stButton button[kind="primary"] [data-testid="stMarkdownContainer"] p, | |
| .stButton button[kind="primary"] [data-testid="stMarkdownContainer"] span, | |
| .stDownloadButton button [data-testid="stMarkdownContainer"] p, | |
| .stDownloadButton button [data-testid="stMarkdownContainer"] span { | |
| color: #FFFFFF !important; | |
| } | |
| /* βββ INPUTS β bulletproof dark styling ββββββββββββββββββββββββ */ | |
| /* All input wrappers β use SOLID dark color slightly DARKER than card bg | |
| so inputs look like "indented" surfaces, not flat boxes */ | |
| [data-testid="stTextInput"] > div > div, | |
| [data-testid="stTextInput"] > div > div > div, | |
| [data-testid="stTextInput"] [data-baseweb="input"], | |
| [data-testid="stTextInput"] [data-baseweb="base-input"], | |
| [data-testid="stTextInput"] [data-baseweb="input"] > div, | |
| [data-testid="stTextInput"] [data-baseweb="base-input"] > div, | |
| [data-baseweb="input"], | |
| [data-baseweb="base-input"], | |
| [data-baseweb="input"] > div, | |
| [data-baseweb="base-input"] > div { | |
| background-color: #FFFFFF !important; /* clean white field */ | |
| background: #FFFFFF !important; | |
| border: 1.5px solid rgba(242, 106, 58, 0.25) !important; | |
| border-radius: 12px !important; | |
| color: #3E2A1E !important; | |
| box-shadow: inset 0 1px 2px rgba(214, 120, 60, 0.08) !important; /* subtle inner shadow */ | |
| } | |
| /* The actual <input> element β transparent so wrapper bg shows through */ | |
| [data-testid="stTextInput"] input, | |
| [data-baseweb="input"] input, | |
| [data-baseweb="base-input"] input, | |
| .stTextInput input, | |
| input[type="text"], | |
| input[type="number"], | |
| input[type="email"], | |
| input[type="password"] { | |
| background-color: transparent !important; | |
| background: transparent !important; | |
| color: #3E2A1E !important; | |
| -webkit-text-fill-color: #3E2A1E !important; | |
| font-size: 0.95rem !important; | |
| font-weight: 500 !important; /* typed text β clearly bolder */ | |
| border: none !important; | |
| caret-color: #F26A3A !important; | |
| font-style: normal !important; | |
| } | |
| /* Placeholder β clearly look like a "hint", not real text: | |
| dim muted-gray, italic, lighter weight */ | |
| [data-testid="stTextInput"] input::placeholder, | |
| [data-baseweb="input"] input::placeholder, | |
| .stTextInput input::placeholder, | |
| input::placeholder, | |
| textarea::placeholder { | |
| color: rgba(110, 88, 72, 0.55) !important; /* muted brown hint */ | |
| font-style: italic !important; | |
| font-weight: 400 !important; | |
| opacity: 1 !important; | |
| -webkit-text-fill-color: rgba(110, 88, 72, 0.55) !important; | |
| } | |
| /* Webkit autofill β prevent yellow bg */ | |
| input:-webkit-autofill, | |
| input:-webkit-autofill:hover, | |
| input:-webkit-autofill:focus { | |
| -webkit-text-fill-color: #3E2A1E !important; | |
| -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important; | |
| box-shadow: 0 0 0 1000px #FFFFFF inset !important; | |
| background: #FFFFFF !important; | |
| } | |
| /* Focus state β coral glow on wrapper + subtle lift */ | |
| [data-testid="stTextInput"] > div > div:focus-within, | |
| [data-baseweb="input"]:focus-within, | |
| [data-baseweb="base-input"]:focus-within { | |
| border-color: #F26A3A !important; | |
| box-shadow: | |
| 0 0 0 4px rgba(242, 106, 58, 0.18), | |
| inset 0 1px 2px rgba(214, 120, 60, 0.06) !important; | |
| background-color: #FFF6EF !important; | |
| background: #FFF6EF !important; | |
| } | |
| /* Selectbox β same treatment, deep nesting */ | |
| [data-testid="stSelectbox"] > div > div, | |
| [data-testid="stSelectbox"] > div > div > div, | |
| [data-testid="stSelectbox"] [data-baseweb="select"], | |
| [data-testid="stSelectbox"] [data-baseweb="select"] > div, | |
| [data-baseweb="select"], | |
| [data-baseweb="select"] > div, | |
| [data-baseweb="select"] > div > div { | |
| background-color: #FFFFFF !important; | |
| background: #FFFFFF !important; | |
| border: 1.5px solid rgba(242, 106, 58, 0.25) !important; | |
| border-radius: 12px !important; | |
| color: #3E2A1E !important; | |
| cursor: pointer !important; | |
| } | |
| [data-baseweb="select"] *, | |
| [data-baseweb="select"] span, | |
| [data-baseweb="select"] div { | |
| color: #3E2A1E !important; | |
| } | |
| /* Dropdown arrow β soft orange, with a pointer cursor on hover */ | |
| [data-testid="stSelectbox"] svg, | |
| [data-baseweb="select"] svg { | |
| fill: #F58A52 !important; | |
| cursor: pointer !important; | |
| } | |
| [data-baseweb="select"] [role="button"], | |
| [data-baseweb="select"] [aria-label*="open" i], | |
| [data-testid="stSelectbox"] svg:hover, | |
| [data-baseweb="select"] svg:hover { | |
| cursor: pointer !important; | |
| } | |
| [data-testid="stSelectbox"] svg:hover, | |
| [data-baseweb="select"] svg:hover { | |
| fill: #F26A3A !important; | |
| } | |
| /* Selectbox dropdown popover (portaled outside main DOM β needs high | |
| specificity). Dark surface on the whole menu + every wrapper, but the | |
| rounded frame + shadow live on the listbox ONLY β so individual options | |
| stay flat. (Previously the descendant catch-all applied border/radius/shadow | |
| to every option, giving the "messy" nested-box look.) */ | |
| html body [data-baseweb="popover"], | |
| html body [data-baseweb="popover"] > div, | |
| html body [data-baseweb="popover"] > div > div, | |
| html body [data-baseweb="popover"] [data-baseweb="menu"], | |
| html body div[data-baseweb="popover"] *, | |
| [role="listbox"], | |
| ul[role="listbox"], | |
| div[role="listbox"] { | |
| background: #FFFFFF !important; | |
| background-color: #FFFFFF !important; | |
| color: #3E2A1E !important; | |
| border: none !important; | |
| border-radius: 0 !important; | |
| box-shadow: none !important; | |
| } | |
| /* The single rounded frame: the listbox container only */ | |
| html body [data-baseweb="popover"] [role="listbox"], | |
| [role="listbox"] { | |
| border: 1px solid rgba(242, 106, 58, 0.3) !important; | |
| border-radius: 12px !important; | |
| box-shadow: 0 12px 30px rgba(214, 120, 60, 0.18) !important; | |
| } | |
| /* Each option in the dropdown β white bg + dark text */ | |
| html body [data-baseweb="popover"] li, | |
| html body [data-baseweb="menu"] li, | |
| html body [role="option"], | |
| html body ul[role="listbox"] > li, | |
| li[role="option"] { | |
| background: #FFFFFF !important; | |
| background-color: #FFFFFF !important; | |
| color: #3E2A1E !important; | |
| -webkit-text-fill-color: #3E2A1E !important; | |
| padding: 0.55rem 0.85rem !important; | |
| } | |
| /* Force inner content of option to inherit dark color */ | |
| html body [data-baseweb="popover"] li *, | |
| html body [role="option"] *, | |
| li[role="option"] *, | |
| li[role="option"] div, | |
| li[role="option"] span { | |
| color: #3E2A1E !important; | |
| -webkit-text-fill-color: #3E2A1E !important; | |
| background: transparent !important; | |
| background-color: transparent !important; | |
| } | |
| /* Hover state */ | |
| html body [data-baseweb="popover"] li:hover, | |
| html body [role="option"]:hover, | |
| li[role="option"]:hover { | |
| background: rgba(242, 106, 58, 0.12) !important; | |
| background-color: rgba(242, 106, 58, 0.12) !important; | |
| color: #C25A1E !important; | |
| } | |
| html body [data-baseweb="popover"] li:hover *, | |
| html body [role="option"]:hover *, | |
| li[role="option"]:hover * { | |
| color: #C25A1E !important; | |
| -webkit-text-fill-color: #C25A1E !important; | |
| } | |
| /* Selected option */ | |
| html body [role="option"][aria-selected="true"], | |
| li[role="option"][aria-selected="true"] { | |
| background: rgba(242, 106, 58, 0.16) !important; | |
| background-color: rgba(242, 106, 58, 0.16) !important; | |
| color: #C25A1E !important; | |
| } | |
| /* Scrollbar inside dropdown */ | |
| [data-baseweb="popover"] ul::-webkit-scrollbar, | |
| [role="listbox"]::-webkit-scrollbar { | |
| width: 8px; | |
| background: transparent; | |
| } | |
| [data-baseweb="popover"] ul::-webkit-scrollbar-thumb, | |
| [role="listbox"]::-webkit-scrollbar-thumb { | |
| background: rgba(242, 106, 58, 0.3); | |
| border-radius: 4px; | |
| } | |
| /* Textarea β same treatment */ | |
| .stTextArea textarea, | |
| [data-baseweb="textarea"] textarea, | |
| [data-testid="stTextArea"] textarea { | |
| background-color: #FFFFFF !important; | |
| background: #FFFFFF !important; | |
| color: #3E2A1E !important; | |
| border: 1.5px solid rgba(242, 106, 58, 0.25) !important; | |
| border-radius: 12px !important; | |
| -webkit-text-fill-color: #3E2A1E !important; | |
| } | |
| /* Radio buttons β text color and indicator */ | |
| .stRadio label, | |
| .stRadio [data-baseweb="radio"] label, | |
| .stRadio > div > div { | |
| color: #3E2A1E !important; | |
| } | |
| .stRadio [data-baseweb="radio"] div[role="radio"] { | |
| background-color: #FFFFFF !important; | |
| border-color: rgba(242, 106, 58, 0.4) !important; | |
| } | |
| .stRadio [data-baseweb="radio"] div[role="radio"][aria-checked="true"] { | |
| background-color: #F26A3A !important; | |
| border-color: #F26A3A !important; | |
| } | |
| /* File uploader */ | |
| [data-testid="stFileUploader"] section, | |
| [data-testid="stFileUploader"] > div { | |
| background: rgba(242, 106, 58, 0.04) !important; | |
| border: 2px dashed rgba(242, 106, 58, 0.3) !important; | |
| border-radius: 14px !important; | |
| color: #3E2A1E !important; | |
| } | |
| [data-testid="stFileUploader"] button { | |
| background: rgba(242, 106, 58, 0.12) !important; | |
| color: #C25A1E !important; | |
| border: 1px solid rgba(242, 106, 58, 0.3) !important; | |
| } | |
| [data-testid="stFileUploader"] small, | |
| [data-testid="stFileUploader"] span { | |
| color: #6E5848 !important; | |
| } | |
| /* Labels above inputs */ | |
| .stTextInput label, | |
| .stTextInput label p, | |
| .stSelectbox label, | |
| .stSelectbox label p, | |
| .stRadio label > div:first-child, | |
| .stFileUploader label { | |
| font-weight: 600 !important; | |
| color: #6E5848 !important; | |
| font-size: 0.85rem !important; | |
| } | |
| /* βββ ALERTS βββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .stAlert { | |
| border-radius: 14px !important; | |
| border: none !important; | |
| backdrop-filter: blur(10px); | |
| } | |
| [data-testid="stNotificationContentSuccess"] { | |
| background: rgba(242, 106, 58, 0.15) !important; | |
| color: #C25A1E !important; | |
| } | |
| [data-testid="stNotificationContentInfo"] { | |
| background: rgba(242, 106, 58, 0.14) !important; | |
| color: #C25A1E !important; | |
| } | |
| /* Warning alert. Streamlit 1.57 paints the colored box on stAlertContainer | |
| (the old stNotificationContentWarning testid no longer exists); scope to | |
| warnings only via :has() so success/info/error keep their own colors. */ | |
| [data-testid="stAlertContainer"]:has([data-testid="stAlertContentWarning"]) { | |
| background: rgba(245, 158, 11, 0.12) !important; | |
| border: 1px solid rgba(245, 158, 11, 0.35) !important; | |
| border-left: 4px solid #D97706 !important; | |
| } | |
| [data-testid="stAlertContentWarning"], | |
| [data-testid="stAlertContentWarning"] * { | |
| color: #B45309 !important; | |
| } | |
| [data-testid="stAlertContainer"]:has([data-testid="stAlertContentWarning"]) svg { | |
| fill: #B45309 !important; | |
| } | |
| [data-testid="stNotificationContentError"] { | |
| background: rgba(239, 68, 68, 0.14) !important; | |
| color: #DC2626 !important; | |
| } | |
| /* βββ EXPANDERS ββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .streamlit-expanderHeader, | |
| [data-testid="stExpander"] summary { | |
| background: rgba(242, 106, 58, 0.05) !important; | |
| border-radius: 12px !important; | |
| color: #6E5848 !important; | |
| font-weight: 600 !important; | |
| border: 1px solid rgba(242, 106, 58, 0.14) !important; | |
| } | |
| [data-testid="stExpander"] { | |
| background: transparent !important; | |
| border: none !important; | |
| } | |
| [data-testid="stExpander"] details { | |
| background: transparent !important; | |
| border: none !important; | |
| } | |
| [data-testid="stExpander"] [data-testid="stExpanderDetails"] { | |
| background: rgba(242, 106, 58, 0.03) !important; | |
| border: 1px solid rgba(242, 106, 58, 0.12) !important; | |
| border-radius: 12px !important; | |
| padding: 1rem !important; | |
| margin-top: 0.5rem !important; | |
| } | |
| /* βββ SECTION TITLE ββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .section-title { | |
| font-size: 0.95rem; | |
| font-weight: 700; | |
| color: #3E2A1E; | |
| margin: 1.25rem 0 0.75rem 0; | |
| display: flex; align-items: center; gap: 0.5rem; | |
| } | |
| .section-title::before { | |
| content: ""; | |
| width: 4px; height: 18px; | |
| background: linear-gradient(180deg, #F26A3A 0%, #E85D27 100%); | |
| border-radius: 2px; | |
| } | |
| /* βββ EMPTY STATE ββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .empty-state { | |
| text-align: center; | |
| padding: 2rem 1rem; | |
| background: rgba(242, 106, 58, 0.04); | |
| border-radius: 14px; | |
| border: 2px dashed rgba(242, 106, 58, 0.22); | |
| margin: 1rem 0; | |
| } | |
| .empty-state-icon { margin-bottom: 0.75rem; opacity: 0.7; line-height: 0; } | |
| .empty-state-text { color: #9C8676; font-size: 0.9rem; margin: 0; } | |
| /* βββ DIVIDER βββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| hr { | |
| border: none !important; | |
| height: 1px !important; | |
| background: linear-gradient(90deg, transparent 0%, rgba(242, 106, 58, 0.25) 50%, transparent 100%) !important; | |
| margin: 1rem 0 !important; | |
| } | |
| /* Captions */ | |
| .caption, .stCaption, [data-testid="stCaptionContainer"] { | |
| color: #9C8676 !important; | |
| } | |
| /* Markdown content (general text) */ | |
| .stMarkdown, .stMarkdown p, [data-testid="stMarkdownContainer"] { | |
| color: #3E2A1E !important; | |
| } | |
| .stMarkdown strong { color: #C25A1E !important; } | |
| .stMarkdown code { | |
| background: rgba(242, 106, 58, 0.14) !important; | |
| color: #C25A1E !important; | |
| padding: 0.15rem 0.45rem !important; | |
| border-radius: 6px !important; | |
| } | |
| /* Spinner */ | |
| .stSpinner > div { | |
| border-top-color: #F26A3A !important; | |
| } | |
| /* βββ MOBILE / NARROW-SCREEN BLOCK βββββββββββββββββββββββββββββββ | |
| The wide two-column form is desktop-only. On a phone-sized viewport, | |
| cover the whole app with a friendly "not supported on mobile" notice. | |
| Pure CSS so it shows instantly (no server round-trip / flash) and | |
| reacts to rotation/resize. Covers the login screen too. */ | |
| .mobile-block { display: none; } | |
| @media (max-width: 820px) { | |
| .mobile-block { | |
| display: flex !important; | |
| position: fixed; inset: 0; z-index: 2147483647; | |
| align-items: center; justify-content: center; padding: 28px; | |
| background: | |
| radial-gradient(at 18% 8%, rgba(245, 150, 82, 0.42) 0px, transparent 55%), | |
| radial-gradient(at 85% 92%, rgba(245, 150, 82, 0.22) 0px, transparent 55%), | |
| linear-gradient(180deg, #FFF4EC 0%, #FCE7D6 100%); | |
| } | |
| } | |
| .mobile-block-card { | |
| background: #FFFFFF; border: 1px solid rgba(214, 128, 72, 0.18); | |
| border-radius: 24px; padding: 2.2rem 1.7rem; max-width: 340px; width: 100%; | |
| text-align: center; box-shadow: 0 24px 60px rgba(214, 120, 60, 0.22); | |
| } | |
| .mobile-block-icon { | |
| width: 72px; height: 72px; margin: 0 auto 1.1rem; border-radius: 20px; | |
| display: flex; align-items: center; justify-content: center; font-size: 2.1rem; | |
| background: rgba(242, 106, 58, 0.12); border: 1px solid rgba(242, 106, 58, 0.22); | |
| } | |
| .mobile-block-title { | |
| color: #3E2A1E; font-weight: 800; font-size: 1.3rem; margin-bottom: 0.5rem; | |
| } | |
| .mobile-block-text { | |
| color: #6E5848; font-weight: 600; font-size: 1rem; line-height: 1.55; | |
| } | |
| .mobile-block-sub { | |
| color: #9C8676; font-weight: 500; font-size: 0.82rem; margin-top: 0.9rem; | |
| } | |
| </style> | |
| <div class="mobile-block"> | |
| <div class="mobile-block-card"> | |
| <div class="mobile-block-icon">π₯οΈ</div> | |
| <div class="mobile-block-title">ΰΈΰΈ£ΰΈΈΰΈΰΈ²ΰΉΰΈΰΉΰΈΰΈ²ΰΈΰΈΰΈΰΈΰΈΰΈ‘ΰΈΰΈ΄ΰΈ§ΰΉΰΈΰΈΰΈ£ΰΉ</div> | |
| <div class="mobile-block-text">ΰΈΰΈ±ΰΈΰΈΰΈΈΰΈΰΈ±ΰΈ ΰΈ’ΰΈ±ΰΈΰΉΰΈ‘ΰΉΰΈ£ΰΈΰΈΰΈ£ΰΈ±ΰΈΰΈΰΈ²ΰΈ£ΰΉΰΈΰΉΰΈΰΈ²ΰΈΰΉΰΈΰΈ‘ΰΈ·ΰΈΰΈΰΈ·ΰΈ<br>ΰΈΰΈΰΈΰΈ ΰΈ±ΰΈ’ΰΉΰΈΰΈΰΈ§ΰΈ²ΰΈ‘ΰΉΰΈ‘ΰΉΰΈͺΰΈ°ΰΈΰΈ§ΰΈ</div> | |
| <div class="mobile-block-sub">Please open Auto Form on a desktop browser.</div> | |
| </div> | |
| </div> | |
| """ | |