melisklc0's picture
refactor: Update branding and layout in Streamlit app
9ab05dd
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
html, body, [class*="css"] {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.stApp {
background-color: #f1f5f9;
}
.block-container {
padding-top: 1.5rem;
padding-bottom: 2rem;
max-width: 1100px;
}
/* Extra breathing room above the first main row (CT scan / Analysis cards) */
section[data-testid="stMain"] .block-container {
padding-top: 3.5rem;
}
/* Spacer block before the two-column layout — survives Streamlit inner margins */
section[data-testid="stMain"] [data-testid="stMarkdownContainer"]:has(.main-cards-top-gap) {
margin-top: 0 !important;
margin-bottom: 0 !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
}
section[data-testid="stMain"] [data-testid="stMarkdownContainer"]:has(.main-cards-top-gap) > div {
padding: 0 !important;
margin: 0 !important;
}
.main-cards-top-gap {
display: block;
height: 2.25rem;
width: 100%;
}
section[data-testid="stSidebar"] {
background-color: #ffffff;
border-right: 1px solid #e2e8f0;
}
section[data-testid="stSidebar"] .block-container {
padding-top: 1.5rem;
}
.brand-block {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 1.5rem;
}
.brand-mark {
width: 44px;
height: 44px;
border-radius: 10px;
background: linear-gradient(145deg, #0f2b46, #1a5f8a);
color: #fff;
font-weight: 700;
font-size: 0.85rem;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: -0.02em;
}
.brand-title {
font-size: 1rem;
font-weight: 700;
color: #0f172a;
line-height: 1.2;
}
.brand-sub {
font-size: 0.75rem;
line-height: 1.45;
color: #64748b;
margin-top: 2px;
}
.info-card {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 10px;
padding: 1rem;
margin-bottom: 1.25rem;
}
.info-card dt {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #64748b;
margin: 0.75rem 0 0.15rem;
}
.info-card dt:first-child {
margin-top: 0;
}
.info-card dd {
margin: 0;
font-size: 0.875rem;
color: #0f172a;
font-weight: 500;
}
.info-card .metrics-dd {
margin-top: 0.1rem;
}
.info-card .metrics-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.35rem 1rem;
margin: 0;
padding: 0;
}
.info-card .metrics-grid__cell {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 0.5rem;
font-size: 0.875rem;
line-height: 1.4;
}
.info-card .metrics-grid__label {
color: #64748b;
font-weight: 500;
}
.info-card .metrics-grid__value {
color: #0f172a;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.verdict-box {
border-radius: 10px;
padding: 1.25rem 1.5rem;
margin-bottom: 1rem;
text-align: center;
}
.verdict-box.stroke {
background: #fef2f2;
border: 1px solid #fecaca;
}
.verdict-box.normal {
background: #f0fdf4;
border: 1px solid #bbf7d0;
}
.verdict-label {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #64748b;
margin-bottom: 0.35rem;
}
.verdict-value {
font-size: 1.75rem;
font-weight: 700;
letter-spacing: 0.04em;
}
.verdict-box.stroke .verdict-value { color: #b91c1c; }
.verdict-box.normal .verdict-value { color: #15803d; }
.prob-chart {
margin-top: 0.25rem;
}
.prob-row {
margin-bottom: 0.85rem;
}
.prob-row:last-child {
margin-bottom: 0;
}
.prob-row__label {
margin: 0 0 0.4rem;
font-size: 0.875rem;
color: #334155;
}
.prob-row__label strong {
font-weight: 600;
}
.prob-track {
height: 10px;
background: #e2e8f0;
border-radius: 5px;
overflow: hidden;
}
.prob-fill {
height: 10px;
border-radius: 5px;
transition: width 0.25s ease;
}
.alert-box {
border-radius: 8px;
padding: 0.85rem 1rem;
font-size: 0.85rem;
line-height: 1.55;
margin: 0.75rem 0.15rem 1rem;
}
.alert-box--muted {
background: #f8fafc;
border: 1px solid #e2e8f0;
color: #475569;
}
.hint-box {
display: flex;
align-items: flex-start;
gap: 0.6rem;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 0.7rem 0.9rem;
margin: 0.35rem 0 1.25rem;
font-size: 0.85rem;
line-height: 1.45;
color: #475569;
}
.hint-box--ready {
background: #f0fdf4;
border-color: #bbf7d0;
color: #166534;
}
.hint-box--loading {
background: #f8fafc;
border-color: #e2e8f0;
}
.hint-box__icon {
flex-shrink: 0;
font-size: 1rem;
line-height: 1.45;
}
.hint-box__sub {
display: block;
font-size: 0.78rem;
color: #64748b;
margin-top: 0.15rem;
font-weight: 400;
}
.hint-box--ready .hint-box__sub {
color: #15803d;
}
.hint-box strong {
font-weight: 600;
}
.welcome-panel {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1rem 1.2rem 1.4rem;
margin: 0.85rem 0.15rem 1rem;
font-size: 0.85rem;
color: #475569;
line-height: 1.5;
}
.welcome-panel__title {
display: block;
color: #0f2b46;
font-size: 0.9rem;
font-weight: 600;
margin-bottom: 0.5rem;
}
.welcome-panel__list {
margin: 0;
padding-left: 1.25rem;
}
.welcome-panel__list li {
margin-bottom: 0.25rem;
padding-left: 0.15rem;
}
.welcome-panel__list li:last-child {
margin-bottom: 0;
}
.empty-state {
color: #64748b;
font-size: 0.875rem;
line-height: 1.55;
padding: 0.75rem 0.5rem 1.35rem;
margin: 0;
text-align: center;
}
div[data-testid="stVerticalBlockBorderWrapper"] {
padding-bottom: 1.75rem;
}
div[data-testid="stVerticalBlockBorderWrapper"] [data-testid="stVerticalBlock"] {
gap: 0.75rem;
}
.sidebar-disclaimer {
background: #fffbeb;
border: 1px solid #fde68a;
border-radius: 8px;
padding: 0.85rem 0.95rem;
margin-top: 1.75rem;
font-size: 0.75rem;
line-height: 1.5;
color: #92400e;
}
.sidebar-disclaimer__label {
font-size: 0.65rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #b45309;
margin: 0 0 0.4rem;
}
.sidebar-disclaimer p:last-child {
margin: 0;
}
.footer-note {
text-align: center;
color: #94a3b8;
font-size: 0.75rem;
margin-top: 1.5rem;
line-height: 1.6;
}
h2, h3 {
color: #0f172a !important;
font-weight: 600 !important;
}
section[data-testid="stSidebar"] .stButton > button {
width: 100%;
background: #ffffff;
color: #1e4d6e;
border: 1px solid #cbd5e1;
border-radius: 8px;
font-weight: 500;
font-size: 0.8rem;
padding: 0.45rem 0.5rem;
transition: background 0.15s ease, border-color 0.15s ease;
}
section[data-testid="stSidebar"] .stButton > button:hover {
background: #f8fafc;
border-color: #94a3b8;
color: #0f2b46;
}
[data-testid="stFileUploader"] section {
border: 1px dashed #cbd5e1;
border-radius: 10px;
background: #f8fafc;
}
[data-testid="stMetricValue"] {
font-size: 1.75rem !important;
color: #0f2b46 !important;
}