/* 管理后台样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* 应用容器 */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-container {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background-color: #343a40; /* 黑色背景 */
    color: #fff;
    min-height: 100vh;
    transition: all 0.3s;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    background-color: #212529; /* 深黑色背景 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.sidebar-header .logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.sidebar-header .title {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu .menu-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: #adb5bd;
    transition: all 0.3s;
    cursor: pointer;
}

.sidebar-menu .menu-item:hover {
    background-color: #2c3136;
    color: #fff;
}

.sidebar-menu .menu-item.active {
    background-color: #007bff;
    color: #fff;
}

.sidebar-menu .menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-menu .menu-item .text {
    margin-left: 10px;
    white-space: nowrap;
}

/* 头部导航 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header .left {
    display: flex;
    align-items: center;
}

.header .right {
    display: flex;
    align-items: center;
}

.header .btn-link {
    color: #6c757d;
    padding: 0;
    font-size: 18px;
}

.header .dropdown-toggle {
    display: flex;
    align-items: center;
}

.header .dropdown-toggle i {
    margin-right: 5px;
}

/* 登录页 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-form {
    width: 400px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo h2 {
    color: #007bff;
    margin: 0;
}

.login-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* 卡片样式 */
.card {
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 5px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.table td, .table th {
    vertical-align: middle;
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

/* 加载中样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #sidebar {
        width: 80px;
        min-width: 80px;
    }
    
    #sidebar.collapsed {
        margin-left: -80px;
    }
    
    .sidebar-header h3 {
        display: none;
    }
    
    .sidebar-menu li a span {
        display: none;
    }
    
    .sidebar-menu li a i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        margin-left: 0;
    }
}

/* 订单列表样式 */
.order-row {
    transition: all 0.2s ease;
}

.order-row:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 预约行hover效果 */
.appointment-row {
    transition: all 0.2s ease;
}

.appointment-row:hover {
    background-color: #f0f7ff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-content {
    margin-left: 20px;
    flex: 1;
}

.timeline-item:not(:last-child) .timeline-badge::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: #e0e0e0;
    left: 19px;
    top: 40px;
}

/* 渐变色头部 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 按钮样式 */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* 徽章样式 */
.badge {
    padding: 0.4em 0.6em;
    font-weight: normal;
}

.badge-success {
    background-color: #28a745;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

/* 产品卡片样式 */
.product-card {
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    border-color: #80bdff;
}

.product-card.selected {
    border-color: #007bff !important;
    background-color: #f0f7ff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.product-card.selected:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}