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;
}

/* 图片预览样式 */
.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;
}

.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;
}

/* 统一所有文本元素的字体和大小 */
* {
    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;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    /* 标题栏响应式调整 */
    .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;
    }
}

/* 视图切换按钮样式 */
.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;
}