This commit is contained in:
2026-03-19 14:36:35 +07:00
parent 6d7d86befd
commit 96635dbcf2
28 changed files with 4332 additions and 1683 deletions

View File

@@ -0,0 +1,275 @@
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes slideInDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@keyframes bounce {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes shimmer {
0% {
background-position: -1000px 0;
}
100% {
background-position: 1000px 0;
}
}
@keyframes float {
0%, 100% {
transform: translateY(0px);
}
50% {
transform: translateY(-20px);
}
}
/* Animation classes */
.animate-fade-in {
animation: fadeIn 0.3s ease-in;
}
.animate-fade-out {
animation: fadeOut 0.3s ease-out;
}
.animate-slide-in-left {
animation: slideInLeft 0.3s ease-out;
}
.animate-slide-in-right {
animation: slideInRight 0.3s ease-out;
}
.animate-slide-in-down {
animation: slideInDown 0.3s ease-out;
}
.animate-slide-in-up {
animation: slideInUp 0.3s ease-out;
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.animate-bounce {
animation: bounce 1s infinite;
}
.animate-spin {
animation: spin 1s linear infinite;
}
.animate-shimmer {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 1000px 100%;
animation: shimmer 2s infinite;
}
.animate-float {
animation: float 3s ease-in-out infinite;
}
/* Transition classes */
.transition-all {
transition: all 0.3s ease;
}
.transition-colors {
transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.transition-transform {
transition: transform 0.3s ease;
}
.transition-opacity {
transition: opacity 0.3s ease;
}
.transition-fast {
transition: all 0.15s ease;
}
.transition-slow {
transition: all 0.5s ease;
}
/* Hover effects */
.hover-lift {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.hover-scale:hover {
transform: scale(1.05);
}
.hover-brighten:hover {
filter: brightness(1.1);
}
/* Transform utilities */
.scale-95 {
transform: scale(0.95);
}
.scale-100 {
transform: scale(1);
}
.scale-105 {
transform: scale(1.05);
}
.scale-110 {
transform: scale(1.1);
}
/* Opacity utilities */
.opacity-0 {
opacity: 0;
}
.opacity-50 {
opacity: 0.5;
}
.opacity-75 {
opacity: 0.75;
}
.opacity-100 {
opacity: 1;
}
/* Loading skeleton */
.skeleton {
background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
background-size: 200% 100%;
animation: loading 1.5s infinite;
}
.dark .skeleton {
background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
background-size: 200% 100%;
}
@keyframes loading {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.skeleton-text {
height: 1rem;
border-radius: 0.25rem;
}
.skeleton-circle {
border-radius: 50%;
height: 2.5rem;
width: 2.5rem;
}
.skeleton-card {
border-radius: 0.75rem;
height: 100%;
}

266
public/styles/main.css Normal file
View File

@@ -0,0 +1,266 @@
/* Main Styles */
:root {
--color-primary: #3b82f6;
--color-primary-dark: #1e40af;
--color-success: #10b981;
--color-warning: #f59e0b;
--color-danger: #ef4444;
--transition-speed: 0.3s;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
}
.font-mono {
font-family: 'JetBrains Mono', monospace;
}
/* Common Components */
.card {
@apply bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl shadow-sm hover:shadow-md transition-shadow;
}
.glass-panel {
@apply backdrop-filter backdrop-blur-md border;
}
.glass-panel-light {
@apply bg-white/95 border-slate-200/50;
}
.glass-panel-dark {
@apply bg-slate-900/95 dark:bg-slate-900/95 border-slate-700/50;
}
/* Buttons */
.btn {
@apply px-4 py-2 rounded-lg font-medium transition-all duration-200 flex items-center justify-center gap-2;
}
.btn-primary {
@apply bg-blue-600 hover:bg-blue-700 text-white shadow-lg shadow-blue-600/30 hover:shadow-blue-600/50 active:scale-95;
}
.btn-secondary {
@apply bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-700 active:scale-95;
}
.btn-danger {
@apply bg-red-600 hover:bg-red-700 text-white shadow-lg shadow-red-600/30 active:scale-95;
}
/* Input Fields */
.input-field {
@apply w-full px-4 py-2.5 border border-slate-300 dark:border-slate-600 rounded-lg bg-white dark:bg-slate-800 text-slate-900 dark:text-white placeholder-slate-400 dark:placeholder-slate-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:focus:ring-blue-400 outline-none transition-all;
}
.input-field:disabled {
@apply bg-slate-100 dark:bg-slate-900 cursor-not-allowed opacity-50;
}
/* Navigation Items */
.nav-item {
@apply text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-white;
}
.nav-item.active {
@apply bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 font-semibold;
}
/* Auth Tab Buttons */
.auth-tab-btn {
@apply text-slate-700 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white transition-all;
}
.auth-tab-btn.active {
@apply bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm;
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.fade-in {
animation: fadeIn var(--transition-speed) ease-in;
}
.slide-in {
animation: slideIn var(--transition-speed) ease-in;
}
/* Scrollbar Styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
.dark ::-webkit-scrollbar-track {
background: #1e293b;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb {
background: #475569;
}
.dark ::-webkit-scrollbar-thumb:hover {
background: #64748b;
}
/* Status Indicators */
.status-badge {
@apply inline-flex items-center gap-1 px-3 py-1 rounded-full text-xs font-semibold;
}
.status-online {
@apply bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400;
}
.status-offline {
@apply bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-400;
}
.status-warning {
@apply bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-400;
}
.status-error {
@apply bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400;
}
/* Loading Spinner */
.loader {
display: inline-block;
border: 3px solid rgba(100, 116, 139, 0.2);
border-top-color: #3b82f6;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 0.8s linear infinite;
}
/* Tables */
table {
border-collapse: collapse;
}
thead {
background: #f8fafc;
}
.dark thead {
background: #1e293b;
}
tbody tr {
@apply hover:bg-slate-50 dark:hover:bg-slate-800 transition-colors;
}
td, th {
padding: 0.75rem;
}
/* Modal Overlay */
.modal-overlay {
@apply fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center;
}
/* Utility Classes */
.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.shadow-sm {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
/* Focus visible for accessibility */
:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}
input:focus-visible,
button:focus-visible,
select:focus-visible {
outline: none !important;
}

View File

@@ -0,0 +1,279 @@
/* Responsive Design - Mobile First */
/* Extra Small Devices (< 640px) */
@media (max-width: 639px) {
body {
font-size: 14px;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.25rem;
}
h3 {
font-size: 1.1rem;
}
.card {
padding: 1rem;
}
.btn {
padding: 0.625rem 1rem;
font-size: 0.875rem;
}
.btn-icon {
width: 32px;
height: 32px;
padding: 0.5rem;
}
/* Hide elements on small screens */
.hidden-mobile {
display: none;
}
/* Stack grid on mobile */
.grid-responsive {
grid-template-columns: 1fr;
}
/* Full width modals */
.modal {
margin: 1rem;
}
/* Navigation sidebar to drawer on mobile */
#sidebar {
position: fixed;
left: 0;
top: 4rem;
height: calc(100vh - 4rem);
width: 100%;
max-width: 256px;
transition: transform 0.3s ease;
}
#sidebar.hidden {
transform: translateX(-100%);
}
/* Adjust table for small screens */
table {
font-size: 0.875rem;
}
thead th {
padding: 0.5rem;
}
tbody td {
padding: 0.5rem;
}
/* Stack table rows */
.table-responsive {
display: block;
overflow-x: auto;
white-space: nowrap;
}
/* Adjust forms */
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-size: 0.875rem;
}
/* Responsive header */
header {
padding: 0.5rem 1rem;
}
.header-title {
font-size: 1rem;
}
}
/* Small Devices (640px - 768px) */
@media (min-width: 640px) and (max-width: 767px) {
.card {
padding: 1.5rem;
}
.grid-responsive {
grid-template-columns: repeat(2, 1fr);
}
table {
font-size: 0.9375rem;
}
}
/* Medium Devices (768px - 1024px) && ipads */
@media (min-width: 768px) {
.hidden-md-down {
display: none;
}
.hidden-md-up {
display: block;
}
#sidebar {
transform: translateX(0) !important;
position: static;
}
.grid-responsive {
grid-template-columns: repeat(2, 1fr);
}
}
/* Large Devices (1024px+) && desktops */
@media (min-width: 1024px) {
.grid-responsive {
grid-template-columns: repeat(3, 1fr);
}
.grid-responsive.grid-4 {
grid-template-columns: repeat(4, 1fr);
}
#sidebar {
display: block !important;
}
.hidden-lg-down {
display: none;
}
.hidden-lg-up {
display: block;
}
/* Show more columns on desktop */
.table-hidden-mobile {
display: table-cell;
}
}
/* Extra Large Devices (1280px+) */
@media (min-width: 1280px) {
body {
font-size: 16px;
}
.container-xl {
max-width: 1280px;
margin: 0 auto;
}
.grid-responsive.grid-4 {
grid-template-columns: repeat(4, 1fr);
}
.grid-responsive.grid-5 {
grid-template-columns: repeat(5, 1fr);
}
}
/* Portrait vs Landscape */
@media (orientation: portrait) {
.landscape-hidden {
display: none;
}
}
@media (orientation: landscape) {
.portrait-hidden {
display: none;
}
.h-screen {
max-height: 100vh;
}
}
/* Touch devices optimization */
@media (hover: none) and (pointer: coarse) {
.btn,
.nav-item {
padding: 1rem;
min-height: 44px;
min-width: 44px;
}
/* Remove hover effects on touch devices */
.btn:hover {
transform: none;
}
button:active {
transform: scale(0.98);
}
}
/* Print styles */
@media print {
header,
nav,
.no-print {
display: none;
}
body {
background: white;
color: black;
}
.card {
page-break-inside: avoid;
border: 1px solid #ccc;
}
.btn {
display: none;
}
}
/* High DPI screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
/* Optimize images and borders */
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Dark mode media query */
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
}
}
/* Light mode media query */
@media (prefers-color-scheme: light) {
:root {
color-scheme: light;
}
}

