DiffWeave / studio /src /index.css
shak3008's picture
feat: turn every entity and page into separately openable deep links with browser history and add light/dark mode settings toggle
84fe53c
Raw History Blame Contribute Delete
13.4 kB
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
color-scheme: dark;
}
body {
margin: 0;
background-color: #080B11;
color: #E2E8F0;
overflow-x: hidden;
}
code, pre, .font-mono {
font-family: 'JetBrains Mono', monospace;
}
/* Custom Scrollbars */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #0D131F;
}
::-webkit-scrollbar-thumb {
background: #253347;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #3B4D66;
}
/* Subtle Glow Effects */
.glow-emerald {
box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.25);
}
.glow-crimson {
box-shadow: 0 0 20px -3px rgba(239, 68, 68, 0.25);
}
.glow-amber {
box-shadow: 0 0 20px -3px rgba(245, 158, 11, 0.25);
}
.glow-cyan {
box-shadow: 0 0 20px -3px rgba(14, 165, 233, 0.25);
}
/* Glassmorphic Cards */
.glass-card {
background: rgba(15, 22, 36, 0.7);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-card:hover {
border-color: rgba(255, 255, 255, 0.14);
}
/* Pulsing Status Dot */
@keyframes pulse-dot {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.15); }
}
.pulse-glow {
animation: pulse-dot 2s infinite ease-in-out;
}
/* ============================================================
DiffWeave Auth Pages (mirrors DocWeave AuthLayout.css)
============================================================ */
.dw-auth {
min-height: 100vh;
display: grid;
grid-template-columns: minmax(0, 420px) 1fr;
background: #0D1117;
font-family: 'Inter', system-ui, sans-serif;
color: #E2E8F0;
}
.dw-auth__panel {
display: flex;
flex-direction: column;
justify-content: center;
padding: 40px 36px;
border-right: 1px solid #21262D;
}
.dw-auth__brand {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 28px;
}
.dw-auth__wordmark {
font-size: 20px;
font-weight: 700;
letter-spacing: -0.02em;
color: #F8FAFC;
}
.dw-auth__by {
font-size: 11px;
color: #4B5563;
margin-left: 2px;
margin-top: 2px;
}
.dw-auth__card {
animation: dw-fade-in 0.25s ease;
}
@keyframes dw-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.dw-auth__eyebrow {
display: inline-block;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #10B981;
margin-bottom: 12px;
}
.dw-auth__title {
font-size: 24px;
font-weight: 700;
color: #F8FAFC;
margin: 0 0 8px;
letter-spacing: -0.02em;
}
.dw-auth__subtitle {
color: #6B7280;
font-size: 14px;
margin: 0 0 20px;
line-height: 1.6;
}
.dw-auth__body {
display: flex;
flex-direction: column;
gap: 16px;
max-width: 360px;
}
.dw-auth__footer {
margin-top: 32px;
font-size: 13px;
color: #6B7280;
}
.dw-auth__footer a {
color: #10B981;
text-decoration: none;
}
.dw-auth__footer a:hover {
text-decoration: underline;
}
/* ── Right panel ─────────────────────────────────────────── */
.dw-auth__aside {
position: relative;
background: linear-gradient(145deg, #0d1117 0%, #0a1628 50%, #0d1117 100%);
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
padding: 60px;
}
.dw-auth__aside-grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(16,185,129,0.12) 1px, transparent 1px),
linear-gradient(90deg, rgba(16,185,129,0.12) 1px, transparent 1px);
background-size: 48px 48px;
mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 70%);
}
.dw-auth__aside::before {
content: "";
position: absolute;
inset: 0;
background:
radial-gradient(circle at 25% 25%, rgba(16,185,129,0.2) 0%, transparent 40%),
radial-gradient(circle at 75% 65%, rgba(110, 86, 255, 0.15) 0%, transparent 35%),
radial-gradient(circle at 50% 90%, rgba(16,185,129,0.1) 0%, transparent 30%);
z-index: 0;
}
.dw-auth__aside-copy {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.dw-auth__tagline-line {
font-size: 2rem;
font-weight: 700;
color: #F8FAFC;
letter-spacing: -0.02em;
line-height: 1.2;
opacity: 0.8;
}
.dw-auth__tagline-line--accent {
color: #10B981;
opacity: 1;
}
@media (max-width: 900px) {
.dw-auth { grid-template-columns: 1fr; }
.dw-auth__aside { display: none; }
.dw-auth__panel { padding: 40px 24px; }
}
/* ── Form shared styles ─────────────────────────────────── */
.dw-auth-form {
display: flex;
flex-direction: column;
gap: 16px;
max-width: 360px;
}
.dw-auth-form {
display: flex;
flex-direction: column;
gap: 13px;
max-width: 330px;
width: 100%;
}
.dw-field {
display: flex;
flex-direction: column;
gap: 4px;
}
.dw-label {
font-size: 12px;
font-weight: 500;
color: #CBD5E1;
}
.dw-input {
width: 100%;
padding: 8px 11px;
background: #161B22;
border: 1px solid #30363D;
border-radius: 6px;
color: #E2E8F0;
font-size: 13px;
outline: none;
transition: border-color 0.15s, box-shadow 0.15s;
box-sizing: border-box;
}
.dw-input:focus {
border-color: #10B981;
box-shadow: 0 0 0 2px rgba(16,185,129,0.15);
}
.dw-input--otp {
font-size: 22px;
text-align: center;
letter-spacing: 0.3em;
font-family: monospace;
}
.dw-field__error {
font-size: 11px;
color: #F87171;
}
.dw-auth-form__show-password {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #6B7280;
cursor: pointer;
user-select: none;
margin-top: 4px;
}
.dw-auth-form__strength {
display: flex;
align-items: center;
gap: 8px;
margin-top: 4px;
}
.dw-auth-form__strength-bar {
flex: 1;
height: 4px;
border-radius: 2px;
background: #21262D;
overflow: hidden;
}
.dw-auth-form__strength-fill {
height: 100%;
border-radius: 2px;
transition: width 0.25s, background 0.25s;
}
.dw-auth-form__options {
display: flex;
align-items: center;
justify-content: flex-end;
}
.dw-auth-form__link {
font-size: 13px;
color: #10B981;
text-decoration: none;
}
.dw-auth-form__link:hover {
text-decoration: underline;
}
.dw-auth-form__error {
font-size: 13px;
color: #F87171;
padding: 10px 12px;
background: rgba(239,68,68,0.1);
border: 1px solid rgba(239,68,68,0.2);
border-radius: 8px;
}
.dw-auth-form__success {
font-size: 13px;
color: #6EE7B7;
padding: 10px 12px;
background: rgba(16,185,129,0.1);
border: 1px solid rgba(16,185,129,0.2);
border-radius: 8px;
}
.dw-auth-form__resend {
background: none;
border: none;
color: #10B981;
font-size: 13px;
cursor: pointer;
text-align: center;
padding: 4px 0;
}
.dw-auth-form__resend:hover { text-decoration: underline; }
.dw-auth-form__footer-text {
font-size: 13px;
color: #6B7280;
text-align: center;
}
.dw-auth-form__footer-text a {
color: #10B981;
font-weight: 500;
text-decoration: none;
}
.dw-auth-form__footer-text a:hover { text-decoration: underline; }
.dw-auth-divider {
display: flex;
align-items: center;
margin: 4px 0;
}
.dw-auth-divider::before,
.dw-auth-divider::after {
content: "";
flex: 1;
border-bottom: 1px solid #21262D;
}
.dw-auth-divider span {
padding: 0 10px;
font-size: 11px;
color: #4B5563;
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 600;
}
.dw-btn {
width: 100%;
padding: 10px 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
border: none;
outline: none;
}
.dw-btn--primary {
background: #10B981;
color: white;
}
.dw-btn--primary:hover:not(:disabled) {
background: #059669;
box-shadow: 0 4px 16px rgba(16,185,129,0.3);
transform: translateY(-1px);
}
.dw-btn--primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.dw-auth-demo-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
background: rgba(16,185,129,0.07);
border: 1px solid rgba(16,185,129,0.25);
color: #10B981;
font-weight: 600;
font-size: 13px;
padding: 10px 16px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
font-family: inherit;
}
.dw-auth-demo-btn:hover:not(:disabled) {
background: rgba(16,185,129,0.15);
border-color: rgba(16,185,129,0.5);
color: #fff;
box-shadow: 0 0 16px rgba(16,185,129,0.2);
transform: translateY(-1px);
}
.dw-auth-demo-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.dw-auth-form__options {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 2px;
}
.dw-auth-form__remember {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #94A3B8;
cursor: pointer;
user-select: none;
}
.dw-auth-form__remember input[type="checkbox"],
.dw-auth-form__show-password input[type="checkbox"] {
width: 13px;
height: 13px;
cursor: pointer;
accent-color: #10B981;
}
.dw-auth-form__link {
font-size: 12px;
color: #10B981;
text-decoration: none;
}
.dw-auth-form__link:hover {
text-decoration: underline;
}
/* Auth Tabs (Email vs API Key) */
.dw-auth-tabs {
display: flex;
background: #161B22;
border: 1px solid #30363D;
border-radius: 8px;
padding: 4px;
gap: 4px;
margin-bottom: 20px;
}
.dw-auth-tab {
flex: 1;
padding: 8px 12px;
border: none;
background: transparent;
color: #8B949E;
font-size: 12px;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
transition: all 0.15s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.dw-auth-tab:hover {
color: #F0F6FC;
}
.dw-auth-tab--active {
background: #21262D;
color: #10B981;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* ========================================================================= */
/* LIGHT THEME SYSTEM (Triggered when html element has class "light") */
/* ========================================================================= */
html.light {
color-scheme: light;
}
html.light body {
background-color: #F8FAFC !important;
color: #0F172A !important;
}
/* Base dark container overrides */
html.light .bg-\[\#080B11\],
html.light .bg-\[\#0A0D14\],
html.light .bg-\[\#0D1117\],
html.light .bg-\[\#0D121F\],
html.light .bg-\[\#010409\] {
background-color: #F8FAFC !important;
}
/* Card and surface containers */
html.light .bg-\[\#161B22\],
html.light .bg-\[\#141B2D\],
html.light .bg-\[\#121828\] {
background-color: #FFFFFF !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
/* Sub-card & hovered pill backgrounds */
html.light .bg-\[\#21262D\],
html.light .bg-\[\#21262D\]\/70,
html.light .hover\:bg-\[\#21262D\]:hover,
html.light .hover\:bg-\[\#161B22\]:hover {
background-color: #F1F5F9 !important;
}
/* Border overrides */
html.light .border-\[\#30363D\],
html.light .border-\[\#21262D\],
html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-900 {
border-color: #E2E8F0 !important;
}
/* Primary and high-contrast text */
html.light .text-white,
html.light .text-slate-100,
html.light .text-slate-200 {
color: #0F172A !important;
}
/* Secondary and muted text */
html.light .text-slate-300,
html.light .text-slate-400 {
color: #475569 !important;
}
html.light .text-slate-500 {
color: #64748B !important;
}
/* Overlay & modal backdrop */
html.light .bg-black\/80,
html.light .bg-black\/70 {
background-color: rgba(15, 23, 42, 0.55) !important;
}
html.light .bg-black\/40,
html.light .bg-black\/30,
html.light .bg-black\/20 {
background-color: rgba(0, 0, 0, 0.04) !important;
}
/* Light mode Auth form styling */
html.light .dw-auth {
background: #F8FAFC;
}
html.light .dw-auth__card {
background: #FFFFFF;
border-color: #E2E8F0;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
html.light .dw-input {
background-color: #FFFFFF;
border-color: #CBD5E1;
color: #0F172A;
}
html.light .dw-input:focus {
border-color: #10B981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
html.light .dw-auth-tabs {
background: #F1F5F9;
border-color: #E2E8F0;
}
html.light .dw-auth-tab--active {
background: #FFFFFF;
color: #059669;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* Extra container overrides */
html.light .bg-\[\#0C101A\],
html.light .bg-\[\#090D16\],
html.light .bg-\[\#0C1518\],
html.light .bg-\[\#0E1422\],
html.light .bg-\[\#101524\],
html.light .bg-\[\#101726\],
html.light .bg-\[\#13111C\],
html.light .bg-\[\#141824\] {
background-color: #FFFFFF !important;
}
/* Extra card & surface containers */
html.light .bg-\[\#161F32\],
html.light .bg-\[\#1E2740\] {
background-color: #FFFFFF !important;
}
/* Light mode form inputs */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.light select,
html.light textarea {
background-color: #FFFFFF !important;
color: #0F172A !important;
border-color: #CBD5E1 !important;
}
/* Badges & slate pills */
html.light .bg-slate-800 {
background-color: #E2E8F0 !important;
color: #334155 !important;
}
html.light .bg-slate-900 {
background-color: #F1F5F9 !important;
color: #1E293B !important;
}