html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}
.container {
    max-width: 100%;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.card-body {
    flex: 1 1 auto;
    padding: 0;
}
.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    padding: 16px 24px;
    transition: all 0.3s ease;
}

.card-header:hover {
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
}

/* 更多操作按钮样式 */
#moreActionsBtn {
    border-radius: 6px !important;
    padding: 0 12px !important;
    min-width: 60px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
    background-color: #6c757d !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

#moreActionsBtn:hover {
    background-color: #5a6268 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

#moreActionsBtn:active {
    transform: translateY(0) !important;
}

/* 确保下拉菜单出现在标题栏下方 */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 10px !important;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 180px;
    padding: 8px 0;
    z-index: 1000;
    background-color: white !important;
}
.btn {
    border-radius: 8px;
    font-weight: 500;
}
.btn-xs {
    padding: 2px 6px;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 4px;
}

/* 统一按钮样式 */
.header-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 8px;
    min-width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.header-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.header-btn:hover::before {
    left: 100%;
}

.header-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header-btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(25, 135, 84, 0.3);
}

.header-btn-success:hover {
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4);
}

.header-btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.header-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.header-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.header-btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.header-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.header-btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.header-btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

.header-btn-info:hover {
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.header-btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #d39e00 100%);
    color: #212529;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.header-btn-warning:hover {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}
.table {
    margin-bottom: 0;
}
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}
.form-label {
    font-weight: 500;
}

/* 财务详情页标签样式 */
.finance-label {
    white-space: nowrap;
    min-width: 60px;
    font-weight: 500;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-container {
    position: relative;
    margin: 0;
    width: calc(25% - 6px);
    height: 80px;
    box-sizing: border-box;
}

.delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.delete-btn:hover {
    background-color: #dc3545;
    transform: scale(1.1);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 4px 0;
    animation: dropdownSlide 0.2s ease-out forwards;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #333;
    background-color: transparent;
    border: none;
    text-align: left;
    width: 100%;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateX(4px);
}

.dropdown-item:active {
    background-color: #e9ecef;
}

.dropdown-toggle::after {
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* 生日提醒列表动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

#birthdayReminderList.show {
    animation: slideDown 0.5s ease-out forwards;
}

#birthdayReminderList.hide {
    animation: slideUp 0.5s ease-in forwards;
}

.preview-wrapper {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
    margin-top: 5px;
    background-color: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-open {
    background-color: #d4edda;
    color: #155724;
}
.status-closed {
    background-color: #f8d7da;
    color: #721c24;
}
.cursor-pointer {
    cursor: pointer;
}

/* 身份证照片容器样式 */
.id-card-container {
    display: flex;
    gap: 10px;
    height: auto;
}

.id-card-item {
    width: 50%;
    padding: 5px;
    height: auto;
}

.id-card-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* 拨号按钮样式 */
.phone-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dial-btn {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 50%;
    padding: 4px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: all 0.2s ease;
}

.dial-btn:hover {
    background-color: #007bff;
    color: white;
    transform: scale(1.1);
}

/* 桌面端和移动端都显示拨号按钮 */
.dial-btn {
    display: inline-flex;
}

/* 统一所有文本元素的字体和大小 */
* {
    font-family: 'Microsoft YaHei', sans-serif !important;
    font-size: 0.9rem !important;
}

/* 特殊元素的字体大小调整 */
h1, h2, h3, h4, h5, h6 {
    font-size: 1.2rem !important;
}

.form-control, .btn, .card-header {
    font-size: 0.9rem !important;
}

/* 表格样式统一 */
#employeesListViewContainer table {
    font-family: 'Microsoft YaHei', sans-serif !important;
    font-size: 0.9rem !important;
    color: #333 !important;
}

/* 表头样式 */
#employeesListViewContainer thead {
    background-color: #f8f9fa !important;
}

#employeesListViewContainer th {
    height: 48px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #333 !important;
    padding: 12px !important;
    border-bottom: 2px solid #dee2e6 !important;
}

/* 表格单元格样式 */
#employeesListViewContainer td {
    font-size: 0.9rem !important;
    color: #333 !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 16px !important;
    height: 70px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 表格单元格内的div样式 */
#employeesListViewContainer td > div {
    line-height: 1.5 !important;
}

/* 表格单元格内的div子元素样式 */
#employeesListViewContainer td > div > div {
    margin-bottom: 8px !important;
}

/* 表格单元格内最后一个div的样式 */
#employeesListViewContainer td > div > div:last-child {
    margin-bottom: 0 !important;
}

/* 调整表格样式以支持行间距 */
#customersListViewContainer table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    width: 100%;
}

/* 表格行样式 */
#customersListViewContainer tbody tr {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin-bottom: 10px;
    transition: all 0.3s ease !important;
}

/* 奇数行背景色 */
#customersListViewContainer tbody tr:nth-child(odd) {
    background-color: #f8f9fa !important;
}

/* 偶数行背景色 */
#customersListViewContainer tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

#customersListViewContainer tbody tr:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* 调整列表视图容器，确保翻页栏不会占用过多空间 */
#customersListViewContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#customersListViewContainer .table-responsive {
    flex: 1;
    overflow-y: auto;
}

/* 表格单元格边框 */
#employeesListViewContainer td {
    border: none !important;
}

/* 客户列表表格单元格边框 */
#customersListViewContainer td {
    border: none !important;
}