192
public/styles/theme.css Normal file
View File

@@ -0,0 +1,192 @@
/* Theme Support - Light/Dark Mode */
:root {
--bg-primary: #ffffff;
--bg-secondary: #f8fafc;
--bg-tertiary: #f1f5f9;
--text-primary: #1e293b;
--text-secondary: #64748b;
--text-tertiary: #94a3b8;
--border-color: #e2e8f0;
--shadow-color: rgba(0, 0, 0, 0.1);
}
:root.dark {
--bg-primary: #0f172a;
--bg-secondary: #1e293b;
--bg-tertiary: #334155;
--text-primary: #f1f5f9;
--text-secondary: #cbd5e1;
--text-tertiary: #94a3b8;
--border-color: #475569;
--shadow-color: rgba(0, 0, 0, 0.3);
}
/* Smooth transitions for theme switching */
html {
transition: background-color 0.3s ease, color 0.3s ease;
}
body {
background-color: var(--bg-primary);
color: var(--text-primary);
}
.dark body {
background-color: var(--bg-secondary);
color: var(--text-primary);
}
/* Background gradients for different themes */
.bg-gradient-light {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.bg-gradient-dark {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}
/* Text colors that change with theme */
.text-muted {
color: var(--text-secondary);
}
.text-muted-dark {
color: var(--text-tertiary);
}
/* Shadow adjustments */
.shadow-light {
box-shadow: 0 4px 6px -1px var(--shadow-color);
}
.shadow-dark {
box-shadow: 0 10px 15px -3px var(--shadow-color);
}
/* Input field styling for dark mode */
.input-field {
background-color: var(--bg-primary);
border-color: var(--border-color);
color: var(--text-primary);
}
.input-field::placeholder {
color: var(--text-tertiary);
}
/* Card styling for dark mode */
.card {
background-color: var(--bg-primary);
border-color: var(--border-color);
}
.dark .card {
background-color: var(--bg-secondary);
border-color: var(--border-color);
}
/* Header and navigation */
header {
background-color: var(--bg-primary);
border-color: var(--border-color);
}
.sidebar {
background-color: var(--bg-primary);
border-color: var(--border-color);
}
/* Table styling */
thead {
background-color: var(--bg-secondary);
border-color: var(--border-color);
}
tbody {
color: var(--text-primary);
}
.glass-panel {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-color: rgba(255, 255, 255, 0.2);
}
.dark .glass-panel {
background: rgba(15, 23, 42, 0.95);
backdrop-filter: blur(10px);
border-color: rgba(148, 163, 184, 0.1);
}
/* Hover states */
.hover-light:hover {
background-color: var(--bg-tertiary);
}
.dark .hover-light:hover {
background-color: var(--bg-tertiary);
}
/* Color overlays */
.color-overlay-blue {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}
.dark .color-overlay-blue {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
}
/* Auth screen theme */
#authModule {
background: linear-gradient(to bottom right, #1e3a8a, #1e40af);
}
.dark #authModule {
background: linear-gradient(to bottom right, #0f172a, #1e293b);
}
/* Status colors */
.status-success {
color: #10b981;
}
.dark .status-success {
color: #6ee7b7;
}
.status-warning {
color: #f59e0b;
}
.dark .status-warning {
color: #fbbf24;
}
.status-error {
color: #ef4444;
}
.dark .status-error {
color: #f87171;
}
.status-info {
color: #3b82f6;
}
.dark .status-info {
color: #60a5fa;
}