Mahil27
initial commit : AI DOCUMENT ASSISTANT
fa396c8
* {
box-sizing: border-box;
font-family: "Segoe UI", sans-serif;
}
body {
margin: 0;
background: #f4f2ff;
}
/* Layout */
.app {
display: flex;
min-height: 100vh;
}
/* Sidebar */
.sidebar {
width: 230px;
background: #0f1117;
color: #fff;
padding: 30px 20px;
}
.logo {
color: #3ddc97;
font-size: 22px;
}
.tagline {
font-size: 13px;
color: #aaa;
}
/* Main */
.main {
flex: 1;
padding: 30px;
}
/* Header */
.header h2 {
margin: 0;
font-size: 26px;
}
.header p {
margin-top: 6px;
color: #666;
}
/* Content */
.content {
display: grid;
grid-template-columns: 320px 1fr;
gap: 30px;
margin-top: 30px;
}
/* Cards */
.card {
background: #fff;
border-radius: 18px;
padding: 20px;
box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
/* Upload */
.upload-box {
border: 2px dashed #ccc;
border-radius: 12px;
padding: 30px;
text-align: center;
margin: 20px 0;
cursor: pointer;
}
.upload-box span {
color: #00c389;
font-weight: 600;
}
.upload-box.dragover {
border-color: #00c389;
background: #f0fff9;
}
.process-btn {
width: 100%;
padding: 12px;
border-radius: 30px;
background: #00c389;
color: white;
border: none;
cursor: pointer;
}
.status {
font-size: 13px;
margin-top: 10px;
color: #00a86b;
}
.status.error {
color: #d32f2f;
}
/* Chat */
.chat-box {
height: 350px;
overflow-y: auto;
padding: 12px;
background: #fafafa;
border-radius: 12px;
}
.placeholder {
color: #aaa;
}
.user-msg {
font-weight: 600;
margin-top: 14px;
animation: fadeInUp .3s ease;
}
.bot-msg {
margin-top: 10px;
animation: fadeInUp .3s ease;
}
/* Assistant formatting */
.bot-msg h2 {
color: #00c389;
font-size: 17px;
margin: 6px 0;
}
.bot-msg ul {
padding-left: 18px;
}
.bot-msg li {
font-size: 14px;
margin-bottom: 4px;
}
/* Input */
.chat-input {
display: flex;
gap: 10px;
margin-top: 15px;
}
.chat-input input {
flex: 1;
padding: 12px;
border-radius: 12px;
border: 1px solid #ccc;
}
.chat-input button {
padding: 12px 22px;
border-radius: 12px;
background: #0f1117;
color: white;
border: none;
}
/* Typing */
.typing {
font-size: 13px;
color: #666;
margin-top: 8px;
}
.typing span {
animation: blink 1.4s infinite both;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
.hidden {
display: none;
}
/* Animations */
@keyframes blink {
0% { opacity: .2; }
20% { opacity: 1; }
100% { opacity: .2; }
}
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
/* Responsive */
@media (max-width: 1023px) {
.app { flex-direction: column; }
.sidebar {
width: 100%;
display: flex;
gap: 15px;
padding: 15px;
}
.content { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
.sidebar { display: none; }
.main { padding: 15px; }
.chat-input { flex-direction: column; }
.chat-input button { width: 100%; }
}
/* ========== Upload Icon ========== */
.upload-icon {
font-size: 32px;
margin-bottom: 10px;
transition: transform 0.3s ease;
}
/* ========== Drag & Drop Animation ========== */
.upload-box {
transition: all 0.3s ease;
}
.upload-box.dragover {
border-color: #00c389;
background: #f0fff9;
transform: scale(1.02);
}
.upload-box.dragover .upload-icon {
transform: scale(1.2) rotate(-5deg);
}
/* ========== Uploaded Document Info ========== */
.doc-info {
margin: 10px 0;
font-size: 14px;
color: #333;
background: #f5f5ff;
padding: 8px 12px;
border-radius: 10px;
animation: fadeInUp 0.3s ease;
}
/* ========== Active Document Label ========== */
.active-doc {
font-size: 13px;
background: #eef7ff;
color: #004a99;
padding: 6px 10px;
border-radius: 8px;
margin-bottom: 10px;
}
/* Hide utility */
.hidden {
display: none;
}
/* Uploaded document display */
.doc-info {
margin-top: 12px;
padding: 10px 14px;
background: #eef7ff;
border-radius: 10px;
border-left: 4px solid #00c389;
}
.doc-label {
font-size: 12px;
color: #666;
display: block;
margin-bottom: 4px;
}
.doc-name {
font-size: 14px;
font-weight: 600;
color: #222;
word-break: break-all;
}
/* Active document in chat */
.active-doc {
font-size: 13px;
margin-bottom: 10px;
padding: 6px 10px;
background: #f0fff9;
border-left: 3px solid #00c389;
border-radius: 6px;
color: #333;
}
/* Assistant headings */
.ans-heading {
font-size: 17px;
margin: 14px 0 8px;
color: #00a86b;
font-weight: 700;
}
/* Bullet list */
.ans-list {
padding-left: 18px;
margin-bottom: 10px;
}
.ans-list li {
margin-bottom: 6px;
line-height: 1.5;
}
/* Highlight important values */
.highlight {
font-weight: 700;
color: #008060;
background: #e8fff6;
padding: 2px 6px;
border-radius: 4px;
}
/* Improve bot message spacing */
.bot-msg {
line-height: 1.6;
}