alda / styles.css
jameszokah's picture
Initial commit
9243bca
/* DocuTrace Premium Theme */
/* Custom CSS for Streamlit Premium UI */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap");
/* === ROOT VARIABLES === */
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--primary-light: #818cf8;
--accent: #f59e0b;
--accent-glow: #fbbf24;
--bg-dark: #0a0a1a;
--bg-gradient-1: #0f0f23;
--bg-gradient-2: #1a1a2e;
--surface: rgba(30, 30, 60, 0.6);
--surface-hover: rgba(40, 40, 80, 0.8);
--glass: rgba(255, 255, 255, 0.05);
--glass-border: rgba(255, 255, 255, 0.1);
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--success: #10b981;
--success-bg: rgba(16, 185, 129, 0.15);
--error: #ef4444;
--error-bg: rgba(239, 68, 68, 0.15);
--warning: #f59e0b;
--info: #3b82f6;
--border-radius: 16px;
--border-radius-sm: 8px;
--border-radius-lg: 24px;
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
--shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
--transition-fast: 0.15s ease;
--transition-normal: 0.3s ease;
--transition-slow: 0.5s ease;
}
/* === BASE STYLES === */
.stApp {
background: linear-gradient(
135deg,
var(--bg-dark) 0%,
var(--bg-gradient-1) 50%,
var(--bg-gradient-2) 100%
) !important;
background-attachment: fixed !important;
}
.stApp::before {
content: "";
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
radial-gradient(
ellipse at 20% 20%,
rgba(99, 102, 241, 0.15) 0%,
transparent 50%
),
radial-gradient(
ellipse at 80% 80%,
rgba(245, 158, 11, 0.1) 0%,
transparent 50%
),
radial-gradient(
ellipse at 50% 50%,
rgba(139, 92, 246, 0.08) 0%,
transparent 60%
);
pointer-events: none;
z-index: -1;
}
/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6,
.stMarkdown h1,
.stMarkdown h2,
.stMarkdown h3 {
font-family: "Outfit", sans-serif !important;
color: var(--text-primary) !important;
font-weight: 600 !important;
}
p,
span,
div,
label,
.stMarkdown p {
font-family: "Inter", sans-serif !important;
color: var(--text-secondary) !important;
}
code,
pre,
.stCode {
font-family: "JetBrains Mono", monospace !important;
}
/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--bg-gradient-1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: var(--primary);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary-light);
}
/* === SIDEBAR === */
section[data-testid="stSidebar"] {
background: linear-gradient(
180deg,
rgba(15, 15, 35, 0.95) 0%,
rgba(20, 20, 50, 0.98) 100%
) !important;
border-right: 1px solid var(--glass-border) !important;
backdrop-filter: blur(20px) !important;
}
section[data-testid="stSidebar"] > div {
padding: 2rem 1.5rem !important;
}
section[data-testid="stSidebar"] .stMarkdown h2,
section[data-testid="stSidebar"] .stMarkdown h3 {
color: var(--text-primary) !important;
font-size: 1.1rem !important;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-bottom: 1.5rem;
padding-bottom: 0.75rem;
border-bottom: 2px solid var(--primary);
display: inline-block;
}
/* === BUTTONS === */
.stButton > button {
background: linear-gradient(
135deg,
var(--primary) 0%,
var(--primary-dark) 100%
) !important;
color: white !important;
border: none !important;
border-radius: var(--border-radius) !important;
padding: 0.75rem 2rem !important;
font-family: "Inter", sans-serif !important;
font-weight: 600 !important;
font-size: 1rem !important;
letter-spacing: 0.02em;
box-shadow: var(--shadow-md), var(--shadow-glow) !important;
transition: all var(--transition-normal) !important;
position: relative;
overflow: hidden;
}
.stButton > button::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.2),
transparent
);
transition: left 0.5s ease;
}
.stButton > button:hover::before {
left: 100%;
}
.stButton > button:hover {
transform: translateY(-2px) !important;
box-shadow:
var(--shadow-lg),
0 0 60px rgba(99, 102, 241, 0.4) !important;
}
.stButton > button:active {
transform: translateY(0) !important;
}
/* Primary button variant */
.stButton > button[kind="primary"] {
background: linear-gradient(
135deg,
var(--accent) 0%,
#d97706 100%
) !important;
box-shadow:
var(--shadow-md),
0 0 40px rgba(245, 158, 11, 0.3) !important;
}
.stButton > button[kind="primary"]:hover {
box-shadow:
var(--shadow-lg),
0 0 60px rgba(245, 158, 11, 0.5) !important;
}
/* === FILE UPLOADER === */
section[data-testid="stFileUploader"] {
background: var(--surface) !important;
border: 2px dashed var(--glass-border) !important;
border-radius: var(--border-radius) !important;
padding: 2rem !important;
transition: all var(--transition-normal) !important;
}
section[data-testid="stFileUploader"]:hover {
border-color: var(--primary) !important;
background: var(--surface-hover) !important;
box-shadow: var(--shadow-glow) !important;
}
section[data-testid="stFileUploader"] label {
color: var(--text-primary) !important;
font-weight: 500 !important;
}
/* === TEXT INPUTS === */
.stTextInput > div > div {
background: var(--surface) !important;
border: 1px solid var(--glass-border) !important;
border-radius: var(--border-radius-sm) !important;
transition: all var(--transition-fast) !important;
}
.stTextInput > div > div:focus-within {
border-color: var(--primary) !important;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}
.stTextInput input {
color: var(--text-primary) !important;
font-family: "Inter", sans-serif !important;
}
.stTextInput input::placeholder {
color: var(--text-muted) !important;
}
/* === SELECT BOXES === */
.stSelectbox > div > div {
background: var(--surface) !important;
border: 1px solid var(--glass-border) !important;
border-radius: var(--border-radius-sm) !important;
}
.stSelectbox [data-baseweb="select"] {
background: transparent !important;
}
.stSelectbox [data-baseweb="select"] > div {
background: var(--surface) !important;
border-color: var(--glass-border) !important;
}
/* === ALERTS & INFO BOXES === */
.stAlert {
background: var(--surface) !important;
border: 1px solid var(--glass-border) !important;
border-radius: var(--border-radius) !important;
backdrop-filter: blur(10px) !important;
}
div[data-testid="stNotification"] {
background: var(--surface) !important;
border-left: 4px solid var(--primary) !important;
border-radius: var(--border-radius-sm) !important;
}
.stSuccess {
background: var(--success-bg) !important;
border-color: var(--success) !important;
}
.stError {
background: var(--error-bg) !important;
border-color: var(--error) !important;
}
/* === EXPANDER === */
.streamlit-expanderHeader {
background: var(--surface) !important;
border: 1px solid var(--glass-border) !important;
border-radius: var(--border-radius-sm) !important;
color: var(--text-primary) !important;
font-weight: 500 !important;
}
/* === DIVIDER === */
.stDivider {
border-color: var(--glass-border) !important;
}
hr {
border-color: var(--glass-border) !important;
opacity: 0.5;
}
/* === STATUS WIDGET === */
div[data-testid="stStatusWidget"] {
background: var(--surface) !important;
border: 1px solid var(--glass-border) !important;
border-radius: var(--border-radius) !important;
backdrop-filter: blur(10px) !important;
}
/* === SPINNER === */
.stSpinner > div {
border-color: var(--primary) transparent transparent transparent !important;
}
/* === CHAT MESSAGE STYLES === */
.chat-container {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 1rem 0;
}
.chat-message {
display: flex;
gap: 0.75rem;
animation: fadeInUp 0.3s ease;
}
.chat-message.user {
flex-direction: row-reverse;
}
.chat-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
flex-shrink: 0;
}
.chat-avatar.user {
background: linear-gradient(
135deg,
var(--primary) 0%,
var(--primary-dark) 100%
);
}
.chat-avatar.assistant {
background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
}
.chat-bubble {
max-width: 80%;
padding: 1rem 1.25rem;
border-radius: var(--border-radius);
line-height: 1.6;
}
.chat-bubble.user {
background: linear-gradient(
135deg,
var(--primary) 0%,
var(--primary-dark) 100%
);
color: white;
border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
background: var(--surface);
border: 1px solid var(--glass-border);
color: var(--text-primary);
border-bottom-left-radius: 4px;
backdrop-filter: blur(10px);
}
/* === RESULT CARDS === */
.result-card {
background: var(--surface);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius);
padding: 1.5rem;
margin-bottom: 1rem;
backdrop-filter: blur(10px);
transition: all var(--transition-normal);
animation: fadeInUp 0.4s ease;
}
.result-card:hover {
border-color: var(--primary);
box-shadow: var(--shadow-glow);
transform: translateY(-2px);
}
.result-card-header {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--glass-border);
}
.result-card-icon {
width: 36px;
height: 36px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(
135deg,
var(--primary) 0%,
var(--primary-dark) 100%
);
font-size: 1.1rem;
}
.result-card-title {
font-family: "Outfit", sans-serif;
font-size: 1.1rem;
font-weight: 600;
color: var(--text-primary);
}
.result-card-content {
color: var(--text-secondary);
line-height: 1.7;
}
.evidence-tag {
display: inline-block;
padding: 0.25rem 0.75rem;
background: var(--success-bg);
color: var(--success);
border-radius: 20px;
font-size: 0.75rem;
font-weight: 500;
margin-top: 0.75rem;
}
/* === HERO SECTION === */
.hero-section {
text-align: center;
padding: 3rem 2rem;
margin-bottom: 2rem;
background: var(--surface);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius-lg);
backdrop-filter: blur(20px);
position: relative;
overflow: hidden;
}
.hero-section::before {
content: "";
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: conic-gradient(
from 0deg at 50% 50%,
transparent,
var(--primary),
transparent,
var(--accent),
transparent
);
animation: rotate 20s linear infinite;
opacity: 0.1;
}
.hero-title {
font-family: "Outfit", sans-serif;
font-size: 3rem;
font-weight: 800;
background: linear-gradient(
135deg,
var(--text-primary) 0%,
var(--primary-light) 50%,
var(--accent) 100%
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
position: relative;
z-index: 1;
}
.hero-subtitle {
font-size: 1.1rem;
color: var(--text-secondary);
position: relative;
z-index: 1;
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--success-bg);
color: var(--success);
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
margin-top: 1rem;
position: relative;
z-index: 1;
}
/* === STATS BAR === */
.stats-bar {
display: flex;
justify-content: center;
gap: 3rem;
padding: 1.5rem;
background: var(--surface);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius);
margin-bottom: 2rem;
backdrop-filter: blur(10px);
}
.stat-item {
text-align: center;
}
.stat-value {
font-family: "Outfit", sans-serif;
font-size: 1.75rem;
font-weight: 700;
color: var(--primary-light);
}
.stat-label {
font-size: 0.85rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* === ANIMATIONS === */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
.loading-shimmer {
background: linear-gradient(
90deg,
var(--surface) 25%,
var(--surface-hover) 50%,
var(--surface) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
/* === TYPING INDICATOR === */
.typing-indicator {
display: flex;
gap: 4px;
padding: 1rem;
}
.typing-dot {
width: 8px;
height: 8px;
background: var(--primary);
border-radius: 50%;
animation: pulse 1s infinite;
}
.typing-dot:nth-child(2) {
animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
animation-delay: 0.4s;
}
/* === GLASSMORPHISM CARD === */
.glass-card {
background: var(--surface);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius);
padding: 1.5rem;
backdrop-filter: blur(20px);
box-shadow: var(--shadow-md);
}
/* === METRIC DISPLAY === */
.metric-container {
background: var(--surface);
border: 1px solid var(--glass-border);
border-radius: var(--border-radius);
padding: 1.25rem;
text-align: center;
transition: all var(--transition-normal);
}
.metric-container:hover {
border-color: var(--primary);
box-shadow: var(--shadow-glow);
}
.metric-value {
font-family: "Outfit", sans-serif;
font-size: 2rem;
font-weight: 700;
color: var(--primary-light);
}
.metric-label {
font-size: 0.9rem;
color: var(--text-muted);
margin-top: 0.25rem;
}
/* === HIDE STREAMLIT BRANDING === */
#MainMenu {
visibility: hidden;
}
footer {
visibility: hidden;
}
header {
visibility: hidden;
}