/* 电话号码列样式 */
#employeesListViewContainer td:nth-child(7) {
    white-space: normal !important;
    word-wrap: break-word !important;
    max-width: 150px !important;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    /* 在中等屏幕上显示3列瀑布流 */
    #employeesCardContainer {
        column-count: 3 !important;
        column-gap: 15px !important;
        padding: 5px !important;
    }
    
    /* 列表视图表格调整 */
    #employeesListViewContainer table {
        font-size: 0.85rem !important;
    }
    
    #employeesListViewContainer th {
        height: 40px !important;
        font-size: 0.9rem !important;
        padding: 8px !important;
    }
    
    #employeesListViewContainer td {
        padding: 8px !important;
    }
    
    /* 标题栏响应式调整 */
    .card-header {
        padding: 14px 20px;
    }
    
    .header-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        height: 36px;
    }
    
    h5.mb-0 {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 768px) {
    /* 标题栏响应式调整 */
    .card-header {
        padding: 10px 16px;
        flex-direction: row;
        align-items: center;
        gap: 2px;
    }
    
    .card-header .d-flex.align-items-center.gap-2 {
        gap: 2px;
    }
    
    .header-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        height: 30px;
    }
    
    h5.mb-0 {
        font-size: 1rem !important;
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    /* 标题栏响应式调整 */
    .card-header {
        padding: 8px 10px;
        flex-direction: row;
        align-items: center;
        gap: 1px;
    }
    
    .card-header .d-flex.align-items-center.gap-2 {
        gap: 1px;
    }
    
    .header-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
        height: 28px;
        min-width: 28px;
    }
    
    h5.mb-0 {
        font-size: 0.9rem !important;
        margin-right: 8px;
        white-space: nowrap;
    }
    
    /* 在移动设备上显示2列瀑布流 */
    #employeesCardContainer {
        column-count: 2 !important;
        column-gap: 15px !important;
    }
    #employeesCardContainer > div {
        margin-bottom: 15px !important;
    }
    
    /* 列表视图表格调整 */
    #employeesListViewContainer table {
        font-size: 0.8rem !important;
    }
    
    #employeesListViewContainer th {
        padding: 6px !important;
        font-size: 0.75rem !important;
    }
    
    #employeesListViewContainer td {
        padding: 6px !important;
    }
    
    /* 隐藏部分列以适应移动设备 */
    #employeesListViewContainer th:nth-child(5), /* 身份证号 */
    #employeesListViewContainer td:nth-child(5),
    #employeesListViewContainer th:nth-child(6), /* 生日 */
    #employeesListViewContainer td:nth-child(6),
    #employeesListViewContainer th:nth-child(7), /* 入职时间 */
    #employeesListViewContainer td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 576px) {
    /* 列表视图表格调整 */
    #employeesListViewContainer table {
        font-size: 0.75rem !important;
    }
    
    #employeesListViewContainer th {
        padding: 4px !important;
        font-size: 0.7rem !important;
    }
    
    #employeesListViewContainer td {
        padding: 4px !important;
    }
    
    /* 隐藏更多列以适应小屏幕 */
    #employeesListViewContainer th:nth-child(4), /* 性别 */
    #employeesListViewContainer td:nth-child(4),
    #employeesListViewContainer th:nth-child(5), /* 身份证号 */
    #employeesListViewContainer td:nth-child(5),
    #employeesListViewContainer th:nth-child(6), /* 生日 */
    #employeesListViewContainer td:nth-child(6),
    #employeesListViewContainer th:nth-child(7), /* 入职时间 */
    #employeesListViewContainer td:nth-child(7) {
        display: none;
    }
}

/* 视图切换按钮样式 */
.btn-group .header-btn.active {
    z-index: 1;
}

.btn-group .header-btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group .header-btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Toast容器样式调整 */
.toast-container {
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* 财务列表表格样式 */
#financeListTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

#financeListTable th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 12px 15px;
    border-bottom: 2px solid #dee2e6;
}

#financeListTable td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

#financeListTable tbody tr {
    transition: all 0.3s ease;
}

#financeListTable tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#financeListTable tbody tr:last-child td {
    border-bottom: none;
}

/* 金额样式 */
.finance-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

/* 类型样式 */
.finance-type-income {
    color: #28a745;
    font-weight: bold;
}

.finance-type-expense {
    color: #dc3545;
    font-weight: bold;
}

.finance-type-return {
    color: #ffc107;
    font-weight: bold;
}

/* 状态样式 */
.finance-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.finance-status-success {
    background-color: #d4edda;
    color: #155724;
}

.finance-status-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.finance-status-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* 表格响应式调整 */
@media (max-width: 768px) {
    #financeListTable {
        font-size: 0.85rem;
    }
    
    #financeListTable th,
    #financeListTable td {
        padding: 10px;
    }
    
    .finance-amount {
        font-size: 1rem;
    }
}

/* 预约列表样式 */
.booking-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
    transform: translateY(-2px);
}

/* 服务类型徽章 */
.service-badge {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
}

/* 状态徽章 */
.status-badge {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
}

/* 状态样式 */
.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-canceled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 搜索和筛选区域 */
.search-filter-container {
    margin-bottom: 20px;
}

#searchFilterContent {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 模态框样式 */
.modal-content {
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: none;
}

.modal-header {
    border-radius: 16px 16px 0 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    border-radius: 0 0 16px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* 表单输入框样式 */
.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 客户搜索下拉框 */
#bookingCustomerDropdown,
#editBookingCustomerDropdown {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ced4da;
}

#bookingCustomerDropdown div:hover,
#editBookingCustomerDropdown div:hover {
    background-color: #f8f9fa;
}

/* 卡片头部 */
.card-header {
    border-radius: 12px 12px 0 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* 卡片主体 */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 0;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-link {
    border-radius: 8px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #007bff;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .booking-card {
        padding: 15px;
    }
    
    .form-label-custom {
        min-width: 80px;
        width: 80px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* 表单标签样式 */
.form-label-custom {
    white-space: nowrap;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    min-width: 60px;
    width: 60px;
    text-align: justify;
    text-align-last: justify;
}