This commit is contained in:
2025-11-28 21:20:40 +08:00
commit f940b95b67
73 changed files with 15721 additions and 0 deletions

237
static/css/admin.css Normal file
View File

@@ -0,0 +1,237 @@
/* Admin Dashboard Styles - 2025 */
.admin-layout {
min-height: 100vh;
background-color: var(--bg-body);
}
/* Header/Navbar */
.admin-header {
background: white;
border-bottom: 1px solid var(--secondary-200);
padding: 0.75rem 0;
position: sticky;
top: 0;
z-index: 30;
box-shadow: var(--shadow-sm);
}
.header-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.brand {
font-size: 1.25rem;
font-weight: 700;
color: var(--primary-600);
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
.nav-links {
display: flex;
gap: 0.5rem;
}
.nav-item {
padding: 0.5rem 0.75rem;
color: var(--secondary-500);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
border-radius: var(--radius-md);
transition: var(--transition);
}
.nav-item:hover {
background: var(--secondary-50);
color: var(--secondary-900);
}
.nav-item.active {
background: var(--primary-50);
color: var(--primary-700);
}
/* Main Content */
.main-container {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1.5rem;
}
.page-header {
margin-bottom: 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.page-title {
font-size: 1.5rem;
font-weight: 700;
color: var(--secondary-900);
}
/* Stats Grid */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background: white;
padding: 1.5rem;
border-radius: var(--radius-lg);
border: 1px solid var(--secondary-200);
box-shadow: var(--shadow-sm);
transition: var(--transition);
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.stat-label {
font-size: 0.875rem;
color: var(--secondary-500);
font-weight: 500;
margin-bottom: 0.5rem;
}
.stat-value {
font-size: 2rem;
font-weight: 700;
color: var(--secondary-900);
}
/* Tables */
.table-container {
background: white;
border-radius: var(--radius-lg);
border: 1px solid var(--secondary-200);
box-shadow: var(--shadow-sm);
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
text-align: left;
}
thead {
background: var(--secondary-50);
border-bottom: 1px solid var(--secondary-200);
}
th {
padding: 1rem 1.5rem;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
color: var(--secondary-500);
letter-spacing: 0.05em;
white-space: nowrap;
}
td {
padding: 1rem 1.5rem;
font-size: 0.875rem;
color: var(--secondary-800);
border-bottom: 1px solid var(--secondary-100);
white-space: nowrap;
}
tr:last-child td {
border-bottom: none;
}
tr:hover td {
background: var(--secondary-50);
}
/* Badges */
.badge {
display: inline-flex;
align-items: center;
padding: 0.25rem 0.625rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 600;
}
.badge-success {
background: #dcfce7;
color: #166534;
}
.badge-error {
background: #fee2e2;
color: #991b1b;
}
.badge-warning {
background: #fef3c7;
color: #92400e;
}
.badge-info {
background: #dbeafe;
color: #1e40af;
}
.badge-neutral {
background: #f1f5f9;
color: #475569;
}
/* Forms */
.form-card {
background: white;
padding: 2rem;
border-radius: var(--radius-lg);
border: 1px solid var(--secondary-200);
box-shadow: var(--shadow-sm);
max-width: 600px;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: var(--secondary-700);
margin-bottom: 0.5rem;
}
/* Responsive */
@media (max-width: 768px) {
.header-container {
flex-direction: column;
gap: 1rem;
}
.nav-links {
width: 100%;
overflow-x: auto;
padding-bottom: 0.5rem;
}
.stats-grid {
grid-template-columns: 1fr;
}
}

View File

@@ -0,0 +1,306 @@
/* Modern UI Design System - 2025 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
/* Color Palette - Indigo/Violet Theme */
--primary-50: #eef2ff;
--primary-100: #e0e7ff;
--primary-500: #6366f1;
--primary-600: #4f46e5;
--primary-700: #4338ca;
--secondary-50: #f8fafc;
--secondary-100: #f1f5f9;
--secondary-200: #e2e8f0;
--secondary-500: #64748b;
--secondary-800: #1e293b;
--secondary-900: #0f172a;
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--info: #3b82f6;
/* Semantic Colors */
--bg-body: #f8fafc;
--bg-card: #ffffff;
--text-main: var(--secondary-800);
--text-muted: var(--secondary-500);
--border-color: var(--secondary-200);
/* Effects */
--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);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
--radius-sm: 0.375rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background-color: var(--bg-body);
color: var(--text-main);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
color: var(--secondary-900);
font-weight: 700;
letter-spacing: -0.025em;
}
/* Buttons */
.ui-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.625rem 1.25rem;
font-size: 0.875rem;
font-weight: 500;
border-radius: var(--radius-md);
border: 1px solid transparent;
cursor: pointer;
transition: var(--transition);
gap: 0.5rem;
}
.ui-btn:active {
transform: scale(0.98);
}
.ui-btn-primary {
background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
color: white;
box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.ui-btn-primary:hover {
background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}
.ui-btn-secondary {
background: white;
border-color: var(--secondary-200);
color: var(--secondary-800);
}
.ui-btn-secondary:hover {
background: var(--secondary-50);
border-color: var(--secondary-300);
}
.ui-btn-danger {
background: var(--error);
color: white;
}
.ui-btn-danger:hover {
background: #dc2626;
}
.ui-btn-success {
background: var(--success);
color: white;
}
/* Inputs */
.ui-input {
width: 100%;
padding: 0.625rem 1rem;
border: 1px solid var(--secondary-200);
border-radius: var(--radius-md);
background-color: white;
color: var(--text-main);
font-size: 0.875rem;
transition: var(--transition);
}
.ui-input:focus {
outline: none;
border-color: var(--primary-500);
box-shadow: 0 0 0 3px var(--primary-100);
}
/* Select / Dropdown */
select.ui-input,
.ui-select {
width: 100%;
padding: 0.625rem 2.5rem 0.625rem 1rem;
border: 1px solid var(--secondary-200);
border-radius: var(--radius-md);
background-color: white;
background-image: 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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 1rem;
color: var(--text-main);
font-size: 0.875rem;
cursor: pointer;
transition: var(--transition);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
select.ui-input:focus,
.ui-select:focus {
outline: none;
border-color: var(--primary-500);
box-shadow: 0 0 0 3px var(--primary-100);
}
select.ui-input:hover,
.ui-select:hover {
border-color: var(--secondary-300);
}
/* Cards */
.ui-card {
background: var(--bg-card);
border-radius: var(--radius-lg);
border: 1px solid var(--secondary-100);
box-shadow: var(--shadow-sm);
padding: 1.5rem;
}
/* Notifications */
#notification-container {
position: fixed;
top: 1.5rem;
right: 1.5rem;
z-index: 50;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.notification {
min-width: 320px;
padding: 1rem;
background: white;
border-radius: var(--radius-md);
box-shadow: var(--shadow-lg);
border-left: 4px solid transparent;
transform: translateX(100%);
opacity: 0;
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
display: flex;
align-items: center;
gap: 0.75rem;
}
.notification.show {
transform: translateX(0);
opacity: 1;
}
.notification-success { border-left-color: var(--success); }
.notification-error { border-left-color: var(--error); }
.notification-warning { border-left-color: var(--warning); }
.notification-info { border-left-color: var(--info); }
.notification-icon {
flex-shrink: 0;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: white;
}
.notification-success .notification-icon { background: var(--success); }
.notification-error .notification-icon { background: var(--error); }
.notification-warning .notification-icon { background: var(--warning); }
.notification-info .notification-icon { background: var(--info); }
.notification-message {
font-size: 0.875rem;
font-weight: 500;
color: var(--secondary-800);
}
/* Modal */
.ui-modal {
position: fixed;
inset: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
}
.ui-modal.show {
opacity: 1;
pointer-events: auto;
}
.ui-modal-overlay {
position: absolute;
inset: 0;
background: rgba(15, 23, 42, 0.4);
backdrop-filter: blur(4px);
}
.ui-modal-content {
position: relative;
background: white;
width: 90%;
max-width: 500px;
max-height: 90vh;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
padding: 1.5rem;
transform: scale(0.95);
transition: transform 0.2s;
overflow-y: auto;
overflow-x: hidden;
}
.ui-modal.show .ui-modal-content {
transform: scale(1);
}
.ui-modal-content h3 {
font-size: 1.125rem;
margin-bottom: 1rem;
}
.ui-modal-actions {
margin-top: 1.5rem;
display: flex;
justify-content: flex-end;
gap: 0.75rem;
}
/* Utilities */
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.font-medium { font-weight: 500; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }