611 lines
13 KiB
CSS
611 lines
13 KiB
CSS
/* 精致美化样式 - 统一设计系统 */
|
|
|
|
/* ========== 全局变量 ========== */
|
|
:root {
|
|
/* 主色调 */
|
|
--primary-color: #409EFF;
|
|
--primary-hover: #66b1ff;
|
|
--primary-active: #3a8ee6;
|
|
--primary-light: #ecf5ff;
|
|
|
|
/* 功能色 */
|
|
--success-color: #67c23a;
|
|
--warning-color: #e6a23c;
|
|
--danger-color: #f56c6c;
|
|
--info-color: #909399;
|
|
|
|
/* 中性色 */
|
|
--text-primary: #303133;
|
|
--text-regular: #606266;
|
|
--text-secondary: #909399;
|
|
--text-placeholder: #c0c4cc;
|
|
|
|
/* 背景色 */
|
|
--bg-primary: #ffffff;
|
|
--bg-secondary: #f5f7fa;
|
|
--bg-tertiary: #f0f2f5;
|
|
|
|
/* 边框色 */
|
|
--border-base: #dcdfe6;
|
|
--border-light: #e4e7ed;
|
|
--border-lighter: #ebeef5;
|
|
--border-extra-light: #f2f6fc;
|
|
|
|
/* 阴影 */
|
|
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
|
|
--shadow-base: 0 2px 12px rgba(0, 0, 0, 0.08);
|
|
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
|
|
|
|
/* 圆角 */
|
|
--radius-sm: 4px;
|
|
--radius-base: 8px;
|
|
--radius-md: 12px;
|
|
--radius-lg: 16px;
|
|
|
|
/* 间距 */
|
|
--spacing-xs: 4px;
|
|
--spacing-sm: 8px;
|
|
--spacing-base: 16px;
|
|
--spacing-md: 24px;
|
|
--spacing-lg: 32px;
|
|
|
|
/* 过渡动画 */
|
|
--transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
--transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
/* ========== 全局重置 ========== */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
|
|
color: var(--text-primary);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* ========== 导航栏美化 ========== */
|
|
.navbar {
|
|
height: 60px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-bottom: none;
|
|
box-shadow: var(--shadow-md);
|
|
backdrop-filter: blur(10px);
|
|
position: relative;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.navbar::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.navbar > * {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.logo {
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
letter-spacing: 0.5px;
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.logo:hover {
|
|
transform: scale(1.05);
|
|
text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.nav-item {
|
|
padding: 10px 18px;
|
|
border-radius: var(--radius-base);
|
|
color: rgba(255, 255, 255, 0.9);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
transition: var(--transition-base);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.nav-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.nav-item:hover::before {
|
|
left: 0;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
color: #ffffff;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.navbar-right {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
.navbar-right a {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.navbar-right a:hover {
|
|
color: #ffffff;
|
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* ========== 卡片美化 ========== */
|
|
.card {
|
|
background: var(--bg-primary);
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-base);
|
|
padding: var(--spacing-md);
|
|
transition: var(--transition-base);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 3px;
|
|
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
|
transform: scaleX(0);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.card:hover::before {
|
|
transform: scaleX(1);
|
|
}
|
|
|
|
.card:hover {
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.card-title {
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
margin-bottom: 8px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.card-value {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1.2;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.card-sub {
|
|
color: var(--success-color);
|
|
font-size: 12px;
|
|
margin-top: 6px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ========== 按钮美化 ========== */
|
|
.btn {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: var(--radius-base);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: var(--transition-base);
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.btn::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 0;
|
|
height: 0;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: translate(-50%, -50%);
|
|
transition: width 0.6s, height 0.6s;
|
|
}
|
|
|
|
.btn:active::before {
|
|
width: 300px;
|
|
height: 300px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.btn-primary:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.btn-default {
|
|
background: var(--bg-primary);
|
|
color: var(--text-regular);
|
|
border: 1px solid var(--border-base);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.btn-default:hover {
|
|
border-color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
box-shadow: var(--shadow-base);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: linear-gradient(135deg, #f56c6c 0%, #e85a5a 100%);
|
|
color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(245, 108, 108, 0.4);
|
|
}
|
|
|
|
.btn-danger:hover {
|
|
box-shadow: 0 6px 16px rgba(245, 108, 108, 0.5);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* ========== 表格美化 ========== */
|
|
.table-container {
|
|
background: var(--bg-primary);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-base);
|
|
overflow: hidden;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
th {
|
|
background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
padding: 16px;
|
|
text-align: left;
|
|
border-bottom: 2px solid var(--border-light);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
td {
|
|
padding: 16px;
|
|
border-bottom: 1px solid var(--border-extra-light);
|
|
color: var(--text-regular);
|
|
font-size: 14px;
|
|
transition: var(--transition-fast);
|
|
}
|
|
|
|
tr {
|
|
transition: var(--transition-fast);
|
|
}
|
|
|
|
tr:hover {
|
|
background: var(--primary-light);
|
|
}
|
|
|
|
tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* ========== 表单美化 ========== */
|
|
.form-input,
|
|
.form-select,
|
|
.form-textarea {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1px solid var(--border-base);
|
|
border-radius: var(--radius-base);
|
|
font-size: 14px;
|
|
transition: var(--transition-base);
|
|
background: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.form-input:focus,
|
|
.form-select:focus,
|
|
.form-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
color: var(--text-primary);
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.required {
|
|
color: var(--danger-color);
|
|
margin-right: 4px;
|
|
}
|
|
|
|
/* ========== 搜索表单美化 ========== */
|
|
.search-form {
|
|
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
|
|
padding: var(--spacing-md);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--spacing-base);
|
|
box-shadow: var(--shadow-sm);
|
|
border: 1px solid var(--border-lighter);
|
|
}
|
|
|
|
/* ========== 页面标题美化 ========== */
|
|
.page-header {
|
|
margin-bottom: var(--spacing-md);
|
|
padding-bottom: var(--spacing-base);
|
|
border-bottom: 2px solid var(--border-extra-light);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
.page-desc {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ========== 标签美化 ========== */
|
|
.tag {
|
|
display: inline-block;
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
background: var(--primary-light);
|
|
color: var(--primary-color);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.status-badge {
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
display: inline-block;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.status-published {
|
|
background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
|
|
color: #52c41a;
|
|
}
|
|
|
|
.status-draft {
|
|
background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
|
|
color: #d46b08;
|
|
}
|
|
|
|
/* ========== 侧边栏美化 ========== */
|
|
.sidebar {
|
|
background: var(--bg-primary);
|
|
border-right: 1px solid var(--border-lighter);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.menu-item {
|
|
padding: 14px 24px;
|
|
cursor: pointer;
|
|
transition: var(--transition-base);
|
|
border-left: 3px solid transparent;
|
|
color: var(--text-regular);
|
|
font-size: 14px;
|
|
position: relative;
|
|
}
|
|
|
|
.menu-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 3px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
transform: scaleY(0);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.menu-item:hover {
|
|
background: var(--primary-light);
|
|
color: var(--primary-color);
|
|
padding-left: 28px;
|
|
}
|
|
|
|
.menu-item:hover::before {
|
|
transform: scaleY(1);
|
|
}
|
|
|
|
.menu-item.active {
|
|
background: linear-gradient(90deg, var(--primary-light) 0%, rgba(102, 126, 234, 0.05) 100%);
|
|
color: var(--primary-color);
|
|
font-weight: 600;
|
|
border-left-color: var(--primary-color);
|
|
}
|
|
|
|
.menu-item.active::before {
|
|
transform: scaleY(1);
|
|
}
|
|
|
|
/* ========== 内容区域美化 ========== */
|
|
.content {
|
|
background: var(--bg-primary);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-base);
|
|
padding: var(--spacing-md);
|
|
margin: var(--spacing-base);
|
|
}
|
|
|
|
/* ========== 分页美化 ========== */
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--spacing-sm);
|
|
margin-top: var(--spacing-md);
|
|
padding: var(--spacing-base);
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-base);
|
|
}
|
|
|
|
/* ========== 操作链接美化 ========== */
|
|
.action-link {
|
|
color: var(--primary-color);
|
|
cursor: pointer;
|
|
margin-right: 16px;
|
|
font-size: 14px;
|
|
transition: var(--transition-base);
|
|
position: relative;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
.action-link::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 0;
|
|
height: 2px;
|
|
background: var(--primary-color);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.action-link:hover {
|
|
color: var(--primary-hover);
|
|
}
|
|
|
|
.action-link:hover::after {
|
|
width: 100%;
|
|
}
|
|
|
|
.action-link.danger {
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.action-link.danger::after {
|
|
background: var(--danger-color);
|
|
}
|
|
|
|
/* ========== 加载动画 ========== */
|
|
@keyframes shimmer {
|
|
0% {
|
|
background-position: -1000px 0;
|
|
}
|
|
100% {
|
|
background-position: 1000px 0;
|
|
}
|
|
}
|
|
|
|
.loading {
|
|
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
background-size: 1000px 100%;
|
|
animation: shimmer 2s infinite;
|
|
}
|
|
|
|
/* ========== 响应式优化 ========== */
|
|
@media (max-width: 768px) {
|
|
.navbar {
|
|
height: 56px;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: none;
|
|
}
|
|
|
|
.content {
|
|
margin: var(--spacing-sm);
|
|
padding: var(--spacing-base);
|
|
}
|
|
}
|
|
|
|
/* ========== 滚动条美化 ========== */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: var(--bg-secondary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--border-base);
|
|
border-radius: 4px;
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-secondary);
|
|
}
|
|
|