Files
car-maintenance-system/frontend/css/style.css
wangziqi 7c4be0b7b4 add
2026-01-07 15:39:54 +08:00

398 lines
8.0 KiB
CSS

/* 车管家4S店车辆维保管理系统 - 自定义样式 */
:root {
--primary-color: #0d6efd;
--secondary-color: #6c757d;
--success-color: #198754;
--danger-color: #dc3545;
--warning-color: #ffc107;
--info-color: #0dcaf0;
--light-bg: #f8f9fa;
--dark-text: #212529;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: var(--light-bg);
min-height: 100vh;
}
/* ==================== 登录页面样式 ==================== */
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-container .card {
width: 100%;
max-width: 450px;
border-radius: 15px;
}
.login-container .card-header {
border-radius: 15px 15px 0 0 !important;
}
/* ==================== 仪表板样式 ==================== */
.dashboard-wrapper {
display: flex;
min-height: 100vh;
}
/* 侧边栏 */
.sidebar {
width: 260px;
background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
color: #fff;
position: fixed;
height: 100vh;
overflow-y: auto;
transition: all 0.3s;
z-index: 1000;
}
.sidebar .sidebar-header {
padding: 20px;
border-bottom: 1px solid rgba(255,255,255,0.1);
text-align: center;
}
.sidebar .sidebar-header h5 {
margin: 0;
font-weight: 600;
}
.sidebar .sidebar-header small {
opacity: 0.75;
}
.sidebar .menu-item {
padding: 12px 20px;
cursor: pointer;
transition: all 0.3s;
display: flex;
align-items: center;
gap: 12px;
color: rgba(255,255,255,0.85);
text-decoration: none;
border-left: 3px solid transparent;
}
.sidebar .menu-item:hover {
background-color: rgba(255,255,255,0.1);
color: #fff;
}
.sidebar .menu-item.active {
background-color: rgba(13, 110, 253, 0.3);
color: #fff;
border-left-color: var(--primary-color);
}
.sidebar .menu-item i {
font-size: 1.2rem;
}
/* 主内容区 */
.main-content {
flex: 1;
margin-left: 260px;
padding: 20px;
transition: all 0.3s;
}
/* 顶部导航栏 */
.top-navbar {
background: #fff;
padding: 15px 25px;
border-radius: 10px;
margin-bottom: 25px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
display: flex;
justify-content: space-between;
align-items: center;
}
/* 统计卡片 */
.stat-card {
background: #fff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: transform 0.3s;
border-left: 4px solid var(--primary-color);
}
.stat-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
width: 50px;
height: 50px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: #fff;
margin-bottom: 15px;
}
.stat-card .stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card .stat-icon.green { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-card .stat-icon.red { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card .stat-value {
font-size: 2rem;
font-weight: 700;
color: var(--dark-text);
margin-bottom: 5px;
}
.stat-card .stat-label {
color: var(--secondary-color);
font-size: 0.9rem;
}
/* 内容卡片 */
.content-card {
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
overflow: hidden;
}
.content-card .card-header {
background: #fff;
border-bottom: 2px solid var(--primary-color);
padding: 15px 20px;
font-weight: 600;
}
.content-card .card-body {
padding: 20px;
}
/* 表格样式 */
.table-custom {
margin-bottom: 0;
}
.table-custom thead th {
background-color: var(--light-bg);
font-weight: 600;
border-bottom: 2px solid #dee2e6;
padding: 12px;
}
.table-custom tbody td {
padding: 12px;
vertical-align: middle;
}
.table-custom tbody tr:hover {
background-color: #f8f9fa;
}
/* 状态徽章 */
.badge-status {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.badge-status.pending { background-color: #fff3cd; color: #856404; }
.badge-status.appointed { background-color: #cfe2ff; color: #084298; }
.badge-status.in_progress { background-color: #ffe5d0; color: #9f4600; }
.badge-status.completed { background-color: #d1e7dd; color: #0f5132; }
.badge-status.cancelled { background-color: #e9ecef; color: #495057; }
.badge-status.paid { background-color: #d1e7dd; color: #0f5132; }
.badge-status.unpaid { background-color: #f8d7da; color: #842029; }
/* 按钮 */
.btn-action {
padding: 5px 10px;
font-size: 0.85rem;
margin: 0 2px;
}
/* 模态框 */
.modal-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
border-radius: 10px 10px 0 0;
}
.modal-header .btn-close {
filter: brightness(0) invert(1);
}
/* Loading遮罩 */
.loading-overlay {
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: 9999;
}
#loadingOverlay.loading {
display: flex !important;
}
/* Toast */
.toast-container {
z-index: 1060;
}
.toast.success { border-left: 4px solid var(--success-color); }
.toast.error { border-left: 4px solid var(--danger-color); }
.toast.warning { border-left: 4px solid var(--warning-color); }
.toast.info { border-left: 4px solid var(--info-color); }
/* 空状态 */
.empty-state {
text-align: center;
padding: 60px 20px;
color: var(--secondary-color);
}
.empty-state i {
font-size: 4rem;
margin-bottom: 20px;
opacity: 0.5;
}
/* 车辆卡片 */
.vehicle-card {
background: #fff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: all 0.3s;
height: 100%;
}
.vehicle-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.vehicle-card .vehicle-plate {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
padding: 8px 15px;
border-radius: 5px;
font-weight: 600;
display: inline-block;
margin-bottom: 15px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.sidebar {
width: 0;
transform: translateX(-100%);
}
.sidebar.show {
width: 260px;
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
.stat-card {
margin-bottom: 15px;
}
}
/* 搜索框 */
.search-box {
position: relative;
max-width: 300px;
}
.search-box input {
padding-left: 40px;
}
.search-box i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: var(--secondary-color);
}
/* 分页 */
.pagination-custom .page-link {
color: var(--primary-color);
border: 1px solid #dee2e6;
}
.pagination-custom .page-item.active .page-link {
background-color: var(--primary-color);
border-color: var(--primary-color);
}
/* 下拉菜单 */
dropdown-menu-custom {
border: none;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
border-radius: 8px;
}
/* 进度条 */
.progress-custom {
height: 8px;
border-radius: 4px;
}
/* 警告框 */
.alert-custom {
border: none;
border-radius: 8px;
border-left: 4px solid;
}
.alert-custom.info {
background-color: #cfe2ff;
border-left-color: var(--info-color);
color: #084298;
}
.alert-custom.success {
background-color: #d1e7dd;
border-left-color: var(--success-color);
color: #0f5132;
}
.alert-custom.warning {
background-color: #fff3cd;
border-left-color: var(--warning-color);
color: #856404;
}
.alert-custom.error {
background-color: #f8d7da;
border-left-color: var(--danger-color);
color: #842029;
}