pl_ai_frontend / src /App.css
fraudTech's picture
Upload 18 files
5b74788 verified
Raw History Blame Contribute Delete
7.95 kB
/* Reset */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body, html, #root {
height: 100%;
background: #0a0f1f;
font-family: system-ui, sans-serif;
color: #f0f0f0;
}
/* App container */
.app-root {
display: flex;
flex-direction: column;
height: 100%;
}
/* Header */
.header {
padding: 1rem 1.5rem;
width: 100%;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
border-bottom: 1px solid rgba(255,255,255,0.1);
gap: 10px;
}
.header-title {
grid-column: 2;
justify-self: center;
margin: 0;
}
.header-actions {
grid-column: 3;
justify-self: end;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
}
.strict-toggle {
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 5px;
}
.btn-secondary {
padding: 0.5rem 1rem;
background: rgba(255,255,255,0.1);
color: white;
border: 1px solid rgba(255,255,255,0.3);
border-radius: 6px;
cursor: pointer;
font-size: 0.9rem;
transition: background 0.2s;
}
.btn-secondary:hover {
background: rgba(255,255,255,0.2);
}
.logout-btn {
padding: 0.5rem 1rem;
background: rgba(220,38,38,0.8);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 0.9rem;
transition: background 0.2s;
}
.logout-btn:hover {
background: rgba(220,38,38,1);
}
/* App container with sidebars */
.app-container {
display: flex;
flex: 1;
overflow: hidden;
}
/* Sidebars */
.sidebar {
width: 320px;
padding: 1.5rem;
overflow-y: auto;
border-right: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.03);
}
.sidebar h3 {
margin-top: 0;
margin-bottom: 1rem;
font-size: 1.2rem;
}
.sidebar h4 {
margin-top: 1rem;
margin-bottom: 0.5rem;
font-size: 1rem;
}
.right-sidebar {
border-right: none;
border-left: 1px solid rgba(255,255,255,0.1);
}
.status-message {
padding: 0.75rem;
background: rgba(34,197,94,0.2);
border: 1px solid rgba(34,197,94,0.4);
border-radius: 6px;
margin-top: 10px;
font-size: 0.9rem;
}
.metadata-panel pre,
.query-results pre {
background: rgba(0,0,0,0.3);
padding: 10px;
border-radius: 6px;
font-size: 0.85em;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
}
/* ---- MAIN CHAT AREA ---- */
.main {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-start; /* messages at top */
align-items: center; /* horizontally centered */
padding: 2rem 1rem;
overflow: hidden;
}
/* Messages window */
.messages {
width: 100%;
max-width: 700px;
height: 50vh;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
padding: 1rem;
overflow-y: auto;
border-radius: 10px;
margin-bottom: 1.5rem;
}
/* Each message */
.message {
margin-bottom: 1rem;
display: flex;
}
.message.user {
justify-content: flex-end;
}
/* Chat bubbles */
.bubble {
padding: 0.75rem 1rem;
border-radius: 12px; /* nicer, smoother */
max-width: 75%;
line-height: 1.6; /* improved readability */
word-wrap: break-word; /* prevent overflow */
}
.message.user .bubble {
background: #2563eb;
color: white;
}
.message.assistant .bubble {
background: rgba(255,255,255,0.15);
color: #f0f0f0;
}
/* Debug panel styles */
.debug {
margin-top: 0.25rem;
font-size: 0.8rem;
opacity: 0.9;
}
.debug summary {
cursor: pointer;
color: #9ca3af;
}
/* ---- INPUT AREA ---- */
.input-row {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100%;
max-width: 700px;
gap: 0.75rem;
}
.input-row textarea {
width: 70%;
border-radius: 10px;
border: 1px solid rgba(255,255,255,0.3);
background: rgba(255,255,255,0.1);
color: white;
padding: 0.75rem;
font-size: 1rem;
resize: vertical;
min-height: 60px;
}
.input-row textarea:focus {
outline: 2px solid #2563eb;
}
.input-row button {
padding: 0.75rem 1.25rem;
background: #22c55e;
color: black;
font-weight: 600;
border-radius: 8px;
border: none;
cursor: pointer;
font-size: 1rem;
}
.input-row button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Error box */
.error {
margin-top: 1rem;
padding: 0.75rem;
background: rgba(255,0,0,0.2);
border: 1px solid rgba(255,0,0,0.4);
border-radius: 8px;
text-align: center;
width: 100%;
max-width: 700px;
}
/* ---------------------------------------------------------- */
/* Markdown formatting inside bubbles */
/* ---------------------------------------------------------- */
.message .bubble p {
margin: 0.35rem 0;
line-height: 1.6;
}
.message .bubble h1,
.message .bubble h2,
.message .bubble h3,
.message .bubble h4 {
margin: 0.6rem 0 0.35rem;
font-weight: 600;
}
.message .bubble ul,
.message .bubble ol {
margin: 0.35rem 0 0.35rem 1.25rem;
padding-left: 0.75rem;
}
.message .bubble li {
margin: 0.15rem 0;
}
/* Inline code */
.message .bubble code {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
font-size: 0.95em;
padding: 0.1rem 0.25rem;
background: rgba(0, 0, 0, 0.35);
border-radius: 4px;
}
/* Code blocks */
.message .bubble pre {
margin: 0.6rem 0;
padding: 0.75rem;
background: rgba(0, 0, 0, 0.55);
border-radius: 6px;
overflow-x: auto;
}
.message .bubble pre code {
padding: 0;
background: transparent;
}
.markdown-body .katex {
font-size: 1.05rem;
-webkit-font-smoothing: antialiased;
}
.markdown-body .katex-display {
margin: 0.75rem 0;
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.45);
border-radius: 8px;
overflow-x: auto;
}
.markdown-body .katex-display > .katex {
display: inline-block;
width: 100%;
text-align: center;
}
.markdown-body .katex-inline {
padding: 0 0.15rem;
}
.markdown-body .katex-html {
color: inherit;
}
/* Blockquotes */
.message .bubble blockquote {
margin: 0.6rem 0;
padding-left: 1rem;
border-left: 3px solid rgba(255,255,255,0.3);
color: #d1d5db;
}
/* Tables */
.message .bubble table {
border-collapse: collapse;
margin: 0.6rem 0;
width: 100%;
}
.message .bubble th,
.message .bubble td {
border: 1px solid rgba(255,255,255,0.2);
padding: 0.4rem;
}
.message .bubble th {
background: rgba(255,255,255,0.15);
font-weight: 600;
}
/* ---------------------------------------------------------- */
/* Login screen */
/* ---------------------------------------------------------- */
.main.login {
justify-content: center;
align-items: center;
}
.login-form {
background: rgba(255,255,255,0.08);
padding: 2rem;
border-radius: 12px;
border: 1px solid rgba(255,255,255,0.15);
width: 100%;
max-width: 400px;
}
.login-form h2 {
margin-bottom: 1.5rem;
text-align: center;
color: #f0f0f0;
}
.login-form input {
width: 100%;
padding: 0.75rem;
margin-bottom: 1rem;
border-radius: 8px;
border: 1px solid rgba(255,255,255,0.3);
background: rgba(255,255,255,0.1);
color: white;
font-size: 1rem;
}
.login-form input:focus {
outline: 2px solid #2563eb;
}
.login-form button {
width: 100%;
padding: 0.75rem;
background: #22c55e;
color: black;
font-weight: 600;
border-radius: 8px;
border: none;
cursor: pointer;
font-size: 1rem;
transition: background 0.2s;
}
.login-form button:hover {
background: #16a34a;
}
.login-form .error {
margin-top: 1rem;
padding: 0.75rem;
background: rgba(255,0,0,0.2);
border: 1px solid rgba(255,0,0,0.4);
border-radius: 8px;
text-align: center;
}