lakshmisravya123
Major upgrade: comprehensive document analysis
760153d
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #0f172a;
--bg-card: #1e293b;
--bg-hover: #253348;
--accent: #38bdf8;
--accent2: #818cf8;
--success: #34d399;
--warning: #fbbf24;
--danger: #f87171;
--text: #e2e8f0;
--text-dim: #94a3b8;
--border: #334155;
--border-light: #475569;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
.app { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.header { text-align: center; margin-bottom: 1.5rem; }
.header h1 {
font-size: 2.2rem; font-weight: 800;
background: linear-gradient(135deg, #38bdf8, #818cf8);
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header p { color: var(--text-dim); margin-top: 0.3rem; font-size: 0.95rem; }
/* Layout */
.layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; }
/* Sidebar */
.sidebar { max-height: calc(100vh - 120px); overflow-y: auto; }
.sidebar-card { background: var(--bg-card); border-radius: 12px; padding: 1.2rem; margin-bottom: 1rem; }
.sidebar-card h3 { font-size: 0.95rem; margin-bottom: 0.8rem; color: var(--accent); }
.analysis-card { max-height: 600px; overflow-y: auto; }
.dropzone {
border: 2px dashed var(--border); border-radius: 8px; padding: 1.2rem 1rem;
text-align: center; cursor: pointer; transition: all 0.3s;
}
.dropzone:hover { border-color: var(--accent); background: rgba(56,189,248,0.05); }
.dropzone p { color: var(--text-dim); font-size: 0.85rem; }
.doc-list { list-style: none; padding: 0; margin-top: 0.5rem; }
.doc-item {
display: flex; justify-content: space-between; align-items: center;
padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--border);
font-size: 0.85rem; cursor: pointer; border-radius: 6px; transition: background 0.2s;
}
.doc-item:hover { background: var(--bg-hover); }
.doc-item.selected { background: rgba(56,189,248,0.1); border-left: 3px solid var(--accent); }
.doc-item:last-child { border-bottom: none; }
.doc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-remove {
background: none; border: none; color: var(--danger);
cursor: pointer; font-size: 0.9rem; margin-left: 0.5rem;
}
/* Analysis Panel */
.analysis-panel { }
.tab-bar {
display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.8rem;
border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;
}
.tab-btn {
background: none; border: none; color: var(--text-dim); font-size: 0.75rem;
padding: 0.35rem 0.6rem; cursor: pointer; border-radius: 6px; transition: all 0.2s;
white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--bg-hover); }
.tab-btn.active { color: var(--accent); background: rgba(56,189,248,0.15); font-weight: 600; }
.tab-content { }
/* Sections */
.analysis-section { margin-bottom: 0.5rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.section-header {
padding: 0.5rem 0.7rem; cursor: pointer; font-size: 0.82rem; font-weight: 600;
background: rgba(255,255,255,0.03); transition: background 0.2s; user-select: none;
}
.section-header:hover { background: var(--bg-hover); }
.section-body { padding: 0.6rem 0.7rem; font-size: 0.82rem; line-height: 1.5; }
/* Summary text */
.summary-text { color: var(--text); line-height: 1.6; }
/* Tags / Badges */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.badge {
display: inline-block; padding: 0.2rem 0.5rem; border-radius: 999px;
font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge-blue { background: rgba(56,189,248,0.15); color: #38bdf8; }
.badge-purple { background: rgba(129,140,248,0.15); color: #818cf8; }
.badge-green { background: rgba(52,211,153,0.15); color: #34d399; }
.badge-yellow { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge-red { background: rgba(248,113,113,0.15); color: #f87171; }
.badge-gray { background: rgba(148,163,184,0.15); color: #94a3b8; }
/* Confidence bar */
.confidence-bar {
display: flex; align-items: center; gap: 0.5rem;
background: var(--bg); border-radius: 999px; height: 18px;
overflow: hidden; position: relative; flex: 1; max-width: 120px;
}
.confidence-fill {
height: 100%; border-radius: 999px; transition: width 0.5s ease;
min-width: 2px;
}
.confidence-bar span {
position: absolute; right: 6px; font-size: 0.65rem; font-weight: 700; color: white;
}
/* Insights */
.insight-card {
background: var(--bg); border-radius: 8px; padding: 0.6rem;
margin-bottom: 0.5rem; border-left: 3px solid var(--accent);
}
.insight-text { font-size: 0.82rem; margin-bottom: 0.4rem; }
.insight-meta { display: flex; align-items: center; gap: 0.5rem; }
/* Entities */
.entity-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.entity-group h4 { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.3rem; }
/* Structure */
.structure-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.section-names h4 { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.section-names ul { list-style: disc; padding-left: 1.2rem; font-size: 0.8rem; }
.section-names li { margin-bottom: 0.2rem; }
.structure-notes { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.4rem; font-style: italic; }
/* Sentiment */
.sentiment-overview { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; }
.section-sentiments h4 { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.sentiment-item {
display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0;
border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.sentiment-item:last-child { border-bottom: none; }
.sentiment-note { color: var(--text-dim); font-size: 0.75rem; font-style: italic; }
/* Facts vs Opinions */
.facts-ratio { margin-bottom: 0.6rem; }
.facts-section h4, .opinions-section h4 { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.fact-list, .opinion-list { list-style: none; padding: 0; }
.fact-list li, .opinion-list li {
padding: 0.3rem 0.5rem; margin-bottom: 0.3rem; border-radius: 6px;
font-size: 0.8rem; line-height: 1.4;
}
.fact-item { background: rgba(52,211,153,0.08); border-left: 3px solid var(--success); }
.opinion-item { background: rgba(251,191,36,0.08); border-left: 3px solid var(--warning); }
/* Questions */
.questions-intro { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.question-item {
display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.4rem 0;
border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.question-item:last-child { border-bottom: none; }
.q-number {
background: var(--accent); color: var(--bg); border-radius: 50%;
width: 20px; height: 20px; display: flex; align-items: center;
justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
/* Citations */
.citations-overview { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.citations-notes { font-size: 0.8rem; color: var(--text-dim); font-style: italic; }
/* Readability */
.readability-info { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.readability-info p { width: 100%; margin-top: 0.3rem; font-size: 0.8rem; color: var(--text-dim); }
/* Doc meta */
.doc-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
/* Empty note */
.empty-note { color: var(--text-dim); font-size: 0.82rem; font-style: italic; text-align: center; padding: 1rem; }
/* Chat */
.chat-area { display: flex; flex-direction: column; min-height: 500px; }
.messages {
flex: 1; background: var(--bg-card); border-radius: 12px; padding: 1rem;
overflow-y: auto; max-height: 600px; margin-bottom: 1rem;
}
.message { margin-bottom: 1rem; }
.message.user { text-align: right; }
.message.user .bubble {
display: inline-block; background: var(--accent2); color: white;
padding: 0.7rem 1rem; border-radius: 12px 12px 0 12px; max-width: 80%; text-align: left;
}
.message.assistant .bubble {
background: var(--bg); padding: 0.7rem 1rem; border-radius: 12px 12px 12px 0;
line-height: 1.6; max-width: 90%; white-space: pre-wrap;
}
.message .sources {
font-size: 0.8rem; color: var(--text-dim); margin-top: 0.4rem; font-style: italic;
}
.input-row { display: flex; gap: 0.5rem; }
.input-row input {
flex: 1; padding: 0.8rem 1rem; background: var(--bg-card);
border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 1rem;
}
.input-row input:focus { outline: none; border-color: var(--accent); }
.input-row button {
padding: 0.8rem 1.5rem; background: linear-gradient(135deg, #38bdf8, #818cf8);
border: none; border-radius: 10px; color: white; font-weight: 700; cursor: pointer;
}
.input-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-dim); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-sub { font-size: 0.85rem; margin-top: 0.5rem; opacity: 0.7; }
.uploading { text-align: center; padding: 1rem; color: var(--text-dim); font-size: 0.9rem; }
.spinner {
width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--accent);
border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
@media (max-width: 800px) {
.layout { grid-template-columns: 1fr; }
.header h1 { font-size: 1.6rem; }
.sidebar { max-height: none; }
.analysis-card { max-height: 400px; }
}