Files
DocNest/frontend/src/index.css
M1ngdaXie 10fd9cdecb dark mode
2026-02-08 16:23:06 -08:00

836 lines
19 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@500;600;700&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 220 33% 98%;
--foreground: 222 47% 11%;
--card: 0 0% 100%;
--card-foreground: 222 47% 11%;
--popover: 0 0% 100%;
--popover-foreground: 222 47% 11%;
--primary: 214 89% 52%;
--primary-foreground: 0 0% 100%;
--secondary: 173 80% 40%;
--secondary-foreground: 0 0% 100%;
--muted: 220 16% 96%;
--muted-foreground: 215 16% 47%;
--accent: 188 92% 42%;
--accent-foreground: 0 0% 100%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 100%;
--border: 215 20% 90%;
--input: 215 20% 90%;
--ring: 214 89% 52%;
--radius: 0.75rem;
}
.dark {
--background: 215 26% 7%;
--foreground: 0 0% 98%;
--card: 215 21% 11%;
--card-foreground: 0 0% 98%;
--popover: 215 21% 11%;
--popover-foreground: 0 0% 98%;
--primary: 213 93% 60%;
--primary-foreground: 0 0% 100%;
--secondary: 173 70% 42%;
--secondary-foreground: 0 0% 100%;
--muted: 215 15% 15%;
--muted-foreground: 215 10% 58%;
--accent: 197 100% 68%;
--accent-foreground: 215 26% 7%;
--destructive: 0 70% 52%;
--destructive-foreground: 0 0% 100%;
--border: 215 12% 21%;
--input: 215 12% 21%;
--ring: 213 93% 60%;
}
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
/* Modern SaaS Design Tokens */
--surface: 0 0% 100%;
--surface-muted: 220 16% 96%;
--text-primary: 222 47% 11%;
--text-secondary: 215 25% 27%;
--text-muted: 215 16% 47%;
--brand: 214 89% 52%;
--brand-dark: 221 83% 45%;
--brand-teal: 173 80% 40%;
--brand-teal-dark: 173 80% 32%;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
--shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
--shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
--focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.25);
--gradient-hero: linear-gradient(120deg, #eef6ff 0%, #f5f7fb 55%, #ffffff 100%);
--gradient-accent: linear-gradient(120deg, #2563eb 0%, #14b8a6 100%);
/* Compatibility aliases (legacy pixel tokens mapped to modern palette) */
--pixel-purple-deep: #1E40AF;
--pixel-purple-bright: #2563EB;
--pixel-pink-vibrant: #38BDF8;
--pixel-cyan-bright: #14B8A6;
--pixel-orange-warm: #F59E0B;
--pixel-yellow-gold: #FBBF24;
--pixel-green-lime: #22C55E;
--pixel-green-forest: #16A34A;
--pixel-bg-dark: #0F172A;
--pixel-bg-medium: #1E293B;
--pixel-bg-light: #F5F7FB;
--pixel-panel: #FFFFFF;
--pixel-white: #FFFFFF;
--pixel-shadow-dark: rgba(15, 23, 42, 0.2);
--pixel-outline: #E2E8F0;
--pixel-text-primary: #0F172A;
--pixel-text-secondary: #334155;
--pixel-text-muted: #64748B;
}
.dark {
--surface: 215 21% 11%;
--surface-muted: 215 15% 15%;
--text-primary: 0 0% 98%;
--text-secondary: 215 15% 82%;
--text-muted: 215 10% 70%;
--brand: 213 93% 60%;
--brand-dark: 213 90% 52%;
--brand-teal: 173 70% 42%;
--brand-teal-dark: 173 68% 34%;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
--shadow-md: 0 12px 30px rgba(0, 0, 0, 0.55);
--shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
--focus-ring: 0 0 0 3px rgba(88, 166, 255, 0.35);
--gradient-hero: linear-gradient(120deg, #0d1117 0%, #111827 55%, #161b22 100%);
--gradient-accent: linear-gradient(120deg, #2f81f7 0%, #14b8a6 100%);
--pixel-purple-deep: #0b1f4b;
--pixel-purple-bright: #2f81f7;
--pixel-pink-vibrant: #58a6ff;
--pixel-cyan-bright: #14b8a6;
--pixel-orange-warm: #f59e0b;
--pixel-yellow-gold: #fbbf24;
--pixel-green-lime: #22c55e;
--pixel-green-forest: #16a34a;
--pixel-bg-dark: #0d1117;
--pixel-bg-medium: #161b22;
--pixel-bg-light: #1f2937;
--pixel-panel: #0f172a;
--pixel-white: #e5e7eb;
--pixel-shadow-dark: rgba(0, 0, 0, 0.5);
--pixel-outline: #30363d;
--pixel-text-primary: #e5e7eb;
--pixel-text-secondary: #c9d1d9;
--pixel-text-muted: #8b949e;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: var(--gradient-hero);
color: hsl(var(--foreground));
}
h1, h2, h3, h4, h5 {
font-family: 'Manrope', 'Inter', sans-serif;
}
#root {
min-height: 100vh;
}
/* Pixel Art Utility Classes */
.pixel-border {
border: 1px solid hsl(var(--border));
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
}
.pixel-card {
border: 1px solid hsl(var(--border));
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
background: hsl(var(--surface));
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pixel-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.pixel-button {
border: 1px solid hsl(var(--border));
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
transition: transform 0.08s ease, box-shadow 0.08s ease;
cursor: pointer;
}
.pixel-button:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.pixel-button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
/* Focus states for accessibility */
button:focus-visible,
input:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Pixel Icon Styles */
.pixel-icon {
display: inline-block;
vertical-align: middle;
}
.pixel-icon-animated {
animation: pixel-spin 1s steps(8) infinite;
}
/* Keyframe Animations */
@keyframes pixel-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes pixel-float {
0%, 100% { transform: translateY(0) rotate(0deg); }
25% { transform: translateY(-12px) rotate(2deg); }
50% { transform: translateY(-8px) rotate(0deg); }
75% { transform: translateY(-12px) rotate(-2deg); }
}
@keyframes pixel-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-16px); }
}
@keyframes pixel-sparkle {
0% { transform: scale(0) rotate(0deg); opacity: 1; }
50% { transform: scale(1.5) rotate(180deg); opacity: 0.6; }
100% { transform: scale(0) rotate(360deg); opacity: 0; }
}
@keyframes pixel-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.7; transform: scale(1.1); }
}
/* Home Page */
.home-page {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.home-page h1 {
margin-bottom: 2rem;
}
.create-buttons {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
}
.create-buttons button {
padding: 0.75rem 1.5rem;
background: hsl(var(--primary));
color: hsl(var(--primary-foreground));
border: 1px solid hsl(var(--border));
border-radius: var(--radius-md);
cursor: pointer;
font-size: 1rem;
font-weight: 600;
box-shadow: var(--shadow-sm);
transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
display: inline-flex;
align-items: center;
justify-content: center;
}
.create-buttons button:hover {
background: hsl(var(--primary) / 0.9);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.create-buttons button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
.create-buttons button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
.document-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.document-card {
background: hsl(var(--surface));
padding: 1.5rem;
border-radius: var(--radius-lg);
border: 1px solid hsl(var(--border));
box-shadow: var(--shadow-md);
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.document-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.doc-info h3 {
margin-bottom: 0.5rem;
}
.doc-type {
color: hsl(var(--text-secondary));
text-transform: capitalize;
margin-bottom: 0.5rem;
}
.doc-date {
color: hsl(var(--text-muted));
font-size: 0.875rem;
}
.doc-actions {
display: flex;
gap: 0.5rem;
margin-top: 1rem;
}
.doc-actions button {
padding: 0.5rem 1rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--surface));
border-radius: var(--radius-sm);
cursor: pointer;
min-width: 44px;
min-height: 44px;
box-shadow: var(--shadow-sm);
transition: transform 0.1s ease, box-shadow 0.1s ease;
display: inline-flex;
align-items: center;
justify-content: center;
}
.doc-actions button:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.doc-actions button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
.doc-actions button:first-child {
background: hsl(var(--secondary));
color: hsl(var(--secondary-foreground));
border-color: hsl(var(--border));
}
.doc-actions button:first-child:hover {
background: hsl(var(--primary));
}
/* Editor Page */
.editor-page, .kanban-page {
display: flex;
flex-direction: column;
height: 100vh;
background: hsl(var(--background));
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
background: hsl(var(--surface));
border-bottom: 1px solid hsl(var(--border));
box-shadow: var(--shadow-sm);
}
.page-header button {
padding: 0.5rem 1rem;
background: hsl(var(--surface));
border: 1px solid hsl(var(--border));
border-radius: var(--radius-sm);
cursor: pointer;
min-width: 44px;
min-height: 44px;
box-shadow: var(--shadow-sm);
transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.page-header button:hover {
background: hsl(var(--surface-muted));
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.page-header button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
.sync-status {
display: inline-flex;
align-items: center;
gap: 8px;
color: hsl(var(--text-secondary));
font-size: 0.875rem;
}
.sync-dot {
width: 10px;
height: 10px;
border-radius: 3px;
background: hsl(var(--surface-muted));
border: 1px solid hsl(var(--border));
}
.sync-dot.synced {
background: hsl(var(--secondary));
border-color: hsl(var(--secondary));
box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}
.sync-dot.syncing {
background: hsl(var(--primary));
border-color: hsl(var(--primary));
animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { transform: scale(1); opacity: 0.7; }
50% { transform: scale(1.2); opacity: 1; }
}
.view-only-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 999px;
background: hsl(var(--surface));
color: hsl(var(--text-secondary));
font-size: 0.85rem;
font-weight: 600;
border: 1px solid hsl(var(--border));
box-shadow: var(--shadow-sm);
line-height: 1;
}
.view-only-icon {
width: 14px;
height: 14px;
color: hsl(var(--text-muted));
}
.shared-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: hsl(var(--text-secondary));
background: hsl(var(--surface-muted));
border: 1px solid hsl(var(--border));
border-radius: 6px;
box-shadow: 2px 2px 0 rgba(15, 23, 42, 0.08);
}
.page-content {
display: flex;
flex-direction: column; /* Mobile: stack vertically */
flex: 1;
overflow: hidden;
}
@media (min-width: 768px) {
.page-content {
flex-direction: row; /* Desktop: horizontal layout */
}
}
.main-area {
flex: 1;
overflow: auto;
padding: 0.5rem; /* Mobile: minimal padding */
}
@media (min-width: 640px) {
.main-area {
padding: 1rem;
}
}
@media (min-width: 768px) {
.main-area {
padding: 2rem; /* Desktop: original padding */
}
}
.sidebar {
width: 100%; /* Mobile: full width */
background: hsl(var(--surface));
border-top: 1px solid hsl(var(--border)); /* Mobile: top border */
border-left: none;
padding: 1rem;
max-height: 200px; /* Mobile: limit height */
overflow-y: auto;
}
@media (min-width: 768px) {
.sidebar {
width: 250px; /* Desktop: fixed width */
max-height: none;
border-top: none;
border-left: 1px solid hsl(var(--border));
}
}
/* Editor */
.editor-container {
background: hsl(var(--surface));
border-radius: var(--radius-lg);
border: 1px solid hsl(var(--border));
box-shadow: var(--shadow-md);
overflow: hidden;
}
.toolbar {
display: flex;
gap: 0.5rem;
padding: 0.75rem;
background: hsl(var(--surface-muted));
border-bottom: 1px solid hsl(var(--border));
flex-wrap: wrap;
}
.toolbar button {
padding: 0.5rem 0.75rem;
background: hsl(var(--surface));
border: 1px solid hsl(var(--border));
border-radius: var(--radius-sm);
cursor: pointer;
min-width: 44px;
min-height: 44px;
box-shadow: var(--shadow-sm);
transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.toolbar button:hover {
background: hsl(var(--surface-muted));
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.toolbar button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
.toolbar button.active {
background: hsl(var(--secondary));
color: hsl(var(--secondary-foreground));
border-color: hsl(var(--border));
box-shadow: var(--shadow-sm);
}
.editor-content {
padding: 0.5rem; /* Mobile: minimal padding */
min-height: 500px;
}
@media (min-width: 640px) {
.editor-content {
padding: 1rem;
}
}
@media (min-width: 768px) {
.editor-content {
padding: 2rem; /* Desktop: original padding */
}
}
.ProseMirror {
outline: none;
}
.ProseMirror h1 {
font-size: 2rem;
margin: 1rem 0;
}
.ProseMirror h2 {
font-size: 1.5rem;
margin: 1rem 0;
}
.ProseMirror p {
margin: 0.5rem 0;
}
.ProseMirror ul, .ProseMirror ol {
margin-left: 1.5rem;
}
/* Collaborative Cursors */
.collaboration-cursor__caret {
position: absolute;
border-left: 3px solid;
border-right: none;
margin-left: -1px;
margin-right: -1px;
pointer-events: none;
word-break: normal;
box-shadow: 1px 0 0 currentColor;
}
.collaboration-cursor__label {
position: absolute;
top: -1.4em;
left: -1px;
font-size: 12px;
font-style: normal;
font-weight: 600;
line-height: normal;
user-select: none;
color: #fff;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
white-space: nowrap;
box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}
/* Kanban Board */
.kanban-board {
display: flex;
flex-direction: column; /* Mobile: stack vertically */
gap: 1rem;
overflow-x: visible;
padding-bottom: 1rem;
}
@media (min-width: 640px) {
.kanban-board {
flex-direction: row; /* Tablet+: horizontal scrolling */
overflow-x: auto;
}
}
.kanban-column {
background: hsl(var(--surface));
border-radius: var(--radius-lg);
border: 1px solid hsl(var(--border));
padding: 1rem;
width: 100%; /* Mobile: full width */
min-width: unset;
max-width: unset;
box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) {
.kanban-column {
width: auto;
min-width: 280px; /* Tablet: smaller fixed width */
max-width: 280px;
}
}
@media (min-width: 1024px) {
.kanban-column {
min-width: 300px; /* Desktop: original width */
max-width: 300px;
}
}
.column-title {
margin-bottom: 1rem;
font-size: 1.125rem;
}
.column-content {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.kanban-card {
background: hsl(var(--surface));
padding: 1rem;
border-radius: var(--radius-md);
border: 1px solid hsl(var(--border));
box-shadow: var(--shadow-sm);
cursor: pointer;
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.kanban-card:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.kanban-card h4 {
margin-bottom: 0.5rem;
}
.kanban-card p {
color: hsl(var(--text-secondary));
font-size: 0.875rem;
}
.add-task-btn {
padding: 0.75rem;
background: hsl(var(--surface));
border: 1px dashed hsl(var(--border));
border-radius: var(--radius-md);
cursor: pointer;
color: hsl(var(--text-secondary));
}
.add-task-btn:hover {
border-color: hsl(var(--primary));
color: hsl(var(--text-primary));
background: hsl(var(--surface-muted));
}
.add-task-form input {
width: 100%;
padding: 0.75rem;
border: 1px solid hsl(var(--border));
border-radius: var(--radius-sm);
margin-bottom: 0.5rem;
background: hsl(var(--surface));
}
.add-task-form input:focus {
outline: none;
border-color: hsl(var(--primary));
box-shadow: var(--focus-ring);
}
.form-actions {
display: flex;
gap: 0.5rem;
}
.form-actions button {
padding: 0.5rem 1rem;
border: 1px solid hsl(var(--border));
border-radius: var(--radius-sm);
cursor: pointer;
background: hsl(var(--surface));
box-shadow: var(--shadow-sm);
transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.form-actions button:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
.form-actions button:active {
transform: translateY(0);
box-shadow: var(--shadow-sm);
}
.form-actions button:first-child {
background: hsl(var(--secondary));
color: hsl(var(--secondary-foreground));
border-color: hsl(var(--border));
}
/* User List */
.user-list h4 {
margin-bottom: 1rem;
}
.users {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.user {
display: flex;
align-items: center;
gap: 0.5rem;
}
.user-color {
width: 12px;
height: 12px;
border-radius: 999px;
border: 1px solid hsl(var(--border));
}
.user-name {
font-size: 0.875rem;
}
.loading {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 1.25rem;
color: hsl(var(--text-secondary));
}