/* ===================================
Database MCP - Clean Design
===================================== */
:root {
/* Colors - Blue Accent */
--primary: #0ea5e9;
--primary-hover: #0284c7;
--primary-dark: #0369a1;
/* Dark Mode */
--dark-bg: #1e1e1e;
--dark-surface: #252526;
--dark-surface-2: #2d2d30;
--dark-border: #3e3e42;
--dark-text: #e0e0e0;
--dark-text-secondary: #858585;
/* Light Mode */
--light-bg: #ffffff;
--light-surface: #f9fafb;
--light-surface-2: #f3f4f6;
--light-border: #e5e7eb;
--light-text: #111827;
--light-text-secondary: #6b7280;
/* Status Colors */
--success: #10b981;
--error: #ef4444;
--warning: #f59e0b;
--info: #3b82f6;
/* Default to dark */
--bg: var(--dark-bg);
--surface: var(--dark-surface);
--surface-2: var(--dark-surface-2);
--border: var(--dark-border);
--text: var(--dark-text);
--text-secondary: var(--dark-text-secondary);
}
html[data-theme="light"] {
--bg: var(--light-bg);
--surface: var(--light-surface);
--surface-2: var(--light-surface-2);
--border: var(--light-border);
--text: var(--light-text);
--text-secondary: var(--light-text-secondary);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
transition: background 0.3s, color 0.3s;
}
/* Theme Toggle */
.theme-toggle {
position: fixed;
top: 1.5rem;
right: 1.5rem;
z-index: 1000;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--surface-2);
border: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
}
.theme-toggle:hover {
background: var(--border);
transform: scale(1.05);
}
.theme-icon {
color: var(--text);
width: 20px;
height: 20px;
transition: transform 0.3s;
}
.theme-toggle:hover .theme-icon {
transform: rotate(20deg);
}
/* App Screens */
#app {
width: 100%;
height: 100%;
}
.screen {
display: none;
width: 100%;
height: 100%;
animation: fadeIn 0.3s;
}
.screen.active {
display: flex;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Connection Screen */
#connection-screen {
align-items: center;
justify-content: center;
padding: 2rem;
}
.connection-wrapper {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
max-width: 1100px;
width: 100%;
align-items: center;
}
.connection-container {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.connection-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
}
.logo-icon {
width: 48px;
height: 48px;
border-radius: 8px;
background: linear-gradient(135deg, var(--primary), var(--primary-hover));
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.connection-header h1 {
font-size: 2rem;
font-weight: 600;
}
.connection-header .subtitle {
color: var(--text-secondary);
font-size: 0.9rem;
}
.connection-form {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 2rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.form-header {
margin-bottom: 2rem;
}
.form-header h2 {
font-size: 1.25rem;
margin-bottom: 0.5rem;
}
.form-description {
color: var(--text-secondary);
font-size: 0.9rem;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
font-weight: 500;
font-size: 0.875rem;
color: var(--text);
}
.label-icon {
opacity: 0.6;
width: 14px;
height: 14px;
}
.form-group input,
.form-group select {
width: 100%;
padding: 0.75rem 1rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text);
font-size: 0.9375rem;
font-family: inherit;
transition: all 0.2s;
}
.form-group input::placeholder {
color: var(--text-secondary);
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
background: var(--surface-2);
}
.select-wrapper {
position: relative;
}
.select-arrow {
position: absolute;
right: 1rem;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
opacity: 0.5;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.error-message {
display: none;
padding: 1rem;
background: rgba(239, 68, 68, 0.1);
border: 1px solid var(--error);
border-radius: 6px;
color: var(--error);
margin-top: 1rem;
align-items: center;
gap: 0.75rem;
}
.error-message.show {
display: flex;
}
.error-message svg {
width: 16px;
height: 16px;
flex-shrink: 0;
}
/* Buttons */
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
display: inline-flex;
align-items: center;
gap: 0.5rem;
width: 100%;
justify-content: center;
}
.btn-primary {
background: var(--primary);
color: white;
}
.btn-primary:hover {
background: var(--primary-hover);
}
.btn-secondary {
background: var(--surface-2);
color: var(--text);
border: 1px solid var(--border);
}
.btn-secondary:hover {
background: var(--border);
}
.btn-ghost {
background: transparent;
border: none;
color: var(--text);
}
.btn-ghost:hover {
background: var(--surface-2);
}
.btn-lg {
padding: 1rem 2rem;
font-size: 1.0625rem;
margin-top: 1rem;
}
.btn-sm {
padding: 0.5rem 1rem;
font-size: 0.875rem;
width: auto;
}
.btn-small {
padding: 0.5rem 1rem;
font-size: 0.875rem;
width: auto;
}
.btn-icon-sm {
background: transparent;
border: none;
color: var(--text);
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 4px;
transition: all 0.2s;
}
.btn-icon-sm:hover {
background: var(--surface-2);
}
/* Connection Illustration */
.connection-illustration {
display: flex;
align-items: center;
justify-content: center;
opacity: 0.2;
}
.connection-illustration svg {
color: var(--text);
}
@media (max-width: 768px) {
.connection-wrapper {
grid-template-columns: 1fr;
}
.connection-illustration {
display: none;
}
.form-row {
grid-template-columns: 1fr;
}
}
/* Schema Screen */
#schema-screen {
flex-direction: column;
}
.schema-wrapper {
display: flex;
flex-direction: column;
height: 100vh;
padding: 0;
}
.schema-header-bar {
padding: 1.5rem 2rem;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.schema-header-content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 100%;
}
.schema-breadcrumb {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 0.95rem;
color: var(--text-secondary);
}
.schema-breadcrumb svg {
width: 16px;
height: 16px;
}
.schema-container {
flex: 1;
padding: 2rem;
overflow-y: auto;
display: flex;
align-items: flex-start;
justify-content: center;
}
.schema-selection-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 2rem;
max-width: 500px;
width: 100%;
}
.card-header {
margin-bottom: 2rem;
}
.card-header h2 {
font-size: 1.25rem;
margin-bottom: 0.5rem;
}
.card-header p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.schema-list {
margin-bottom: 2rem;
max-height: 300px;
overflow-y: auto;
}
.schema-item {
padding: 0.75rem;
margin-bottom: 0.5rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
}
.schema-item:hover {
background: var(--surface-2);
border-color: var(--primary);
}
.schema-item.selected {
background: rgba(14, 165, 233, 0.1);
border-color: var(--primary);
}
.loading-state {
text-align: center;
padding: 2rem;
color: var(--text-secondary);
}
.spinner {
width: 24px;
height: 24px;
border: 2px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.progress-container {
margin-bottom: 2rem;
}
.progress-bar {
width: 100%;
height: 6px;
background: var(--bg);
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.75rem;
}
.progress-fill {
height: 100%;
background: var(--primary);
width: 0%;
transition: width 0.3s;
}
.progress-message {
font-size: 0.875rem;
color: var(--text-secondary);
text-align: center;
}
/* Main Layout */
.main-layout {
display: flex;
width: 100%;
height: 100vh;
}
.sidebar {
width: 280px;
background: var(--surface);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
transition: all 0.3s ease;
z-index: 100;
}
.sidebar.collapsed {
width: 0;
border-right: none;
overflow: hidden;
}
.sidebar-toggle-btn {
position: fixed;
left: 0;
top: 50%;
transform: translateY(-50%);
z-index: 101;
background: var(--primary);
color: white;
border: none;
width: 32px;
height: 64px;
border-radius: 0 8px 8px 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
}
.sidebar-toggle-btn:hover {
background: var(--primary-hover);
}
.sidebar-toggle-btn.hidden {
display: none;
}
.sidebar-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
}
.sidebar-title {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 600;
}
.sidebar-title svg {
width: 18px;
height: 18px;
}
.schema-tree {
flex: 1;
overflow-y: auto;
padding: 1rem;
}
.table-item {
padding: 0.75rem;
margin-bottom: 0.5rem;
background: var(--bg);
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
}
.table-item:hover {
background: var(--surface-2);
border-left: 3px solid var(--primary);
padding-left: calc(0.75rem - 3px);
}
.table-name {
font-weight: 500;
font-size: 0.95rem;
}
.table-info {
font-size: 0.8rem;
color: var(--text-secondary);
margin-top: 0.25rem;
}
.sidebar-footer {
padding: 1rem;
border-top: 1px solid var(--border);
}
.main-content {
flex: 1;
display: flex;
flex-direction: column;
background: var(--bg);
transition: margin-left 0.3s ease;
}
/* Chat */
.chat-header {
padding: 1.5rem 2rem;
border-bottom: 1px solid var(--border);
background: var(--surface);
display: flex;
justify-content: space-between;
align-items: center;
}
.chat-header-left {
display: flex;
align-items: center;
gap: 1rem;
}
.chat-header h2 {
font-size: 1.25rem;
}
.mobile-only {
display: none;
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 2rem;
}
.welcome-message {
background: var(--surface);
border: 1px solid var(--border);
padding: 2rem;
border-radius: 8px;
margin-bottom: 2rem;
}
.welcome-header {
display: flex;
align-items: flex-start;
gap: 1rem;
margin-bottom: 1.5rem;
}
.welcome-header svg {
color: var(--primary);
flex-shrink: 0;
margin-top: 0.25rem;
}
.welcome-header h3 {
font-size: 1.125rem;
margin-bottom: 0.25rem;
}
.welcome-header p {
font-size: 0.9rem;
color: var(--text-secondary);
}
.welcome-content {
margin-bottom: 1.5rem;
}
.welcome-content p {
margin-bottom: 0.75rem;
color: var(--text-secondary);
}
.welcome-content ul {
list-style: none;
padding-left: 0;
}
.welcome-content li {
padding-left: 1.5rem;
margin-bottom: 0.5rem;
position: relative;
color: var(--text-secondary);
}
.welcome-content li:before {
content: "→";
position: absolute;
left: 0;
color: var(--primary);
}
.welcome-examples {
border-top: 1px solid var(--border);
padding-top: 1.5rem;
}
.examples-label {
font-size: 0.875rem;
font-weight: 500;
margin-bottom: 1rem;
color: var(--text);
}
.example-chips {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.example-chip {
padding: 0.5rem 1rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 20px;
cursor: pointer;
font-size: 0.875rem;
transition: all 0.2s;
}
.example-chip:hover {
background: var(--primary);
border-color: var(--primary);
color: white;
}
.message {
margin-bottom: 1rem;
animation: slideIn 0.3s;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message.user {
display: flex;
justify-content: flex-end;
}
.message-content {
max-width: 75%;
padding: 1rem;
border-radius: 12px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.message.user .message-content {
background: var(--primary);
color: white;
border-radius: 12px 4px 12px 12px;
}
.message.assistant .message-content {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px 12px 12px 12px;
color: var(--text);
}
/* Loading indicator */
.loading-indicator {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--surface-2);
border-radius: 6px;
margin: 0.5rem 0;
}
.loading-dots {
display: inline-flex;
gap: 0.3rem;
}
.loading-dots span {
width: 6px;
height: 6px;
background: var(--primary);
border-radius: 50%;
animation: bounce 1.4s infinite;
}
.loading-dots span:nth-child(2) {
animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%, 80%, 100% {
transform: scale(1) translateY(0);
opacity: 0.5;
}
40% {
transform: scale(1.2) translateY(-3px);
opacity: 1;
}
}
/* Error message styling */
.error-indicator {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
background: rgba(239, 68, 68, 0.1);
border-left: 3px solid var(--error);
border-radius: 4px;
margin: 0.5rem 0;
}
.error-indicator svg {
color: var(--error);
flex-shrink: 0;
}
.error-indicator-text {
color: var(--error);
font-weight: 500;
}
/* Chat Input */
.chat-input-container {
padding: 1.5rem 2rem;
border-top: 1px solid var(--border);
background: var(--surface);
}
.input-wrapper {
display: flex;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
#chat-input {
flex: 1;
padding: 0.75rem 1rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text);
font-family: inherit;
font-size: 0.9375rem;
resize: none;
max-height: 150px;
transition: all 0.2s;
}
#chat-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
background: var(--surface-2);
}
.btn-send {
width: 40px;
height: 40px;
border: none;
border-radius: 6px;
background: var(--primary);
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
flex-shrink: 0;
}
.btn-send:hover {
background: var(--primary-hover);
}
.input-hint {
font-size: 0.75rem;
color: var(--text-secondary);
}
/* Tables */
.data-table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
border-radius: 6px;
overflow: hidden;
margin: 1rem 0;
}
.data-table th {
background: var(--surface-2);
padding: 1rem;
text-align: left;
font-weight: 600;
color: var(--text);
border-bottom: 1px solid var(--border);
}
.data-table td {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border);
}
.data-table tr:hover {
background: var(--surface-2);
}
/* Code Blocks */
.code-block {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
overflow-x: auto;
margin: 1rem 0;
position: relative;
font-family: 'Monaco', 'Menlo', monospace;
font-size: 0.875rem;
}
.code-block pre {
margin: 0;
color: var(--text);
}
.copy-btn {
position: absolute;
top: 0.75rem;
right: 0.75rem;
padding: 0.25rem 0.75rem;
background: var(--border);
border: none;
border-radius: 4px;
color: var(--text-secondary);
cursor: pointer;
font-size: 0.75rem;
transition: all 0.2s;
}
.copy-btn:hover {
background: var(--primary);
color: white;
}
/* Charts */
.chart-container {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
margin: 1rem 0;
}
.chart-container canvas {
max-height: 400px;
}
/* Responsive */
@media (max-width: 768px) {
.sidebar {
position: fixed;
left: 0;
top: 0;
height: 100%;
z-index: 500;
}
.sidebar.collapsed {
width: 0;
transform: none;
}
.sidebar-toggle-btn {
display: flex;
}
.mobile-only {
display: inline-flex;
}
.message-content {
max-width: 90%;
}
.chat-input-container {
padding: 1rem;
}
.btn {
width: auto;
}
}
@media (max-width: 640px) {
.connection-wrapper {
grid-template-columns: 1fr;
gap: 2rem;
}
.chat-header {
padding: 1rem;
}
.chat-messages {
padding: 1rem;
}
.welcome-message {
padding: 1rem;
}
.example-chips {
gap: 0.5rem;
}
.example-chip {
font-size: 0.75rem;
padding: 0.375rem 0.75rem;
}
}