794 lines
15 KiB
CSS
794 lines
15 KiB
CSS
/* CSS Reset & Base */
|
|
*, *::before, *::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
:root {
|
|
--primary: #107c41;
|
|
--primary-hover: #0b5c30;
|
|
--primary-light: #e8f5e9;
|
|
--secondary: #4b5563;
|
|
--secondary-hover: #374151;
|
|
--bg-main: #f8fafc;
|
|
--bg-surface: #ffffff;
|
|
--border-color: #e2e8f0;
|
|
--border-grid: #d1d5db;
|
|
--text-main: #1e293b;
|
|
--text-muted: #64748b;
|
|
--text-light: #94a3b8;
|
|
--grid-header-bg: #f3f4f6;
|
|
--grid-header-text: #4b5563;
|
|
--danger: #ef4444;
|
|
--danger-light: #fef2f2;
|
|
--success: #10b981;
|
|
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
background-color: var(--bg-main);
|
|
color: var(--text-main);
|
|
line-height: 1.5;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Header */
|
|
.app-header {
|
|
background: var(--bg-surface);
|
|
border-bottom: 1px solid var(--border-color);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.header-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 0.75rem 1.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.brand-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.brand-icon {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
width: 38px;
|
|
height: 38px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 2px 4px rgba(16, 124, 65, 0.2);
|
|
}
|
|
|
|
.brand-text h1 {
|
|
font-size: 1.15rem;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.active-file-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
background: var(--primary-light);
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
font-size: 0.85rem;
|
|
padding: 0.35rem 0.85rem;
|
|
border-radius: 9999px;
|
|
border: 1px solid rgba(16, 124, 65, 0.2);
|
|
max-width: 350px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 6px;
|
|
border: 1px solid transparent;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease-in-out;
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 0.35rem 0.75rem;
|
|
font-size: 0.8125rem;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--primary-hover);
|
|
box-shadow: 0 2px 4px rgba(16, 124, 65, 0.25);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--bg-surface);
|
|
color: var(--text-main);
|
|
border-color: var(--border-color);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #f1f5f9;
|
|
border-color: #cbd5e1;
|
|
}
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
color: var(--secondary);
|
|
border-color: var(--border-color);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
background: #f1f5f9;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
/* Notification Bar */
|
|
.notification-bar {
|
|
background: var(--danger-light);
|
|
color: var(--danger);
|
|
border-bottom: 1px solid #fecaca;
|
|
padding: 0.75rem 1.5rem;
|
|
animation: slideDown 0.2s ease-out;
|
|
}
|
|
|
|
.notification-bar.success {
|
|
background: #ecfdf5;
|
|
color: #065f46;
|
|
border-bottom-color: #a7f3d0;
|
|
}
|
|
|
|
.notification-content {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.notification-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.25rem;
|
|
line-height: 1;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
padding: 0 0.25rem;
|
|
}
|
|
|
|
/* Main Content */
|
|
.main-content {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.view-panel {
|
|
display: none;
|
|
flex: 1;
|
|
}
|
|
|
|
.view-panel.active {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* =========================================
|
|
DASHBOARD VIEW
|
|
========================================= */
|
|
.dashboard-container {
|
|
max-width: 1200px;
|
|
width: 100%;
|
|
margin: 0 auto;
|
|
padding: 2rem 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.card {
|
|
background: var(--bg-surface);
|
|
border-radius: 12px;
|
|
border: 1px solid var(--border-color);
|
|
box-shadow: var(--shadow-sm);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Upload Card & Dropzone */
|
|
.upload-card {
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.upload-dropzone {
|
|
position: relative;
|
|
padding: 2.5rem 1.5rem;
|
|
border: 2px dashed #cbd5e1;
|
|
border-radius: 12px;
|
|
margin: 0.5rem;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
background: #fafbfc;
|
|
}
|
|
|
|
.upload-dropzone:hover, .upload-dropzone.drag-over {
|
|
border-color: var(--primary);
|
|
background: #f0fdf4;
|
|
}
|
|
|
|
.file-input-hidden {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.upload-icon-circle {
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 50%;
|
|
background: var(--primary-light);
|
|
color: var(--primary);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.dropzone-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.dropzone-text {
|
|
font-size: 0.9375rem;
|
|
color: var(--text-muted);
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.browse-link {
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.file-types-hint {
|
|
display: inline-block;
|
|
font-size: 0.8125rem;
|
|
color: var(--text-light);
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-color);
|
|
padding: 0.25rem 0.65rem;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.upload-progress-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.75rem;
|
|
border-radius: 10px;
|
|
font-weight: 500;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
/* Files Section */
|
|
.files-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.section-subtitle {
|
|
font-size: 0.875rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.badge {
|
|
background: #f1f5f9;
|
|
color: var(--text-muted);
|
|
font-size: 0.8125rem;
|
|
font-weight: 600;
|
|
padding: 0.25rem 0.65rem;
|
|
border-radius: 9999px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.empty-state {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 3rem 1.5rem;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-icon {
|
|
margin-bottom: 1rem;
|
|
color: var(--text-light);
|
|
}
|
|
|
|
.empty-state h3 {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.files-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* File Card */
|
|
.file-card {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 10px;
|
|
padding: 1.25rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease-in-out;
|
|
box-shadow: var(--shadow-sm);
|
|
position: relative;
|
|
}
|
|
|
|
.file-card:hover {
|
|
transform: translateY(-2px);
|
|
border-color: #93c5fd;
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.file-card-main {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.file-badge-icon {
|
|
background: #f0fdf4;
|
|
color: var(--primary);
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
border: 1px solid #bbf7d0;
|
|
}
|
|
|
|
.file-details {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.file-card-title {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
word-break: break-all;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.file-meta-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
font-size: 0.775rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.file-meta-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.file-card-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
border-top: 1px solid #f1f5f9;
|
|
padding-top: 0.75rem;
|
|
}
|
|
|
|
.file-card-actions .btn {
|
|
flex: 1;
|
|
}
|
|
|
|
/* =========================================
|
|
SPREADSHEET VIEWER VIEW
|
|
========================================= */
|
|
.spreadsheet-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: calc(100vh - 61px);
|
|
background: var(--bg-surface);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.spreadsheet-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.5rem 1rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
background: #ffffff;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.toolbar-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.toolbar-title {
|
|
font-size: 1.05rem;
|
|
font-weight: 600;
|
|
color: var(--text-main);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.sheet-stats-badge {
|
|
font-size: 0.75rem;
|
|
background: #f1f5f9;
|
|
color: var(--text-muted);
|
|
padding: 0.2rem 0.5rem;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* Worksheet Tabs (Google Sheets style) */
|
|
.sheet-tabs-container {
|
|
display: flex;
|
|
align-items: center;
|
|
background: #f3f4f6;
|
|
border-bottom: 1px solid var(--border-grid);
|
|
padding: 0 0.5rem;
|
|
gap: 0.5rem;
|
|
flex-shrink: 0;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.sheet-tabs-label {
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
padding-left: 0.5rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.sheet-tabs-list {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
overflow-x: auto;
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
.sheet-tab {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.35rem;
|
|
padding: 0.45rem 1rem;
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
color: var(--text-muted);
|
|
background: #e5e7eb;
|
|
border: 1px solid var(--border-grid);
|
|
border-bottom: none;
|
|
border-top-left-radius: 6px;
|
|
border-top-right-radius: 6px;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
transition: all 0.1s ease;
|
|
user-select: none;
|
|
}
|
|
|
|
.sheet-tab:hover {
|
|
background: #f9fafb;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.sheet-tab.active {
|
|
background: #ffffff;
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
border-top: 3px solid var(--primary);
|
|
border-bottom: 1px solid #ffffff;
|
|
margin-bottom: -1px;
|
|
}
|
|
|
|
/* Grid Viewport */
|
|
.grid-viewport {
|
|
flex: 1;
|
|
overflow: auto;
|
|
position: relative;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.sheet-table {
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
width: max-content;
|
|
min-width: 100%;
|
|
font-size: 0.8125rem;
|
|
color: var(--text-main);
|
|
table-layout: fixed;
|
|
}
|
|
|
|
/* Google Sheets Header Rows */
|
|
.sheet-table thead tr th {
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--grid-header-bg);
|
|
color: var(--grid-header-text);
|
|
font-weight: 600;
|
|
text-align: center;
|
|
padding: 0.35rem 0.5rem;
|
|
border-right: 1px solid var(--border-grid);
|
|
border-bottom: 1px solid var(--border-grid);
|
|
z-index: 20;
|
|
user-select: none;
|
|
min-width: 100px;
|
|
max-width: 250px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Corner Cell */
|
|
.sheet-table thead tr th.corner-cell {
|
|
position: sticky;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 30;
|
|
background: #e5e7eb;
|
|
width: 48px;
|
|
min-width: 48px;
|
|
max-width: 48px;
|
|
border-right: 1px solid var(--border-grid);
|
|
border-bottom: 1px solid var(--border-grid);
|
|
}
|
|
|
|
/* Row Numbers Column */
|
|
.sheet-table tbody tr th.row-header {
|
|
position: sticky;
|
|
left: 0;
|
|
z-index: 10;
|
|
background: var(--grid-header-bg);
|
|
color: var(--grid-header-text);
|
|
font-weight: 500;
|
|
text-align: center;
|
|
padding: 0.35rem 0.5rem;
|
|
width: 48px;
|
|
min-width: 48px;
|
|
max-width: 48px;
|
|
border-right: 1px solid var(--border-grid);
|
|
border-bottom: 1px solid var(--border-grid);
|
|
user-select: none;
|
|
}
|
|
|
|
/* Data Cells */
|
|
.sheet-table tbody tr td {
|
|
padding: 0.35rem 0.65rem;
|
|
border-right: 1px solid var(--border-grid);
|
|
border-bottom: 1px solid var(--border-grid);
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
max-width: 350px;
|
|
min-width: 100px;
|
|
line-height: 1.35;
|
|
background: #ffffff;
|
|
}
|
|
|
|
/* Editable Data Cells */
|
|
.sheet-table tbody tr td.editable-cell {
|
|
cursor: cell;
|
|
outline: none;
|
|
transition: background-color 0.1s;
|
|
}
|
|
|
|
.sheet-table tbody tr td.editable-cell:hover {
|
|
background-color: #eff6ff;
|
|
}
|
|
|
|
.sheet-table tbody tr td.editable-cell:focus {
|
|
background-color: #ffffff !important;
|
|
outline: 2px solid #2563eb !important;
|
|
box-shadow: inset 0 0 0 1px #2563eb, 0 2px 4px rgba(37, 99, 235, 0.15);
|
|
z-index: 15;
|
|
position: relative;
|
|
}
|
|
|
|
.sheet-table tbody tr td.cell-modified {
|
|
background-color: #fefce8;
|
|
}
|
|
|
|
.sheet-table tbody tr:hover td {
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
.sheet-table tbody tr:hover td.cell-modified {
|
|
background-color: #fef08a;
|
|
}
|
|
|
|
.sheet-table tbody tr:hover th.row-header {
|
|
background-color: #e5e7eb;
|
|
}
|
|
|
|
.btn-success {
|
|
background: #15803d;
|
|
color: #fff;
|
|
border-color: #15803d;
|
|
}
|
|
|
|
.btn-success:hover {
|
|
background: #166534;
|
|
box-shadow: 0 2px 4px rgba(22, 101, 52, 0.25);
|
|
}
|
|
|
|
.badge-unsaved {
|
|
background: #fef3c7;
|
|
color: #b45309;
|
|
border: 1px solid #fde68a;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 9999px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
/* Loading & Empty placeholders */
|
|
.grid-loading-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.75rem;
|
|
z-index: 50;
|
|
font-size: 0.875rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.sheet-empty-placeholder {
|
|
padding: 4rem 1.5rem;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.spreadsheet-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.4rem 1rem;
|
|
background: #f8fafc;
|
|
border-top: 1px solid var(--border-color);
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.footer-tip {
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Spinner */
|
|
.spinner {
|
|
width: 28px;
|
|
height: 28px;
|
|
border: 3px solid rgba(16, 124, 65, 0.2);
|
|
border-top-color: var(--primary);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from { opacity: 0; transform: translateY(-8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 640px) {
|
|
.header-container {
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
.brand-text h1 {
|
|
font-size: 1rem;
|
|
}
|
|
.active-file-badge {
|
|
display: none !important;
|
|
}
|
|
.files-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|