Spaces:
Sleeping
Sleeping
Download frontend/style.css from Abdullah0327/Docent-AI-ChatBot: direct link, hf CLI and curl.
- Browser
- Download file 38.9 kB
-
https://huggingface.co/spaces/Abdullah0327/Docent-AI-ChatBot/resolve/main/frontend/style.css
- Command line
-
hf download hf://spaces/Abdullah0327/Docent-AI-ChatBot/frontend/style.css
-
curl -L -o style.css https://huggingface.co/spaces/Abdullah0327/Docent-AI-ChatBot/resolve/main/frontend/style.css
38.9 kB
/* ββ Reset & Base ββ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
color-scheme: dark;
--bg: #0f1117;
--surface: #1a1d27;
--surface2: #22263a;
--border: #2e3350;
--accent: #76b900; /* NVIDIA green */
--accent-dk: #5c9100;
--text: #e8eaf0;
--text-muted:#8b90a8;
--user-bg: #1e3a5f;
--user-text: #cce4ff;
--ai-bg: #1e2235;
--hover: #272c43;
--code-bg: #12141d;
--pdf-bg: #0a0c12;
--strong: #ffffff;
--scroll-thumb: #2e3350;
--auth-glow: #16202b;
--err-text: #ff9c9c;
--ok-text: #b6e26a;
--radius: 12px;
--font: 'Segoe UI', system-ui, sans-serif;
--ease: cubic-bezier(.22, .61, .36, 1); /* calm "swift out" curve */
}
[data-theme="light"] {
color-scheme: light;
--bg: #eef1f6;
--surface: #ffffff;
--surface2: #f1f3f8;
--border: #d7dce6;
--accent: #6aa800;
--accent-dk: #578a00;
--text: #1c2130;
--text-muted:#68708a;
--user-bg: #dbeafe;
--user-text: #1e3a5f;
--ai-bg: #ffffff;
--hover: #e5e9f2;
--code-bg: #eef1f6;
--pdf-bg: #d9dee7;
--strong: #000000;
--scroll-thumb: #c3cad8;
--auth-glow: #dfeaf7;
--err-text: #b02a2a;
--ok-text: #3f7d00;
}
html, body { height: 100%; overflow: hidden; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
transition: background-color .25s, color .25s;
}
/* ββ Themed scrollbars (everywhere) ββ */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* ββ Layout ββ */
.app-shell {
display: flex;
height: 100vh;
height: 100dvh; /* mobile browsers: exclude the URL bar / keyboard */
}
/* ββ Sidebar ββ */
.sidebar {
width: 280px;
min-width: 240px;
background: var(--surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 24px 16px;
gap: 24px;
overflow-y: auto;
}
.sidebar-header { display: flex; flex-direction: column; gap: 4px; }
.logo {
display: flex;
align-items: center;
gap: 8px;
font-size: 1.25rem;
font-weight: 700;
}
.logo-icon { color: var(--accent); font-size: 1rem; }
.logo-text { letter-spacing: .04em; }
.logo-sub {
font-size: .78rem;
color: var(--text-muted);
letter-spacing: .06em;
text-transform: uppercase;
}
.section-label {
font-size: .72rem;
font-weight: 600;
letter-spacing: .08em;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 8px;
}
.section-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
}
.clear-all-btn {
background: none;
border: none;
font-family: inherit;
font-size: .68rem;
font-weight: 600;
color: var(--text-muted);
cursor: pointer;
padding: 0 2px;
}
.clear-all-btn:hover { color: var(--err-text); text-decoration: underline; }
/* Drop zone */
.drop-zone {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
border: 2px dashed var(--border);
border-radius: var(--radius);
padding: 20px 12px;
cursor: pointer;
transition: border-color .2s, background .2s;
text-align: center;
}
.drop-zone:hover,
.drop-zone.dragover { border-color: var(--accent); background: rgba(118,185,0,.06); }
.drop-icon { font-size: 1.6rem; }
.drop-primary { font-size: .85rem; font-weight: 600; color: var(--text); }
.drop-secondary{ font-size: .75rem; color: var(--text-muted); }
/* Upload button */
.btn-upload {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
width: 100%;
margin-top: 10px;
padding: 10px;
background: var(--accent);
color: #000;
border: none;
border-radius: var(--radius);
font-size: .9rem;
font-weight: 700;
cursor: pointer;
transition: background .2s, opacity .2s;
}
.btn-upload:disabled { opacity: .45; cursor: not-allowed; }
.btn-upload:not(:disabled):hover { background: var(--accent-dk); }
/* Upload status */
.upload-status {
margin-top: 8px;
font-size: .78rem;
padding: 8px 10px;
border-radius: 8px;
background: var(--surface2);
color: var(--text-muted);
line-height: 1.5;
}
/* Doc list */
.doc-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 6px;
}
.doc-list li {
font-size: .8rem;
padding: 7px 10px;
background: var(--surface2);
border-radius: 8px;
color: var(--text);
border-left: 3px solid var(--accent);
word-break: break-all;
}
.doc-empty {
color: var(--text-muted) !important;
border-left-color: var(--border) !important;
font-style: italic;
}
.sidebar-footer {
margin-top: auto;
display: flex;
flex-direction: column;
gap: 4px;
font-size: .72rem;
color: var(--text-muted);
}
.model-tag {
font-size: .7rem;
padding: 2px 8px;
background: var(--surface2);
border-radius: 20px;
width: fit-content;
color: var(--accent);
}
/* ββ Chat Area ββ */
.chat-area {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-header {
padding: 20px 28px 16px;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.chat-header h1 {
font-size: 1.1rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-header p { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
/* Messages */
.messages {
flex: 1;
overflow-y: auto;
padding: 24px 28px;
display: flex;
flex-direction: column;
gap: 18px;
scroll-behavior: smooth;
}
/* Loader shown while a conversation's messages are fetched */
.messages-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 60px 0;
}
/* Message rows */
.message {
display: flex;
flex-direction: column;
max-width: 78%;
animation: msg-in .2s ease;
}
@keyframes msg-in {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: none; }
}
.message.user { align-self: flex-end; align-items: flex-end; }
.message.assistant { align-self: flex-start; align-items: flex-start; }
.bubble {
padding: 12px 16px;
border-radius: 16px;
font-size: .92rem;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
}
.message.user .bubble {
background: var(--user-bg);
color: var(--user-text);
border-bottom-right-radius: 4px;
}
.message.assistant .bubble {
background: var(--ai-bg);
color: var(--text);
border-bottom-left-radius: 4px;
border: 1px solid var(--border);
}
/* Markdown-rendered assistant answers */
.bubble.md { white-space: normal; }
.bubble.md p, .bubble.md ul, .bubble.md ol,
.bubble.md pre, .bubble.md table, .bubble.md blockquote { margin: 0 0 10px; }
.bubble.md > :last-child { margin-bottom: 0; }
.bubble.md ul, .bubble.md ol { padding-left: 20px; }
.bubble.md li { margin: 3px 0; }
.bubble.md h1, .bubble.md h2, .bubble.md h3, .bubble.md h4 {
font-size: 1em;
margin: 12px 0 6px;
}
.bubble.md code {
background: var(--code-bg);
border: 1px solid var(--border);
padding: 1px 5px;
border-radius: 4px;
font-size: .85em;
}
.bubble.md pre {
background: var(--code-bg);
border: 1px solid var(--border);
padding: 10px 12px;
border-radius: 8px;
overflow-x: auto;
}
.bubble.md pre code { background: none; padding: 0; }
.bubble.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.bubble.md th, .bubble.md td {
border: 1px solid var(--border);
padding: 4px 8px;
font-size: .85em;
}
.bubble.md strong { color: var(--strong); }
.bubble.md a { color: var(--accent); }
.bubble.md blockquote {
border-left: 3px solid var(--accent);
padding-left: 10px;
color: var(--text-muted);
}
.message.welcome .bubble {
background: transparent;
border: 1px dashed var(--border);
color: var(--text-muted);
font-style: italic;
}
/* Sources */
.sources {
margin-top: 6px;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.source-tag {
font-size: .72rem;
font-family: var(--font);
padding: 3px 9px;
border-radius: 20px;
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text-muted);
cursor: pointer;
transition: border-color .15s, background .15s;
}
.source-tag:hover {
border-color: var(--accent);
background: rgba(118, 185, 0, .08);
color: var(--text);
}
.source-tag strong { color: var(--accent); }
.source-view { font-size: .68rem; }
/* Typing indicator */
.typing-bubble {
display: flex;
align-items: center;
gap: 10px;
max-width: 100%;
}
.typing-dots { flex-shrink: 0; }
.typing-status {
font-size: .8rem;
color: var(--text-muted);
font-style: italic;
}
.typing-timer {
font-size: .72rem;
color: var(--text-muted);
opacity: .7;
flex-shrink: 0;
}
/* Blinking cursor while the answer streams in */
.bubble.streaming::after {
content: '\258D';
color: var(--accent);
margin-left: 2px;
animation: cursor-blink 1s steps(2, start) infinite;
}
@keyframes cursor-blink { to { visibility: hidden; } }
.typing-dots span {
display: inline-block;
width: 7px; height: 7px;
margin: 0 2px;
background: var(--text-muted);
border-radius: 50%;
animation: bounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
0%, 80%, 100% { transform: translateY(0); opacity: .5; }
40% { transform: translateY(-6px); opacity: 1; }
}
/* ββ Input Bar ββ */
.input-bar {
display: flex;
align-items: flex-end;
gap: 10px;
padding: 16px 28px 20px;
border-top: 1px solid var(--border);
background: var(--surface);
}
.question-input {
flex: 1;
resize: none;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: .92rem;
line-height: 1.5;
padding: 11px 14px;
max-height: 140px;
overflow-y: hidden; /* JS enables scrolling only once max-height is reached */
transition: border-color .2s;
}
.question-input:focus { outline: none; border-color: var(--accent); }
.question-input::placeholder { color: var(--text-muted); }
.btn-send {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
background: var(--accent);
border: none;
border-radius: 50%;
color: #000;
font-size: 1.1rem;
cursor: pointer;
flex-shrink: 0;
transition: background .2s, transform .1s;
}
.btn-send:hover:not(:disabled) { background: var(--accent-dk); }
.btn-send:active:not(:disabled){ transform: scale(.93); }
.btn-send:disabled { opacity: .45; cursor: not-allowed; }
.btn-send.stopping { background: #c0392b; color: #fff; }
.btn-send.stopping:hover { background: #a93226; }
/* ββ Reference images ββ */
.ref-img-label {
margin-top: 10px;
font-size: .72rem;
font-weight: 600;
letter-spacing: .06em;
text-transform: uppercase;
color: var(--text-muted);
}
.ref-img-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 6px;
}
.ref-img-wrapper {
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border);
background: var(--surface2);
flex: 0 0 auto;
}
.ref-img {
display: block;
max-width: 240px;
max-height: 180px;
object-fit: contain;
cursor: zoom-in;
transition: opacity .15s;
}
.ref-img:hover { opacity: .85; }
/* ββ PDF reference preview modal ββ */
.pdf-modal {
position: fixed;
inset: 0;
z-index: 55;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.pdf-modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, .65);
}
.pdf-modal-panel {
position: relative;
width: min(920px, 96vw);
height: 90vh;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.pdf-toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
background: var(--surface2);
border-bottom: 1px solid var(--border);
}
.pdf-title {
flex: 1;
min-width: 0;
font-size: .85rem;
font-weight: 600;
color: var(--accent);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.pdf-nav, .pdf-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.pdf-page-label {
font-size: .8rem;
color: var(--text-muted);
min-width: 56px;
text-align: center;
}
.pdf-btn {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text);
font-size: .95rem;
line-height: 1;
cursor: pointer;
text-decoration: none;
transition: border-color .15s, color .15s;
}
.pdf-btn:hover:not(:disabled) { border-color: var(--accent); }
.pdf-btn:disabled { opacity: .35; cursor: not-allowed; }
.pdf-body {
flex: 1;
overflow: auto;
background: var(--pdf-bg);
padding: 18px;
position: relative;
}
.pdf-canvas-wrap {
position: relative;
width: fit-content;
margin: 0 auto;
box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
.pdf-canvas-wrap canvas { display: block; }
.pdf-highlight-layer {
position: absolute;
inset: 0;
pointer-events: none;
}
.pdf-highlight {
position: absolute;
background: rgba(255, 213, 0, .40);
border-radius: 2px;
mix-blend-mode: multiply;
}
.pdf-loading {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(10, 12, 18, .6);
}
@media (max-width: 820px) {
.pdf-modal { padding: 0; }
.pdf-modal-panel {
width: 100vw;
height: 100vh;
height: 100dvh;
border-radius: 0;
border: none;
}
.pdf-body { padding: 10px; }
}
/* ββ Starter question chips ββ */
.starter-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}
.starter-chip {
font-size: .8rem;
font-family: var(--font);
padding: 7px 12px;
border-radius: 20px;
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text);
cursor: pointer;
transition: border-color .15s, background .15s;
text-align: left;
}
.starter-chip:hover { border-color: var(--accent); background: rgba(118, 185, 0, .08); }
/* ββ Feedback buttons ββ */
.feedback-bar { display: flex; gap: 4px; margin-top: 6px; }
.fb-btn {
background: transparent;
border: 1px solid transparent;
border-radius: 8px;
font-size: .85rem;
padding: 2px 7px;
cursor: pointer;
opacity: .45;
transition: opacity .15s, border-color .15s, background .15s;
}
.fb-btn:hover { opacity: 1; }
.fb-btn.active {
opacity: 1;
border-color: var(--accent);
background: rgba(118, 185, 0, .1);
}
/* ββ Voice input ββ */
.btn-mic {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 50%;
font-size: 1.05rem;
cursor: pointer;
flex-shrink: 0;
transition: border-color .2s;
}
.btn-mic:hover { border-color: var(--accent); }
.btn-mic.recording {
border-color: #e74c3c;
background: rgba(231, 76, 60, .15);
animation: mic-pulse 1.2s infinite;
}
@keyframes mic-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, .5); }
50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}
/* ββ Header buttons (export, theme) ββ */
.header-btn {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 38px;
height: 38px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: 1rem;
cursor: pointer;
transition: border-color .2s;
}
.header-btn:hover { border-color: var(--accent); }
.header-btn svg { width: 18px; height: 18px; }
/* Floating theme toggle on the auth screen */
.theme-fab {
position: absolute;
top: 18px;
right: 18px;
width: 42px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text);
cursor: pointer;
transition: border-color .2s, transform .15s;
}
.theme-fab:hover { border-color: var(--accent); transform: scale(1.06); }
.theme-fab svg { width: 20px; height: 20px; }
/* ββ Password field with show/hide eye ββ */
.password-wrap { position: relative; display: flex; }
.password-wrap .auth-input { flex: 1; padding-right: 44px; }
.eye-btn {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
border-radius: 8px;
transition: color .15s;
}
.eye-btn:hover { color: var(--accent); }
.eye-btn svg { width: 18px; height: 18px; }
/* ββ Admin doc list with delete ββ */
.doc-item { display: flex; align-items: center; gap: 6px; }
.doc-name { flex: 1; min-width: 0; }
.doc-del {
background: none;
border: none;
color: var(--text-muted);
font-size: 1rem;
line-height: 1;
cursor: pointer;
padding: 0 2px;
flex-shrink: 0;
}
.doc-del:hover { color: #ff9c9c; }
/* ββ Analytics ββ */
.btn-analytics {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: 100%;
padding: 10px;
background: var(--surface2);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: .88rem;
font-weight: 600;
cursor: pointer;
transition: border-color .2s, background .2s;
}
.btn-analytics:hover { border-color: var(--accent); background: rgba(118,185,0,.06); }
.stats-panel { max-width: 620px; height: auto; max-height: 88vh; }
.stats-body {
padding: 18px;
overflow-y: auto;
font-size: .88rem;
}
.stat-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
gap: 10px;
}
.stat-card {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 8px;
}
.stat-value { font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .7rem; color: var(--text-muted); text-align: center; }
.stat-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 5px;
}
.stat-list li {
display: flex;
justify-content: space-between;
gap: 10px;
font-size: .8rem;
padding: 7px 10px;
background: var(--surface2);
border-radius: 8px;
word-break: break-word;
}
.stat-doc { flex: 1; min-width: 0; }
.stat-count { color: var(--accent); font-weight: 700; flex-shrink: 0; }
/* ββ Sign in with Google ββ */
.auth-divider {
display: flex;
align-items: center;
gap: 12px;
margin: 16px 0 4px;
color: var(--text-muted);
font-size: .74rem;
text-transform: uppercase;
letter-spacing: .08em;
}
.auth-divider::before,
.auth-divider::after {
content: "";
flex: 1;
height: 1px;
background: var(--border);
}
.google-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-top: 10px;
padding: 11px;
background: var(--surface2);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
font-family: var(--font);
font-size: .9rem;
font-weight: 600;
cursor: pointer;
transition: border-color .2s, background .2s, transform .16s var(--ease), box-shadow .16s var(--ease);
}
.google-btn:hover:not(:disabled) {
border-color: var(--accent);
transform: translateY(-1px);
box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.google-btn:active:not(:disabled) { transform: translateY(0); }
.google-btn:disabled { opacity: .6; cursor: wait; }
.google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
/* ββ Auth extras ββ */
.auth-link {
background: none;
border: none;
color: var(--text-muted);
font-size: .78rem;
margin-top: 10px;
cursor: pointer;
text-decoration: underline;
align-self: center;
font-family: var(--font);
}
.auth-link:hover { color: var(--accent); }
/* ββ Confirmation modal ββ */
.confirm-modal {
position: fixed;
inset: 0;
z-index: 80;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.confirm-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, .55);
}
.confirm-card {
position: relative;
width: 100%;
max-width: 360px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 24px 22px 16px;
box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
animation: msg-in .18s ease;
}
.confirm-text {
font-size: .92rem;
line-height: 1.55;
word-break: break-word;
}
.confirm-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 18px;
}
.confirm-btn {
padding: 9px 18px;
border-radius: 10px;
font-size: .86rem;
font-weight: 600;
font-family: var(--font);
cursor: pointer;
transition: background .15s, border-color .15s;
}
.confirm-btn.cancel {
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text);
}
.confirm-btn.cancel:hover { border-color: var(--accent); }
.confirm-btn.danger {
background: #c0392b;
border: 1px solid #c0392b;
color: #fff;
}
.confirm-btn.danger:hover { background: #a93226; }
.confirm-btn.danger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.confirm-hint {
margin-top: 12px;
text-align: center;
font-size: .7rem;
color: var(--text-muted);
}
/* ββ Toast (transient notice) ββ */
.toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translate(-50%, 10px);
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: 12px;
padding: 11px 18px;
font-size: .84rem;
box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
opacity: 0;
pointer-events: none;
transition: opacity .25s, transform .25s;
z-index: 90;
max-width: 92vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* ββ Utility ββ */
.hidden { display: none !important; }
.spinner {
width: 16px; height: 16px;
border: 2px solid rgba(0,0,0,.3);
border-top-color: #000;
border-radius: 50%;
animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ββ Auth overlay ββ */
.auth-overlay {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: radial-gradient(circle at 30% 20%, var(--auth-glow), var(--bg));
z-index: 50;
padding: 20px;
}
.auth-card {
width: 100%;
max-width: 380px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 32px 28px;
display: flex;
flex-direction: column;
gap: 6px;
box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.auth-brand {
display: flex;
align-items: center;
gap: 8px;
font-size: 1.4rem;
font-weight: 700;
justify-content: center;
}
.auth-sub {
text-align: center;
color: var(--text-muted);
font-size: .85rem;
margin-bottom: 18px;
}
.auth-tabs {
display: flex;
background: var(--surface2);
border-radius: 10px;
padding: 4px;
margin-bottom: 18px;
}
.auth-tab {
flex: 1;
padding: 8px;
border: none;
background: transparent;
color: var(--text-muted);
font-size: .85rem;
font-weight: 600;
border-radius: 8px;
cursor: pointer;
transition: background .2s, color .2s;
}
.auth-tab.active { background: var(--accent); color: #000; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
font-size: .74rem;
font-weight: 600;
letter-spacing: .05em;
text-transform: uppercase;
color: var(--text-muted);
margin-top: 8px;
}
.auth-input {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
font-family: var(--font);
font-size: .92rem;
padding: 11px 14px;
transition: border-color .2s;
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-submit {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
margin-top: 18px;
padding: 12px;
background: var(--accent);
color: #000;
border: none;
border-radius: var(--radius);
font-size: .92rem;
font-weight: 700;
cursor: pointer;
transition: background .2s, opacity .2s;
}
.auth-submit:hover:not(:disabled) { background: var(--accent-dk); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-message {
margin-top: 14px;
font-size: .82rem;
padding: 10px 12px;
border-radius: 8px;
line-height: 1.5;
}
.auth-message.error { background: rgba(220,70,70,.12); color: var(--err-text); border: 1px solid rgba(220,70,70,.3); }
.auth-message.success { background: rgba(118,185,0,.12); color: var(--ok-text); border: 1px solid rgba(118,185,0,.3); }
/* ββ New chat button ββ */
.btn-new-chat {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: 100%;
padding: 10px;
background: var(--surface2);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius);
font-size: .88rem;
font-weight: 600;
cursor: pointer;
transition: border-color .2s, background .2s;
}
.btn-new-chat:hover { border-color: var(--accent); background: rgba(118,185,0,.06); }
.btn-new-chat span { color: var(--accent); font-size: 1.1rem; line-height: 1; }
/* ββ Session list ββ */
.sessions-section { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.session-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 4px;
overflow-y: auto;
}
.session-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
padding: 8px 10px;
background: var(--surface2);
border-radius: 8px;
cursor: pointer;
border-left: 3px solid transparent;
transition: border-color .15s, background .15s;
}
.session-item:hover { background: var(--hover); }
.session-item.active { border-left-color: var(--accent); background: var(--hover); }
.session-title {
flex: 1;
font-size: .82rem;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.session-del,
.session-ren {
background: none;
border: none;
color: var(--text-muted);
font-size: 1.1rem;
line-height: 1;
cursor: pointer;
padding: 0 2px;
opacity: 0;
transition: opacity .15s, color .15s;
}
.session-ren { font-size: .85rem; }
.session-item:hover .session-del,
.session-item:hover .session-ren { opacity: 1; }
.session-del:hover { color: #ff9c9c; }
.session-ren:hover { color: var(--accent); }
/* While renaming, the pencil is a tick (save) β keep it visible */
.session-ren.confirming {
opacity: 1;
color: var(--accent);
font-weight: 700;
}
.session-rename-input {
flex: 1;
min-width: 0;
background: var(--surface);
border: 1px solid var(--accent);
border-radius: 6px;
color: var(--text);
font-family: var(--font);
font-size: .82rem;
padding: 4px 6px;
}
.session-rename-input:focus { outline: none; }
.session-empty {
color: var(--text-muted);
font-style: italic;
font-size: .8rem;
padding: 6px 4px;
}
/* ββ Documents (collapsible) ββ */
.upload-details summary {
cursor: pointer;
list-style: none;
user-select: none;
}
.upload-details summary::-webkit-details-marker { display: none; }
.upload-details summary::before { content: "\25B8 "; color: var(--text-muted); }
.upload-details[open] summary::before { content: "\25BE "; }
.upload-section { margin-top: 10px; }
/* ββ Account footer ββ */
.account {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.account-email {
font-size: .76rem;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.btn-logout {
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text-muted);
font-size: .72rem;
padding: 4px 10px;
border-radius: 8px;
cursor: pointer;
flex-shrink: 0;
transition: border-color .2s, color .2s;
}
.btn-logout:hover { border-color: var(--accent); color: var(--text); }
/* ββ Boot loader (covers screen until auth state is known) ββ */
.boot-loader {
position: fixed;
inset: 0;
z-index: 60;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
}
.boot-spinner {
width: 36px;
height: 36px;
border: 3px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin .8s linear infinite;
}
/* ββ Chat header layout + mobile menu button ββ */
.chat-header {
display: flex;
align-items: center;
gap: 12px;
}
.chat-header-text { min-width: 0; flex: 1; }
.menu-btn {
display: none;
flex-shrink: 0;
width: 40px;
height: 40px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 10px;
color: var(--text);
font-size: 1.2rem;
cursor: pointer;
}
.menu-btn:hover { border-color: var(--accent); }
.sidebar-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, .55);
z-index: 39;
}
/* ββ Responsive ββ */
@media (max-width: 820px) {
/* Sidebar becomes an off-canvas drawer */
.menu-btn { display: flex; align-items: center; justify-content: center; }
.sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 82%;
max-width: 320px;
z-index: 40;
transform: translateX(-100%);
transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.5); }
.chat-area { width: 100%; }
.chat-header { padding: 14px 16px; gap: 8px; }
.chat-header h1 { font-size: 1rem; }
.chat-header p { font-size: .72rem; }
.header-btn { width: 36px; height: 36px; border-radius: 9px; }
.messages { padding: 16px 14px; }
.message { max-width: 90%; }
.input-bar { padding: 12px 14px 16px; gap: 8px; }
.auth-card { padding: 26px 20px; }
.theme-fab { top: 12px; right: 12px; }
.ref-img { max-width: 70vw; }
}
@media (max-width: 420px) {
.message { max-width: 95%; }
.bubble { font-size: .9rem; padding: 10px 13px; }
.chat-header p { display: none; }
/* Compact input bar: mic + textarea + send must fit a 360px screen */
.input-bar { gap: 6px; padding: 10px 10px 14px; }
.btn-mic, .btn-send { width: 40px; height: 40px; font-size: .95rem; }
.question-input { padding: 10px 12px; font-size: .88rem; }
/* Starter chips become full-width buttons */
.starter-chips { flex-direction: column; }
.starter-chip { width: 100%; }
/* Typing indicator: allow the status text to wrap */
.typing-bubble { flex-wrap: wrap; }
.typing-status { font-size: .74rem; }
/* Source tags + feedback stay tappable */
.source-tag { font-size: .68rem; padding: 4px 9px; }
.fb-btn { padding: 4px 9px; }
/* PDF modal toolbar tightens up */
.pdf-toolbar { padding: 8px 10px; gap: 8px; }
.pdf-title { font-size: .76rem; }
.pdf-page-label { min-width: 44px; font-size: .74rem; }
.pdf-btn { width: 28px; height: 28px; }
}
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Motion system β one easing curve, transform/opacity only.
Entrances choreograph the page; micro-interactions give feedback.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
@keyframes rise-in {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: none; }
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slide-in-left {
from { opacity: 0; transform: translateX(-18px); }
to { opacity: 1; transform: none; }
}
@keyframes pop-in {
from { opacity: 0; transform: translateY(10px) scale(.96); }
to { opacity: 1; transform: none; }
}
@keyframes item-in {
from { opacity: 0; transform: translateX(-8px); }
to { opacity: 1; transform: none; }
}
@keyframes item-out {
to { opacity: 0; transform: translateX(-12px); }
}
@keyframes shake {
10%, 90% { transform: translateX(-1px); }
20%, 80% { transform: translateX(2px); }
30%, 50%, 70% { transform: translateX(-3px); }
40%, 60% { transform: translateX(3px); }
}
@keyframes brand-in {
from { opacity: 0; transform: rotate(-90deg) scale(.4); }
to { opacity: 1; transform: none; }
}
/* ββ Auth screen choreography ββ */
.auth-overlay { animation: fade-in .4s var(--ease) both; }
.auth-card { animation: pop-in .5s var(--ease) both; }
/* Card contents cascade in, one beat apart */
.auth-card > *, .auth-form > * { animation: rise-in .45s var(--ease) both; }
.auth-card > :nth-child(1) { animation-delay: .08s; }
.auth-card > :nth-child(2) { animation-delay: .14s; }
.auth-card > :nth-child(3) { animation-delay: .20s; }
.auth-card > :nth-child(4) { animation-delay: .26s; }
.auth-form > :nth-child(1) { animation-delay: .30s; }
.auth-form > :nth-child(2) { animation-delay: .34s; }
.auth-form > :nth-child(3) { animation-delay: .38s; }
.auth-form > :nth-child(4) { animation-delay: .42s; }
.auth-form > :nth-child(5) { animation-delay: .46s; }
.auth-form > :nth-child(6) { animation-delay: .50s; }
.auth-form > :nth-child(7) { animation-delay: .52s; }
.auth-form > :nth-child(8) { animation-delay: .54s; }
.auth-brand .logo-icon { animation: brand-in .7s var(--ease) both .1s; }
.auth-message { animation: rise-in .3s var(--ease) both; }
.auth-message.error { animation: shake .45s var(--ease) both; }
.auth-submit { transition: background .2s, opacity .2s, transform .18s var(--ease), box-shadow .18s var(--ease); }
.auth-submit:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 6px 18px rgba(118, 185, 0, .28);
}
.auth-submit:active:not(:disabled) { transform: translateY(0) scale(.98); }
/* ββ App entrance (plays once when the shell appears) ββ */
/* Desktop only: on mobile the sidebar is an off-canvas drawer whose
translateX(-100%) must never be pinned by an animation's fill mode */
@media (min-width: 821px) {
.app-shell .sidebar { animation: slide-in-left .45s var(--ease) both; }
}
.app-shell .chat-header { animation: rise-in .45s var(--ease) both .08s; }
.app-shell .messages { animation: fade-in .5s var(--ease) both .16s; }
.app-shell .input-bar { animation: rise-in .45s var(--ease) both .2s; }
/* ββ Sidebar life ββ */
.session-item { animation: item-in .3s var(--ease) both; }
.session-item.removing {
/* !important beats the inline cascade delay set at render time */
animation: item-out .18s var(--ease) forwards;
animation-delay: 0s !important;
pointer-events: none;
}
.btn-new-chat, .btn-analytics, .btn-upload, .btn-logout {
transition: border-color .2s, background .2s, transform .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-new-chat:hover, .btn-analytics:hover {
transform: translateY(-1px);
box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.btn-new-chat:active, .btn-analytics:active { transform: translateY(0); }
.btn-upload:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(118, 185, 0, .25); }
.btn-upload:not(:disabled):active { transform: translateY(0); }
.drop-zone.dragover { animation: drop-pulse 1.1s ease-in-out infinite; }
@keyframes drop-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(118, 185, 0, .35); }
50% { box-shadow: 0 0 0 7px rgba(118, 185, 0, 0); }
}
.doc-list li { animation: item-in .3s var(--ease) both; }
/* ββ Messages & their trimmings ββ */
.message { animation: rise-in .32s var(--ease) both; }
.sources, .feedback-bar, .ref-img-grid, .ref-img-label {
animation: fade-in .4s var(--ease) both .05s;
}
.ref-img-wrapper { animation: pop-in .35s var(--ease) both; }
.ref-img-wrapper:nth-child(2) { animation-delay: .06s; }
.ref-img-wrapper:nth-child(3) { animation-delay: .12s; }
.ref-img-wrapper:nth-child(4) { animation-delay: .18s; }
.source-tag { transition: border-color .15s, background .15s, transform .15s var(--ease); }
.source-tag:hover { transform: translateY(-1px); }
/* Starter chips cascade under the welcome bubble */
.starter-chip { animation: rise-in .4s var(--ease) both; }
.starter-chip:nth-child(1) { animation-delay: .10s; }
.starter-chip:nth-child(2) { animation-delay: .16s; }
.starter-chip:nth-child(3) { animation-delay: .22s; }
.starter-chip:nth-child(4) { animation-delay: .28s; }
.starter-chip:nth-child(5) { animation-delay: .34s; }
.starter-chip:hover { transform: translateY(-1px); }
.starter-chip { transition: border-color .15s, background .15s, transform .15s var(--ease); }
/* ββ Header buttons: gentle lift, theme icon turns ββ */
.header-btn { transition: border-color .2s, transform .16s var(--ease); }
.header-btn:hover { transform: translateY(-1px); }
.header-btn svg, .theme-fab svg { transition: transform .35s var(--ease); }
.header-btn:hover svg, .theme-fab:hover svg { transform: rotate(40deg); }
.btn-send { transition: background .2s, transform .16s var(--ease), box-shadow .16s var(--ease); }
.btn-send:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 4px 14px rgba(118, 185, 0, .3); }
.btn-send:active:not(:disabled) { transform: scale(.92); }
/* ββ Modals: backdrop fades, panel pops ββ */
.confirm-backdrop, .pdf-modal-backdrop, .sidebar-backdrop { animation: fade-in .25s var(--ease) both; }
.confirm-card { animation: pop-in .28s var(--ease) both; }
.pdf-modal-panel { animation: pop-in .32s var(--ease) both; }
/* ββ Toast: settle up with a soft overshoot ββ */
.toast { transition: opacity .3s var(--ease), transform .3s var(--ease); }
/* ββ Theme switch: colours sweep instead of snapping (class lives ~450ms) ββ */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
transition: background-color .35s var(--ease), color .35s var(--ease),
border-color .35s var(--ease), fill .35s var(--ease), stroke .35s var(--ease) !important;
}
/* ββ Reduced motion: everything appears instantly ββ */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: .01ms !important;
animation-iteration-count: 1 !important;
transition-duration: .01ms !important;
}
}
/* ββ Reset & Base ββ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
color-scheme: dark;
--bg: #0f1117;
--surface: #1a1d27;
--surface2: #22263a;
--border: #2e3350;
--accent: #76b900; /* NVIDIA green */
--accent-dk: #5c9100;
--text: #e8eaf0;
--text-muted:#8b90a8;
--user-bg: #1e3a5f;
--user-text: #cce4ff;
--ai-bg: #1e2235;
--hover: #272c43;
--code-bg: #12141d;
--pdf-bg: #0a0c12;
--strong: #ffffff;
--scroll-thumb: #2e3350;
--auth-glow: #16202b;
--err-text: #ff9c9c;
--ok-text: #b6e26a;
--radius: 12px;
--font: 'Segoe UI', system-ui, sans-serif;
--ease: cubic-bezier(.22, .61, .36, 1); /* calm "swift out" curve */
}
[data-theme="light"] {
color-scheme: light;
--bg: #eef1f6;
--surface: #ffffff;
--surface2: #f1f3f8;
--border: #d7dce6;
--accent: #6aa800;
--accent-dk: #578a00;
--text: #1c2130;
--text-muted:#68708a;
--user-bg: #dbeafe;
--user-text: #1e3a5f;
--ai-bg: #ffffff;
--hover: #e5e9f2;
--code-bg: #eef1f6;
--pdf-bg: #d9dee7;
--strong: #000000;
--scroll-thumb: #c3cad8;
--auth-glow: #dfeaf7;
--err-text: #b02a2a;
--ok-text: #3f7d00;
}
html, body { height: 100%; overflow: hidden; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
transition: background-color .25s, color .25s;
}
/* ββ Themed scrollbars (everywhere) ββ */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* ββ Layout ββ */
.app-shell {
display: flex;
height: 100vh;
height: 100dvh; /* mobile browsers: exclude the URL bar / keyboard */
}
/* ββ Sidebar ββ */
.sidebar {
width: 280px;
min-width: 240px;
background: var(--surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 24px 16px;
gap: 24px;
overflow-y: auto;
}
.sidebar-header { display: flex; flex-direction: column; gap: 4px; }
.logo {
display: flex;
align-items: center;
gap: 8px;
font-size: 1.25rem;
font-weight: 700;
}
.logo-icon { color: var(--accent); font-size: 1rem; }
.logo-text { letter-spacing: .04em; }