Files

499 rivejä
7.7 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: #f0f2f5;
color: #333;
}
/* 登录页面 */
.login-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-card {
background: #fff;
border-radius: 12px;
padding: 40px;
width: 400px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
text-align: center;
}
.login-card h1 {
font-size: 28px;
margin-bottom: 8px;
color: #1a1a2e;
}
.login-card p {
color: #888;
margin-bottom: 30px;
}
/* 主布局 */
.main-app {
display: flex;
min-height: 100vh;
}
/* 侧边栏 */
.sidebar {
width: 220px;
background: #1a1a2e;
color: #fff;
display: flex;
flex-direction: column;
position: fixed;
height: 100vh;
z-index: 100;
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header h2 {
font-size: 20px;
font-weight: 600;
}
.sidebar-menu {
list-style: none;
flex: 1;
padding: 10px 0;
}
.sidebar-menu li {
padding: 12px 20px;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 10px;
color: rgba(255, 255, 255, 0.7);
}
.sidebar-menu li:hover {
background: rgba(255, 255, 255, 0.1);
color: #fff;
}
.sidebar-menu li.active {
background: rgba(255, 255, 255, 0.15);
color: #fff;
border-left: 3px solid #667eea;
}
.sidebar-menu .icon {
font-size: 16px;
width: 20px;
text-align: center;
}
.sidebar-footer {
padding: 15px 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* 内容区 */
.content {
margin-left: 220px;
flex: 1;
padding: 30px;
}
.page {
display: none;
}
.page.active {
display: block;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.page-header h2 {
margin: 0;
}
h2 {
font-size: 22px;
margin-bottom: 20px;
color: #1a1a2e;
}
/* 统计卡片 */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 16px;
}
.stat-card {
background: #fff;
border-radius: 8px;
padding: 20px;
text-align: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.stat-card.wide {
grid-column: span 3;
}
.stat-value {
font-size: 32px;
font-weight: 700;
color: #667eea;
margin-bottom: 4px;
}
.stat-label {
font-size: 13px;
color: #888;
}
/* 表格 */
.data-table {
width: 100%;
background: #fff;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border-collapse: collapse;
}
.data-table th {
background: #f8f9fa;
padding: 12px 16px;
text-align: left;
font-weight: 600;
font-size: 13px;
color: #666;
border-bottom: 2px solid #eee;
}
.data-table td {
padding: 10px 16px;
border-bottom: 1px solid #f0f0f0;
font-size: 14px;
}
.data-table tr:hover td {
background: #f8f9fa;
}
.data-table .status-enabled {
color: #52c41a;
font-weight: 600;
}
.data-table .status-disabled {
color: #ff4d4f;
font-weight: 600;
}
/* 按钮 */
.btn {
padding: 8px 16px;
border: 1px solid #d9d9d9;
border-radius: 6px;
background: #fff;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
}
.btn:hover {
border-color: #667eea;
color: #667eea;
}
.btn-primary {
background: #667eea;
color: #fff;
border-color: #667eea;
}
.btn-primary:hover {
background: #5a6fd6;
color: #fff;
}
.btn-danger {
background: #ff4d4f;
color: #fff;
border-color: #ff4d4f;
}
.btn-danger:hover {
background: #e04346;
color: #fff;
}
.btn-sm {
padding: 4px 12px;
font-size: 13px;
}
.btn-block {
width: 100%;
padding: 12px;
font-size: 16px;
}
/* 表单 */
.form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
margin-bottom: 6px;
font-weight: 500;
font-size: 14px;
color: #333;
}
.form-group small {
display: block;
margin-top: 4px;
color: #999;
font-size: 12px;
}
.form-group input,
.form-group select {
width: 100%;
padding: 8px 12px;
border: 1px solid #d9d9d9;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.input-sm {
padding: 6px 10px;
border: 1px solid #d9d9d9;
border-radius: 6px;
font-size: 13px;
}
.input-sm:focus {
outline: none;
border-color: #667eea;
}
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
}
/* 对话框 */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: #fff;
border-radius: 12px;
width: 520px;
max-width: 90vw;
max-height: 85vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 24px;
border-bottom: 1px solid #f0f0f0;
}
.modal-header h3 {
margin: 0;
font-size: 18px;
}
.modal-close {
font-size: 24px;
cursor: pointer;
color: #999;
line-height: 1;
}
.modal-close:hover {
color: #333;
}
.modal-content form {
padding: 24px;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}
/* 面包屑 */
.breadcrumb {
background: #fff;
padding: 10px 16px;
border-radius: 6px;
margin-bottom: 12px;
font-size: 14px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.breadcrumb span {
cursor: pointer;
color: #667eea;
}
.breadcrumb span:hover {
text-decoration: underline;
}
/* 过滤栏 */
.filter-bar {
display: flex;
gap: 10px;
align-items: center;
}
/* 分页 */
.pagination {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 16px;
}
.pagination button {
padding: 6px 14px;
border: 1px solid #d9d9d9;
border-radius: 4px;
background: #fff;
cursor: pointer;
font-size: 13px;
}
.pagination button.active {
background: #667eea;
color: #fff;
border-color: #667eea;
}
.pagination button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* 文件操作 */
.file-actions {
display: flex;
gap: 10px;
}
/* 设置 */
.settings-section {
background: #fff;
border-radius: 8px;
padding: 24px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.settings-section h3 {
margin-bottom: 16px;
font-size: 16px;
color: #1a1a2e;
border-bottom: 1px solid #eee;
padding-bottom: 8px;
}
/* Toast提示 */
.toast {
position: fixed;
top: 20px;
right: 20px;
padding: 12px 24px;
border-radius: 8px;
color: #fff;
font-size: 14px;
z-index: 2000;
display: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.toast.success {
background: #52c41a;
display: block;
}
.toast.error {
background: #ff4d4f;
display: block;
}
/* 操作按钮组 */
.action-btns {
display: flex;
gap: 4px;
}
.action-btns .btn {
padding: 4px 8px;
font-size: 12px;
}
/* 文件图标 */
.file-icon {
margin-right: 6px;
}
.dir-link {
color: #667eea;
cursor: pointer;
}
.dir-link:hover {
text-decoration: underline;
}