refactor: split admin.css monolith, standardize CSS architecture
- Split admin.css (3228 lines) into 12 focused files: variables, base, forms, buttons, layout, components, tables, skeleton, datepicker, filemanager, pagination, responsive - Extracted shared styles from offers.css and dashboard.css into components.css and forms.css (offers-* → admin-* prefix) - Standardized naming: dash-kpi-* → admin-kpi-*, session-* → dash-session-*, rich-editor → admin-rich-editor - Deleted duplicate offers-tabs (using admin-tabs everywhere) - Deduplicated DatePicker and FileManager CSS (~360 lines removed) - Added 16 utility classes to base.css (font sizes, widths, gaps, margins) - Deleted empty admin.css Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
159
src/admin/variables.css
Normal file
159
src/admin/variables.css
Normal file
@@ -0,0 +1,159 @@
|
||||
/* ============================================================================
|
||||
CSS Variables
|
||||
============================================================================ */
|
||||
|
||||
:root {
|
||||
/* Spacing scale */
|
||||
--space-1: 0.25rem;
|
||||
--space-2: 0.5rem;
|
||||
--space-3: 0.75rem;
|
||||
--space-4: 1rem;
|
||||
--space-5: 1.25rem;
|
||||
--space-6: 1.5rem;
|
||||
--space-8: 2rem;
|
||||
--space-10: 2.5rem;
|
||||
--space-12: 3rem;
|
||||
|
||||
/* Shared colors */
|
||||
--accent-color: #d63031;
|
||||
--accent-hover: #b52626;
|
||||
--success: #22c55e;
|
||||
--warning: #f59e0b;
|
||||
--danger: #ef4444;
|
||||
--info: #3b82f6;
|
||||
--error: var(--danger);
|
||||
--muted: #9ca3af;
|
||||
--gradient: #d63031;
|
||||
--gradient-subtle: rgba(214, 48, 49, 0.9);
|
||||
|
||||
/* Shared layout */
|
||||
--border-radius: 10px;
|
||||
--border-radius-sm: 8px;
|
||||
--border-radius-lg: 16px;
|
||||
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--font-heading: "Urbanist", sans-serif;
|
||||
--font-body: "Plus Jakarta Sans", sans-serif;
|
||||
--font-mono: "DM Mono", "Menlo", monospace;
|
||||
--safe-top: env(safe-area-inset-top, 0px);
|
||||
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
||||
--safe-left: env(safe-area-inset-left, 0px);
|
||||
--safe-right: env(safe-area-inset-right, 0px);
|
||||
--navbar-height: calc(76px + var(--safe-top));
|
||||
}
|
||||
|
||||
/* ---- Dark theme ---- */
|
||||
[data-theme="dark"] {
|
||||
--bg-primary: #0f0f0f;
|
||||
--bg-secondary: #171717;
|
||||
--bg-tertiary: #1e1e1e;
|
||||
--text-primary: #ffffff;
|
||||
--text-secondary: #a0a0a0;
|
||||
--text-muted: #666666;
|
||||
--text-tertiary: #555555;
|
||||
--border-color: rgba(255, 255, 255, 0.08);
|
||||
--border-color-hover: rgba(255, 255, 255, 0.15);
|
||||
--glass-bg: #171717;
|
||||
--glass-bg-solid: #171717;
|
||||
--glass-border: rgba(255, 255, 255, 0.08);
|
||||
--glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
|
||||
--card-bg: #1a1a1a;
|
||||
--card-bg-hover: #1e1e1e;
|
||||
--input-bg: #1a1a1a;
|
||||
--glow-color: rgba(214, 48, 49, 0.15);
|
||||
--accent-light: rgba(214, 48, 49, 0.1);
|
||||
--accent-soft: #2a1a1a;
|
||||
--accent-glow: rgba(214, 48, 49, 0.3);
|
||||
--success-light: rgba(34, 197, 94, 0.1);
|
||||
--success-soft: #1a2a1e;
|
||||
--warning-light: rgba(245, 158, 11, 0.1);
|
||||
--warning-soft: #2a2518;
|
||||
--danger-light: rgba(239, 68, 68, 0.1);
|
||||
--danger-soft: #2a1a1a;
|
||||
--info-light: rgba(59, 130, 246, 0.1);
|
||||
--info-soft: #1a1e2a;
|
||||
--muted-light: rgba(107, 114, 128, 0.15);
|
||||
--orb-color-1: rgba(214, 48, 49, 0.2);
|
||||
--orb-color-2: rgba(120, 119, 198, 0.15);
|
||||
--calendar-icon-filter: invert(1);
|
||||
--select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
||||
--table-row-hover: rgba(255, 255, 255, 0.02);
|
||||
--row-current: color-mix(in srgb, var(--success) 5%, transparent);
|
||||
--row-current-hover: color-mix(in srgb, var(--success) 8%, transparent);
|
||||
--row-draft: color-mix(in srgb, var(--warning) 6%, transparent);
|
||||
--row-expired: color-mix(in srgb, var(--danger) 5%, transparent);
|
||||
}
|
||||
|
||||
/* ---- Light theme ---- */
|
||||
[data-theme="light"] {
|
||||
--success: #15803d;
|
||||
--warning: #b45309;
|
||||
--danger: #b91c1c;
|
||||
--info: #1d4ed8;
|
||||
--accent-color: #c73030;
|
||||
--accent-hover: #b52828;
|
||||
--muted: #6b7280;
|
||||
--bg-primary: #f5f4f2;
|
||||
--bg-secondary: #ffffff;
|
||||
--bg-tertiary: #eeecea;
|
||||
--text-primary: #1a1a1a;
|
||||
--text-secondary: #555555;
|
||||
--text-muted: #717180;
|
||||
--text-tertiary: #8a8a96;
|
||||
--border-color: rgba(0, 0, 0, 0.1);
|
||||
--border-color-hover: rgba(0, 0, 0, 0.18);
|
||||
--glass-bg: #ffffff;
|
||||
--glass-bg-solid: #ffffff;
|
||||
--glass-border: rgba(0, 0, 0, 0.08);
|
||||
--glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
|
||||
--card-bg: #ffffff;
|
||||
--card-bg-hover: #ffffff;
|
||||
--input-bg: #ffffff;
|
||||
--glow-color: rgba(222, 58, 58, 0.08);
|
||||
--accent-light: rgba(222, 58, 58, 0.08);
|
||||
--accent-soft: #fff0f0;
|
||||
--accent-glow: rgba(222, 58, 58, 0.15);
|
||||
--success-light: rgba(34, 197, 94, 0.1);
|
||||
--success-soft: #e8fbf7;
|
||||
--warning-light: rgba(245, 158, 11, 0.1);
|
||||
--warning-soft: #fef9ec;
|
||||
--danger-light: rgba(239, 68, 68, 0.1);
|
||||
--danger-soft: #fef2f2;
|
||||
--info-light: rgba(59, 130, 246, 0.1);
|
||||
--info-soft: #ebf3fd;
|
||||
--muted-light: rgba(107, 114, 128, 0.12);
|
||||
--calendar-icon-filter: none;
|
||||
--select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
|
||||
--table-row-hover: rgba(0, 0, 0, 0.03);
|
||||
--row-current: var(--success-soft);
|
||||
--row-current-hover: color-mix(in srgb, var(--success) 12%, transparent);
|
||||
--row-draft: var(--warning-soft);
|
||||
--row-expired: var(--danger-soft);
|
||||
--orb-color-1: rgba(214, 48, 49, 0.12);
|
||||
--orb-color-2: rgba(120, 119, 198, 0.1);
|
||||
}
|
||||
|
||||
/* Light mode - jemnejsi stiny */
|
||||
[data-theme="light"] .admin-toast {
|
||||
box-shadow:
|
||||
0 2px 8px rgba(0, 0, 0, 0.08),
|
||||
0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
[data-theme="light"] .react-datepicker {
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .admin-rich-editor .ql-snow .ql-picker-options,
|
||||
[data-theme="light"] .admin-rich-editor .ql-snow .ql-tooltip {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
[data-theme="light"] .admin-customer-dropdown,
|
||||
[data-theme="light"] .offers-template-menu {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
[data-theme="light"] .dash-quick-btn:hover {
|
||||
filter: brightness(0.9);
|
||||
}
|
||||
Reference in New Issue
Block a user