Apurva Umredkar
added backend functionality
d8f06d4
/* Variables */
:root {
--primary-color: #005bbb;
--primary-dark: #004798;
--secondary-color: #e87722;
--background-color: #f5f7fa;
--sidebar-color: #f0f5ff;
--right-panel-color: #f8fafd;
--border-color: #e1e5eb;
--text-color: #333333;
--text-secondary: #666666;
--card-color: #ffffff;
--hover-color: #f8f9fa;
--disabled-color: #cccccc;
}
/* Global Styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 600;
}
/* App Container */
.app-container {
display: grid;
grid-template-columns: 280px 1fr 300px;
height: 100vh;
overflow: hidden;
}
/* Sidebar */
.sidebar {
background-color: var(--sidebar-color);
padding: 1.5rem;
overflow-y: auto;
border-right: 1px solid var(--border-color);
}
.logo {
display: flex;
align-items: center;
margin-bottom: 2rem;
}
.logo img {
width: 40px;
height: 40px;
margin-right: 10px;
}
.logo h1 {
font-size: 1.2rem;
color: var(--primary-color);
margin: 0;
}
.search-box {
display: flex;
margin-bottom: 1.5rem;
}
.search-box input {
flex: 1;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 8px 0 0 8px;
font-size: 0.9rem;
outline: none;
}
.search-box input:focus {
border-color: var(--primary-color);
}
.search-box button {
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 0 8px 8px 0;
padding: 0 1rem;
cursor: pointer;
}
.search-box button:hover {
background-color: var(--primary-dark);
}
.category {
margin-bottom: 1.5rem;
}
.category h3 {
background-color: var(--primary-color);
color: white;
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 1rem;
margin-bottom: 0.75rem;
}
.link-card {
display: block;
padding: 0.75rem;
background-color: white;
border-left: 3px solid var(--secondary-color);
border-radius: 4px;
margin-bottom: 0.5rem;
text-decoration: none;
color: var(--text-color);
transition: transform 0.2s, box-shadow 0.2s;
}
.link-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
background-color: var(--hover-color);
}
.link-card h4 {
font-size: 0.9rem;
margin: 0 0 0.25rem 0;
color: var(--primary-color);
}
.link-card p {
font-size: 0.8rem;
margin: 0;
color: var(--text-secondary);
}
/* Main Content */
.main-content {
display: flex;
flex-direction: column;
height: 100vh;
}
header {
padding: 1rem 1.5rem;
background-color: white;
border-bottom: 1px solid var(--border-color);
}
header h1 {
font-size: 1.25rem;
display: flex;
align-items: center;
}
header h1 i {
margin-right: 0.5rem;
color: var(--primary-color);
}
.chat-container {
flex: 1;
padding: 1.5rem;
overflow-y: auto;
scroll-behavior: smooth;
}
.empty-chat {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
padding: 2rem;
text-align: center;
}
.empty-chat h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--primary-color);
}
.empty-chat p {
color: var(--text-secondary);
margin-bottom: 2rem;
max-width: 500px;
}
.quick-questions {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
}
.quick-question {
background-color: rgba(232, 119, 34, 0.1);
color: var(--secondary-color);
border: 1px solid rgba(232, 119, 34, 0.3);
border-radius: 8px;
padding: 0.5rem 1rem;
font-size: 0.85rem;
cursor: pointer;
transition: all 0.2s;
}
.quick-question:hover {
background-color: rgba(232, 119, 34, 0.2);
}
.messages {
display: flex;
flex-direction: column;
}
.message {
margin-bottom: 1rem;
max-width: 85%;
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.message.user {
margin-left: auto;
}
.message.assistant {
margin-right: auto;
}
.bubble {
padding: 1rem;
border-radius: 1.2rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.message.user .bubble {
background-color: var(--primary-color);
color: white;
border-bottom-right-radius: 0.25rem;
}
.message.assistant .bubble {
background-color: white;
border: 1px solid var(--border-color);
border-bottom-left-radius: 0.25rem;
}
.meta {
font-size: 0.75rem;
margin-top: 0.25rem;
color: var(--text-secondary);
}
.message.user .meta {
text-align: right;
}
.message.assistant .meta {
text-align: left;
}
.input-container {
border-top: 1px solid var(--border-color);
padding: 1rem 1.5rem;
background-color: white;
}
.message-input {
display: flex;
background-color: white;
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border-color);
}
.message-input input {
flex: 1;
padding: 1rem;
border: none;
outline: none;
font-size: 0.95rem;
}
.message-input button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 0 1.25rem;
cursor: pointer;
transition: background-color 0.2s;
}
.message-input button:hover {
background-color: var(--primary-dark);
}
.message-input button:disabled {
background-color: var(--disabled-color);
cursor: not-allowed;
}
/* Right Panel */
.right-panel {
background-color: var(--right-panel-color);
padding: 1.5rem;
overflow-y: auto;
border-left: 1px solid var(--border-color);
}
.right-panel h3 {
margin-bottom: 1rem;
font-size: 1.1rem;
}
.source-card {
background-color: white;
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.source-card h4 {
font-size: 0.95rem;
margin: 0 0 0.5rem 0;
color: var(--primary-color);
}
.source-card .link {
display: flex;
align-items: center;
font-size: 0.8rem;
color: var(--secondary-color);
text-decoration: none;
margin-bottom: 0.25rem;
}
.source-card .link i {
margin-left: 0.25rem;
}
.source-card .score {
font-size: 0.75rem;
color: var(--text-secondary);
}
.admin-tools {
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.admin-btn {
display: block;
width: 100%;
padding: 0.75rem;
margin-bottom: 0.75rem;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.2s;
}
.admin-btn:hover {
background-color: var(--primary-dark);
}
/* Responsive */
@media (max-width: 1024px) {
.app-container {
grid-template-columns: 0px 1fr 0px;
}
.sidebar, .right-panel {
display: none;
}
}