/* ======== 全局重置 ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ======== 统一 CSS 变量 ======== */
:root {
    --transition-speed: 0.3s;
    --header-height: 52px;
    --header-mobile-height: 56px;
    --footer-height: 80px;
    --main-content-padding: 10px;
    --avatar-size: 36px;
    --avatar-mobile-size: 36px;
    --avatar-dropdown-size: 60px;
}

/* ======== 主内容区样式 ======== */
#main-content {
    margin-top: var(--header-height);
    padding: var(--main-content-padding);
    min-height: calc(100vh - var(--header-height));
}

#main-content .container-fluid {
    padding: 0;
}

/* 修复 page-header 与 header 的间距 */
#main-content .page-header {
    margin-top: 0;
    padding-top: 10px;
}

/* 修复 search-row 与 header 的间距 */
#main-content .search-row {
    margin-top: 0;
    padding-top: 10px;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

/* ======== Header样式已移动到 main/header.css ======== */

/* ======== 主内容区样式 ======== */
/* 注：主内容区与侧边栏相关的样式已移动到 main/sidebar.css */

/* Header样式由header.css统一管理，保持此区域为空避免冲突 */



/* 响应式调整 */
@media (max-width: 1200px) {
    .stat-figure {
        font-size: 3rem;
    }
    
    .stat-text, .stat-unit {
        font-size: 1.1rem;
    }
}

@media (max-width: 992px) {
    .stats-section {
        padding: 60px 0;
        margin: 40px 0;
    }
    
    .stat-item {
        padding: 25px 15px;
        margin: 8px;
    }
    
    .stat-figure {
        font-size: 2.5rem;
    }
    
    .stat-text, .stat-unit {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .stats-section {
        padding: 40px 0;
        margin: 30px 0;
    }
    
    .stat-item {
        padding: 20px 10px;
        margin: 5px;
        border-radius: 10px;
    }
    
    .stat-figure {
        font-size: 2.2rem;
    }
    
    .stat-text, .stat-unit {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 576px) {
    .stats-section {
        padding: 30px 0;
        margin: 20px 0;
    }
    
    .stat-item {
        padding: 15px 8px;
        margin: 3px;
        border-radius: 8px;
    }
    
    .stat-figure {
        font-size: 1.8rem;
    }
    
    .stat-text, .stat-unit {
        font-size: 0.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-number {
        gap: 4px;
        margin-bottom: 5px;
    }
}

/* 注：移动端/平板端的侧边栏和主内容区样式已移动到 main/sidebar.css */

/* ===== CSS变量定义 ===== */
:root {
    /* 主色调 */
    --primary-color: #4e73df;
    --primary-dark: #2e59d9;
    --primary-light: #6f8eea;
    
    /* 辅助色 */
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    
    /* 背景色 */
    --light-bg: #f8f9fc;
    --body-bg: #f5f7fb;
    --card-bg: #ffffff;
    
    /* 边框色 */
    --border-color: #e3e6f0;
    --border-light: #dee2e6;
    --border-dark: #d1d3e2;
    
    /* 文字色 */
    --text-primary: #2e59d9;
    --text-secondary: #6c757d;
    --text-dark: #5a5c69;
    --text-light: #858796;
    
    /* 阴影 */
    --card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    --card-shadow-light: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    --modal-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    
    /* 过渡效果 */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
    
    /* 圆角 */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    
    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-xxl: 2rem;
    
    /* ===== 表格字体大小变量 ===== */
    /* 修改以下变量可统一调整所有合同模块表格字体大小 */
    --table-font-size: 16px;
    --table-th-font-size: 14px;
    --table-td-font-size: 15px;
    --table-badge-font-size: 12px;
    --table-info-font-size: 14px;
    --table-th-font-weight: 600;
    --table-th-padding: 0.75rem 0.5rem;
    --table-td-padding: 0.6rem 0.5rem;
}

/* ===== 基础样式 ===== */
body {
    background-color: var(--body-bg);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.container-fluid {
    padding: 0 var(--spacing-xl);
}

/* ===== 页面头部样式 ===== */
.page-header {
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    width: 100%;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e3a59;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-header .lead {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.page-header > div:first-child {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.page-header > div:last-child {
    flex-shrink: 0;
}

.page-header .btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.page-header .btn-group .btn {
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
}

/* ===== 卡片组件样式 ===== */
.card {
    border-radius: var(--border-radius-xl);
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: var(--spacing-xxl);
    background-color: var(--card-bg);
}

.card-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0 !important;
    flex-wrap: nowrap;
}

.card-header h6 {
    white-space: nowrap;
}

.card-header .btn-sm {
    white-space: nowrap;
}

.card-body {
    padding: var(--spacing-xl);
}

.auto-close-alert {
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
    transition: all 0.5s ease;
}

.auto-close-alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    animation: progressBar 5s linear forwards;
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

@keyframes progressBar {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* ===== 按钮样式 ===== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: var(--border-light);
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    background-color: var(--light-bg);
    border-color: var(--border-color);
    color: var(--text-dark);
}

/* ===== 表单组件样式 ===== */
.form-section {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
}

.form-section-title i {
    margin-right: var(--spacing-lg);
    font-size: 1.3rem;
    color: var(--primary-color);
}

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.required-label::after {
    content: " *";
    color: var(--danger-color);
}

.client-type-toggle {
    display: flex;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.client-type-toggle label {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0;
}

.client-type-toggle input[type="radio"] {
    display: none;
}

.client-type-toggle input[type="radio"]:checked + span {
    background-color: var(--primary-color);
    color: white;
}

.client-type-toggle span {
    display: block;
    padding: 0.5rem;
    border-radius: 5px;
}

.sales-item-row {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.sales-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sales-item-total {
    background-color: #e9f7ef;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #d1f2e5;
}

.product-preset-select {
    cursor: pointer;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

/* ===== 平板端响应式设计 (992px以下) ===== */
@media (max-width: 991.98px) {
    .container-fluid {
        padding: 0 var(--spacing-lg);
    }
    
    .page-header {
        padding: var(--spacing-lg) 0;
        margin-bottom: var(--spacing-xl);
    }
    
    .page-header .btn-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px;
    }
    
    .page-header .btn-group .btn {
        width: auto !important;
    }
    
    .card {
        margin-bottom: var(--spacing-xl);
        border-radius: var(--border-radius-lg);
    }
    
    .card-header,
    .card-body {
        padding: var(--spacing-lg);
    }
    
    .card-header {
        flex-wrap: nowrap;
    }
    
    .card-header h6 {
        font-size: 0.95rem;
    }
    
    .sales-item-row .row > div {
        margin-bottom: var(--spacing-sm);
    }
    
    .btn-group {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn-group .btn {
        width: 100%;
        margin-right: 0;
    }
    
    /* contract.php 平板端优化 */
    .table-container {
        margin-bottom: 1.5rem;
    }
    
    .table-header {
        padding: 1rem 1.25rem;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .table-header h6 {
        white-space: nowrap;
    }
    
    .table-header > div:last-child {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.6rem 0.4rem;
        vertical-align: middle;
    }
    
    .serial-number {
        min-width: 50px;
        max-width: 50px;
    }
    
    .client-info-column {
        min-width: 150px;
    }
    
    .table-actions {
        min-width: 320px;
        max-width: 380px;
        vertical-align: middle;
    }
    
    .table-actions .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* 操作按钮组优化 */
    .action-btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem;
        align-items: center;
        justify-content: flex-start;
    }
    
    .action-btn-group .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.15rem;
        align-items: center;
    }
    
    .action-btn-group .btn {
        padding: 0.2rem 0.45rem;
        font-size: 0.72rem;
        margin-bottom: 0.1rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    .search-card {
        margin-bottom: 1.5rem;
    }
    
    .search-header {
        padding: 1rem 1.25rem;
        flex-wrap: nowrap !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .search-header > div:first-child {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .search-header h6 {
        margin: 0 !important;
    }
    
    .search-body {
        padding: 1.25rem;
    }
}

/* ===== 小屏移动端响应式设计 (576px以下) ===== */
@media (max-width: 575.98px) {
    .container-fluid {
        padding: 0 var(--spacing-md);
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .page-header {
        min-width: 100%;
    }
    
    .page-header h1 {
        font-size: 0.95rem;
    }
    
    .page-header h1 i {
        margin-right: 4px !important;
    }
    
    .page-header .lead {
        display: none;
    }
    
    .page-header .btn-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 4px;
    }
    
    .page-header .btn-group .btn {
        width: auto !important;
    }
    
    /* contract.php 移动端优化 */
    .table-container {
        border-radius: 8px;
        margin-bottom: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .table-header {
        padding: 0.75rem 1rem;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .table-header h6 {
        font-size: 0.95rem;
        white-space: nowrap;
    }
    
    .table-header > div:last-child {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .table-responsive {
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.3rem;
        white-space: nowrap;
        vertical-align: middle;
    }
    
    .serial-number {
        min-width: 40px;
        max-width: 40px;
    }
    
    .client-info-column {
        min-width: 120px;
    }
    
    .client-info {
        font-size: 0.85rem;
    }
    
    .table-actions {
        min-width: 280px;
        max-width: 320px;
        vertical-align: middle;
    }
    
    .table-actions .btn {
        padding: 0.18rem 0.35rem;
        font-size: 0.68rem;
        margin-bottom: 0.1rem;
        line-height: 1.15;
    }
    
    .table-actions .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.12rem;
        align-items: center;
    }
    
    .table-actions .btn-group .btn {
        flex: 0 0 auto;
        margin-bottom: 0;
    }
    
    .search-card {
        margin-bottom: 1rem;
        margin-left: auto;
        margin-right: auto;
    }
    
    .search-header {
        padding: 0.75rem 1rem;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .search-header > div:first-child {
        flex-wrap: nowrap !important;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        display: flex !important;
        align-items: center !important;
    }
    
    .search-header h6 {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 !important;
    }
    
    .search-header h6 i {
        margin-right: 4px !important;
    }
    
    .search-header .stats-summary {
        display: none !important;
    }
    
    .search-header .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .search-header .btn {
        flex-shrink: 0;
    }
    
    .search-body {
        padding: 1rem;
    }
    
    .search-body .row > div {
        margin-bottom: 0.75rem;
    }
    
    .search-body .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .search-body .form-control {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .search-body .input-group .form-control {
        font-size: 0.875rem;
    }
    
    .table-header {
        flex-wrap: nowrap !important;
        padding: 0.6rem 0.75rem;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .table-header h6 {
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .table-header h6 i {
        margin-right: 4px !important;
    }
    
    .table-header > div:last-child {
        flex-wrap: nowrap !important;
        flex-shrink: 0;
        display: flex !important;
        align-items: center !important;
    }
    
    .table-header .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .table-header span {
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .card-header {
        flex-wrap: nowrap !important;
        padding: 0.6rem 0.75rem;
    }
    
    .card-header h6 {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .card-header h6 i {
        margin-right: 4px !important;
    }
    
    .card-header .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* 操作按钮组优化 */
    .action-btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.15rem;
        align-items: center;
        justify-content: flex-start;
    }
    
    .action-btn-group .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.12rem;
        align-items: center;
    }
    
    .action-btn-group .btn {
        padding: 0.18rem 0.35rem;
        font-size: 0.68rem;
        margin-bottom: 0.08rem;
        line-height: 1.15;
        white-space: nowrap;
    }
    
    .action-btn-group .btn i {
        font-size: 0.7rem;
    }
    
    .action-btn-group .btn span {
        display: inline;
    }
}

.permission-alert {
    background-color: #fff9db;
    border-left: 4px solid #ffd43b;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.permission-alert i {
    color: #f08c00;
    margin-right: 10px;
}

.permission-alert p {
    margin-bottom: 0;
}

/* 合同编号样式 */
.contract-no-input {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* 个人客户专属字段样式 */
.individual-only {
    display: none;
}

/* 销售物品表格样式 */
.sales-items-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-items-table th {
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.sales-items-table td {
    padding: 0.75rem;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

.sales-items-table tr:hover {
    background-color: #f8f9fa;
}

.action-buttons {
    white-space: nowrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
}

/* 模态框样式 */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #4a4a4a;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    border-radius: 0 0 10px 10px;
}

/* ===== delivery_out.php 样式转移 ===== */
/* 搜索模态框样式 */
.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.search-modal-actions {
    display: flex;
    gap: 0.5rem;
}

.search-modal-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.search-modal-detail {
    font-size: 0.875rem;
    color: #6c757d;
}

.search-modal-action {
    display: flex;
    justify-content: flex-end;
}

/* 搜索框样式 */
.searchable-input {
    position: relative;
    width: 300px;
}

.searchable-input .form-control {
    padding-right: 35px;
}

.searchable-input .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    z-index: 10;
}

/* 客户信息检查样式 */
.client-info-required {
    display: none;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

/* 交付信息内容样式 */
#delivery-info-content {
    display: none;
}

/* 飞手贷绑定容器样式 */
#delivery-loan-container {
    display: none;
}

/* 员工搜索样式 */
.staff-select-container {
    position: relative;
}

.staff-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.staff-select-options {
    padding: 0.5rem;
}

.staff-option {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.staff-option:hover {
    background-color: #f8f9fa;
}

.staff-option:last-child {
    border-bottom: none;
}

.staff-search-clear {
    display: block;
}

/* ===== 统一搜索下拉框样式 ===== */
.course-search-dropdown,
#recruitmentTeacherSuggestions,
#batchRecruitmentTeacherSuggestions,
#operatorSuggestions,
#teacherSuggestions,
.staff-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    overflow-y: auto;
    margin-top: 6px;
    padding: 4px 0;
    min-width: 100%;
    display: none;
}

/* 招生老师和作业人员搜索下拉框高度 */
#recruitmentTeacherSuggestions,
#batchRecruitmentTeacherSuggestions,
#operatorSuggestions,
#teacherSuggestions {
    max-height: 320px;
}

/* 课程名称搜索下拉框高度 */
.course-search-dropdown {
    max-height: 480px;
}

/* 员工搜索下拉框高度 */
.staff-suggestions {
    max-height: 320px;
}

/* 通用搜索下拉框 - 自动适应宽度 */
[id$="_suggestions"] {
    max-height: 320px;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.course-search-dropdown .dropdown-header {
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--light-bg), #ffffff);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 12px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-search-dropdown .dropdown-content {
    padding: 0;
}

/* 搜索建议下拉框最大高度和滚动条 */
#recruitmentTeacherSuggestions,
#batchRecruitmentTeacherSuggestions,
#editOperatorSuggestions,
#addOperatorSuggestions,
#operatorSuggestions,
#teacherSuggestions {
    max-height: 300px;
    overflow-y: auto;
}

/* 统一下拉选项样式 */
.course-search-dropdown .dropdown-item,
#recruitmentTeacherSuggestions .dropdown-item,
#batchRecruitmentTeacherSuggestions .dropdown-item,
#editOperatorSuggestions .dropdown-item,
#addOperatorSuggestions .dropdown-item,
#operatorSuggestions .dropdown-item,
#teacherSuggestions .dropdown-item,
.staff-suggestions .staff-suggestion-item,
[id$="_suggestions"] .dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
    margin: 2px 6px;
}

/* 统一悬停样式 */
.course-search-dropdown .dropdown-item:hover,
#recruitmentTeacherSuggestions .dropdown-item:hover,
#batchRecruitmentTeacherSuggestions .dropdown-item:hover,
#editOperatorSuggestions .dropdown-item:hover,
#addOperatorSuggestions .dropdown-item:hover,
#operatorSuggestions .dropdown-item:hover,
#teacherSuggestions .dropdown-item:hover,
.staff-suggestions .staff-suggestion-item:hover,
[id$="_suggestions"] .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(78, 115, 223, 0.1), rgba(78, 115, 223, 0.05));
    color: var(--primary-color);
    transform: translateX(2px);
}

/* 统一选中样式 */
.course-search-dropdown .dropdown-item.active,
#recruitmentTeacherSuggestions .dropdown-item.active,
#batchRecruitmentTeacherSuggestions .dropdown-item.active,
#editOperatorSuggestions .dropdown-item.active,
#addOperatorSuggestions .dropdown-item.active,
#operatorSuggestions .dropdown-item.active,
#teacherSuggestions .dropdown-item.active,
.staff-suggestions .staff-suggestion-item.active,
[id$="_suggestions"] .dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3);
}

/* 最后一个选项无底边框 */
.course-search-dropdown .dropdown-item:last-child,
#recruitmentTeacherSuggestions .dropdown-item:last-child,
#batchRecruitmentTeacherSuggestions .dropdown-item:last-child,
#editOperatorSuggestions .dropdown-item:last-child,
#addOperatorSuggestions .dropdown-item:last-child,
#operatorSuggestions .dropdown-item:last-child,
#teacherSuggestions .dropdown-item:last-child,
.staff-suggestions .staff-suggestion-item:last-child,
[id$="_suggestions"] .dropdown-item:last-child {
    border-bottom: none;
}

.course-search-input {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* 业务员搜索下拉框辅助样式 */
.staff-suggestion-name {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.staff-suggestion-department {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

/* 加载和空状态样式 */
.text-center.py-4 {
    text-align: center;
    padding: 1.5rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.display-4 {
    font-size: 2.5rem;
}

/* ===== 库存颜色标示样式 ===== */
/* 参考contract_sales_out.php的库存颜色标示实现 */
.stock-status {
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.stock-normal {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.stock-warning {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.stock-danger {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* 新增样式：优化模态框布局 */
.modal-body .row {
    margin-bottom: 0.5rem;
}

.modal-body .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.modal-body .form-control {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
}

.modal-body .col-md-3, 
.modal-body .col-md-4 {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

/* ===== 表格字体大小优化 ===== */
/* 统一所有合同模块表格字体大小 - 基于contract_list.php标准 */
/* 修改上方:root中的变量值可统一调整所有表格字体大小 */

.table-container table,
.record-table table {
    font-size: var(--table-font-size);
}

.table-container table th,
.record-table table th {
    font-size: var(--table-th-font-size);
    font-weight: var(--table-th-font-weight);
    padding: var(--table-th-padding);
    background-color: var(--light-bg);
}

.table-container table td,
.record-table table td {
    font-size: var(--table-td-font-size);
    padding: var(--table-td-padding);
    vertical-align: middle;
}

.table-container .serial-number {
    text-align: center;
    color: var(--text-secondary);
}

.table-container .client-info,
.table-container .product-info {
    font-size: var(--table-font-size);
    line-height: 1.4;
}

.table-container .client-info div {
    margin-bottom: 2px;
}

.table-container .badge,
.record-table .badge {
    font-size: var(--table-badge-font-size);
    padding: 0.35em 0.65em;
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

.table-container .text-muted,
.table-container .info-details,
.table-container small,
.record-table .text-muted,
.record-table .info-details,
.record-table small {
    font-size: var(--table-info-font-size);
}

.table-container .fw-bold,
.record-table .fw-bold {
    font-size: var(--table-font-size);
}

.record-table table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===== 卡片样式 ===== */
.contract-card,
.sales-item-card,
.type-card,
.search-card {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.contract-card:hover,
.sales-item-card:hover,
.type-card:hover {
    transform: translateY(-5px);
}

.contract-card-header,
.type-card-header {
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

.search-header {
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

.contract-content,
.type-content {
    padding: 15px;
    min-height: 120px;
}

/* ===== 合同信息样式 ===== */
.contract-amount {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.contract-no {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

/* ===== 页面头部样式优化 ===== */
/* 恢复原始的Bootstrap page-header样式 */

/* ===== 卡片标题样式优化 ===== */
/* 参考contract_form.php的卡片标题样式 */
.detail-header {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.detail-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--primary-color);
}

.detail-header h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--primary-color);
}

/* ===== 通用工具类 ===== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

.border-primary { border-color: var(--primary-color) !important; }
.border-secondary { border-color: var(--secondary-color) !important; }
.border-success { border-color: var(--success-color) !important; }
.border-danger { border-color: var(--danger-color) !important; }
.border-warning { border-color: var(--warning-color) !important; }
.border-info { border-color: var(--info-color) !important; }

/* ===== 操作按钮组 ===== */
.contract-actions,
.type-actions,
.action-btn-group {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    overflow-x: auto;
    max-width: 100%;
}

.table-container .action-btn-group,
.record-table .action-btn-group {
    margin-top: 0;
}

.action-btn-group .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
}

.action-btn-group .btn-group .btn {
    border-radius: 0;
    margin: 0;
    padding: 0.35rem 0.4rem;
    font-size: 0.7rem;
    flex-direction: column;
    line-height: 1.2;
}

.action-btn-group .btn-group .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.action-btn-group .btn-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.action-btn-group .btn-group .btn:not(:last-child) {
    border-right: none;
}

.action-btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    vertical-align: middle;
}

.action-btn-group .btn i {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

/* ===== 空状态样式 ===== */
.empty-contracts,
.empty-type {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.empty-contracts i,
.empty-type i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 15px;
}

/* ===== 表格样式 ===== */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow-light);
    overflow: hidden;
}

.table-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.table-header h6 {
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
}

.table-header h6 i {
    flex-shrink: 0;
}

.table-header > div {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-shrink: 0;
}

.table-header .btn-sm {
    white-space: nowrap;
    flex-shrink: 0;
}

.table-header span {
    white-space: nowrap;
    flex-shrink: 0;
}

.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* ===== 搜索框样式 ===== */
.search-box,
.search-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e3e6f0;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.search-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    min-height: 68px;
    border-radius: 10px 10px 0 0 !important;
}

.search-header > div:first-child {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.search-header h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-header h6 i {
    margin-right: 0.5rem;
    color: #4e73df;
    flex-shrink: 0;
}

.search-header .btn {
    flex-shrink: 0;
}

.search-body {
    padding: 28px 32px;
}

/* ===== 搜索框标题右侧按钮统一样式 ===== */
.search-header .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    line-height: 1.2;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.search-header .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.search-header .btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2e59d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(78, 115, 223, 0.3);
}

.search-header .btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.search-header .btn-success:hover {
    background-color: #17a673;
    border-color: #17a673;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(28, 200, 138, 0.3);
}

.search-header .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.search-header .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.search-header .btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-color: transparent;
}

.search-header .btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

/* 按钮图标样式 */
.search-header .btn i {
    font-size: 0.9rem;
    margin-right: 0.375rem;
}

/* ===== 搜索框响应式优化 ===== */
@media (max-width: 1200px) {
    .search-header {
        padding: 18px 24px;
        min-height: 60px;
    }
    
    .search-header h6 {
        font-size: 1rem;
    }
    
    .search-body {
        padding: 20px 24px;
    }
}

@media (max-width: 992px) {
    .search-box,
    .search-card {
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    .search-header {
        padding: 16px 20px;
        min-height: 56px;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .search-header h6 {
        font-size: 0.95rem;
        white-space: nowrap;
    }
    
    .search-header > div:first-child {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .search-body {
        padding: 18px 20px;
    }
    
    .search-header .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        min-height: 40px;
        align-self: flex-end;
    }
    
    .search-header .btn i {
        font-size: 0.9rem;
        margin-right: 0.4rem;
    }
}

@media (max-width: 768px) {
    .search-header {
        padding: 14px 16px;
        min-height: 52px;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .search-header > div:first-child {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .search-header h6 {
        white-space: nowrap;
    }
    
    .search-body {
        padding: 16px;
    }
    
    .search-header .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        min-height: 36px;
        width: auto !important;
        flex-shrink: 0;
        justify-content: center;
    }
    
    .search-header .btn i {
        font-size: 0.85rem;
        margin-right: 0.3rem;
    }
    
    .search-form .form-label {
        font-size: 0.85rem;
    }
    
    .search-form .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1;
}

.search-form {
    margin: 0;
    padding: 1.5rem;
    background-color: #fff;
}

.search-form .row {
    margin-left: -4px;
    margin-right: -4px;
}

.search-form .col-md-5,
.search-form .col-md-4,
.search-form .col-md-3,
.search-form .col-md-2 {
    padding-left: 4px;
    padding-right: 4px;
}

.search-form .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ===== 状态样式 ===== */
.status-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.status-pending {
    background-color: var(--warning-color);
    color: #856404;
}

.status-approved {
    background-color: var(--success-color);
    color: #ffffff;
}

.status-completed {
    background-color: var(--primary-color);
    color: #ffffff;
}

.status-refunded {
    background-color: var(--danger-color);
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(231, 74, 59, 0.2);
}

/* ===== 交付信息检查项状态样式 ===== */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: var(--border-radius);
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

/* ===== 支付方式状态徽章样式 ===== */
.badge-active {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f5132;
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(25, 135, 84, 0.2);
    transition: all 0.2s ease;
}

.badge-active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #198754;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.badge-inactive {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    color: #842029;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.2);
    transition: all 0.2s ease;
}

.badge-inactive::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #dc3545;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ===== 交付单详情样式 ===== */
.detail-row {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-bg);
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* ===== 检查项编号样式 ===== */
.clause-number {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== 筛选按钮样式 ===== */
.status-filter-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.status-filter-btn.status-pending {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.status-filter-btn.status-pending:hover,
.status-filter-btn.status-pending.active {
    background-color: var(--warning-color);
    color: #ffffff;
}

.status-filter-btn.status-approved {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status-filter-btn.status-approved:hover,
.status-filter-btn.status-approved.active {
    background-color: var(--success-color);
    color: #ffffff;
}

.status-filter-btn.status-completed {
    background-color: #cce7ff;
    border-color: #b8daff;
    color: #004085;
}

.status-filter-btn.status-completed:hover,
.status-filter-btn.status-completed.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

.status-filter-btn.status-refunded {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.status-filter-btn.status-refunded:hover,
.status-filter-btn.status-refunded.active {
    background-color: var(--danger-color);
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(231, 74, 59, 0.2);
}

/* ===== 表单组件样式 ===== */
.form-section {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.form-section-title i {
    margin-right: 10px;
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* ===== 客户类型切换器 ===== */
.client-type-toggle {
    display: flex;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.client-type-toggle label {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0;
}

.client-type-toggle input[type="radio"] {
    display: none;
}

.client-type-toggle input[type="radio"]:checked + span {
    background-color: var(--primary-color);
    color: white;
}

.client-type-toggle span {
    display: block;
    padding: 0.5rem;
    border-radius: 5px;
}

/* ===== 销售物品样式 ===== */
.sales-item-row {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.sales-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sales-item-total {
    background-color: #e9f7ef;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #d1f2e5;
}

/* ===== 产品列表样式 ===== */
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.searchable-input {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-suggestion:hover {
    background-color: #f5f5f5;
}

.selected-count {
    font-size: 0.9rem;
    color: #6c757d;
}

/* ===== 通用搜索模态框样式 ===== */
.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.search-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-modal-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    min-height: 100px;
}

.search-modal-container > div {
    width: 100%;
    box-sizing: border-box;
}

.search-modal-container #contractSearchLoading,
.search-modal-container #clientSearchLoading {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    box-sizing: border-box;
}

.search-modal-container #contractSearchNoResults,
.search-modal-container #clientSearchNoResults {
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    box-sizing: border-box;
}

.search-modal-container #contractSearchResults,
.search-modal-container #clientSearchResults {
    width: 100%;
}

.search-modal-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.search-modal-item:last-child {
    border-bottom: none;
}

.search-modal-item:hover {
    background-color: #f8f9fa;
}

.search-modal-checkbox {
    margin-right: 15px;
    flex-shrink: 0;
}

.search-modal-info {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.search-modal-name {
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-modal-details {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-modal-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-modal-action {
    margin-left: 15px;
    flex-shrink: 0;
}

/* ===== 合同搜索项样式 ===== */
.contract-item.search-modal-item,
.client-item.search-modal-item,
.product-item.search-modal-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.contract-item.search-modal-item:last-child,
.client-item.search-modal-item:last-child,
.product-item.search-modal-item:last-child {
    border-bottom: none;
}

.contract-item.search-modal-item:hover,
.client-item.search-modal-item:hover,
.product-item.search-modal-item:hover {
    background-color: #f8f9fa;
}

.contract-checkbox.search-modal-checkbox,
.client-checkbox.search-modal-checkbox,
.product-checkbox.search-modal-checkbox {
    margin-right: 15px;
    flex-shrink: 0;
}

.contract-info.search-modal-info,
.client-info.search-modal-info,
.product-info.search-modal-info {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.contract-name.search-modal-name,
.client-name.search-modal-name,
.product-name.search-modal-name {
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-break: break-word;
}

.contract-details.search-modal-details,
.client-details.search-modal-details,
.product-details.search-modal-details {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    word-break: break-word;
}

.contract-detail.search-modal-detail,
.client-detail.search-modal-detail,
.product-detail.search-modal-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contract-action.search-modal-action,
.client-action.search-modal-action,
.product-quantity.search-modal-action {
    margin-left: 15px;
    flex-shrink: 0;
}

/* ===== 客户类型徽章样式 ===== */
.client-type-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.client-type-badge.company {
    background: linear-gradient(135deg, #4e73df, #2e59d9);
    color: white;
}

.client-type-badge.individual {
    background: linear-gradient(135deg, #1cc88a, #17a673);
    color: white;
}

/* ===== 模态框样式 ===== */
/* ===== 移除与全局style.css冲突的z-index定义 ===== */

/* ===== 模态框样式 - 确保模态框显示在最前面 ===== */
.modal {
    z-index: 999999 !important;
}

.modal-backdrop {
    z-index: 999998 !important;
}

.modal-dialog {
    z-index: 999999 !important;
}

.modal-content {
    z-index: 9999999 !important;
    border-radius: 10px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 显示/隐藏状态 */
.course-search-dropdown.show,
#recruitmentTeacherSuggestions.show,
#batchRecruitmentTeacherSuggestions.show,
.staff-suggestions.show {
    display: block;
}

/* 下拉框标题粘性定位 */
.course-search-dropdown .dropdown-header {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 下拉内容区域 */
.course-search-dropdown .dropdown-content {
    max-height: 380px;
    overflow-y: auto;
}

/* 客户搜索模态框样式 */
#clientSearchModal .modal-dialog {
    max-width: 900px;
}

#clientSearchModal .modal-body {
    padding: 1.5rem;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #4a4a4a;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    border-radius: 0 0 10px 10px;
}

/* ===== 工具类样式 ===== */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

.required-label::after {
    content: " *";
    color: var(--danger-color);
}

.client-match {
    background-color: #d4edda !important;
}

.client-mismatch {
    background-color: #f8d7da !important;
}

/* ===== 表格样式增强 ===== */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow-light);
    overflow: hidden;
}

.table-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.table-header h6 {
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
}

.table-header h6 i {
    flex-shrink: 0;
}

.table-header > div {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-shrink: 0;
}

.table-header .btn-sm {
    white-space: nowrap;
    flex-shrink: 0;
}

.table-header span {
    white-space: nowrap;
    flex-shrink: 0;
}

.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

.serial-number {
    text-align: center;
    color: var(--text-secondary);
}

/* ===== 状态徽章样式 ===== */
.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 20px;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--danger-color);
}

/* ===== 交付信息检查项样式 ===== */
.delivery-grid-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.delivery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.delivery-item {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}

.delivery-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.clause-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
    min-width: 2rem;
}

.delivery-item .form-check {
    margin-bottom: 0;
}

.delivery-item .form-check-input {
    margin-right: 0.5rem;
}

.delivery-item .form-check-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 飞手贷绑定容器样式 */
#delivery-loan-container {
    margin-top: 0.5rem;
}

#delivery-loan-container .delivery-item {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

#delivery-loan-container .delivery-item:hover {
    background-color: #fff8e1;
    border-color: #ffd966;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .delivery-item {
        min-width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .delivery-item .form-check {
        align-self: flex-end;
    }
    
    .delivery-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* 表单操作按钮移动端优化 */
    .card-body .d-flex.gap-3 .btn-lg {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-body .d-flex.gap-3 .btn-lg i {
        font-size: 0.875rem;
    }
    
    .card-body .d-flex.gap-3 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .card-body .d-flex.gap-3 .btn-lg.flex-fill {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
    }
}

/* 条款行样式 */
.clause-line {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== 从contract1.css合并的样式 ===== */

/* 选中合同项样式 - 优化版（更紧凑美观） */
.selected-contract-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    margin-bottom: 15px;
    background-color: transparent;
    border-radius: 0;
    border: none;
    transition: all 0.3s ease;
    box-shadow: none;
}

.selected-contract-item:hover {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

.selected-contract-item .remove-contract {
    padding: 0;
    font-size: 16px;
    margin-left: 12px;
    align-self: flex-start;
    color: #dc3545;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.selected-contract-item .remove-contract:hover {
    opacity: 1;
}

.selected-contract-item strong {
    display: block;
    font-size: 16px;
    color: #4e73df;
    margin-bottom: 10px;
    font-weight: 600;
}

.selected-contract-item .client-info {
    margin-bottom: 15px;
    line-height: 1.5;
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.selected-contract-item .client-info strong {
    font-size: 14px;
    color: #2e3a59;
    margin-bottom: 8px;
    font-weight: 600;
    display: block;
}

.selected-contract-item .client-info .company-name {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2e3a59;
    font-weight: 600;
}

.selected-contract-item .client-info .client-name {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2e3a59;
    font-weight: 600;
}

.selected-contract-item .client-info .info-item {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f8f9fa;
    display: block;
    background-color: transparent;
    font-size: 14px;
    color: #6c757d;
}

.selected-contract-item .client-info .info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.selected-contract-item .client-info .purchaser-info,
.selected-contract-item .client-info .contact-info,
.selected-contract-item .client-info .client-contact,
.selected-contract-item .client-info .loan-info,
.selected-contract-item .client-info .loan-type {
    margin-bottom: 6px;
    padding: 4px 0;
    border-bottom: none;
    display: block;
    background-color: transparent;
    font-size: 14px;
    color: #495057;
}

.selected-contract-item .client-info .purchaser-info:last-child,
.selected-contract-item .client-info .contact-info:last-child,
.selected-contract-item .client-info .client-contact:last-child,
.selected-contract-item .client-info .loan-info:last-child,
.selected-contract-item .client-info .loan-type:last-child {
    margin-bottom: 0;
}

.selected-contract-item .client-info .loan-info {
    font-weight: 600;
    color: #28a745;
}

.selected-contract-item .client-info .loan-type {
    font-weight: 600;
    color: #17a2b8;
}

.selected-contract-item .client-info .purchaser-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.selected-contract-item .client-info .separator {
    color: #dee2e6;
    font-weight: 300;
    margin: 0 4px;
}

/* 统一客户信息横向排列样式 */
.selected-contract-item .unified-info-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 6px;
    padding: 8px 0;
    border-top: 1px solid #f8f9fa;
    font-size: 14px;
    line-height: 1.4;
}

.selected-contract-item .unified-info-row .info-item {
    font-size: 14px;
    color: #495057;
    white-space: nowrap;
    padding: 2px 0;
    margin: 0 8px 0 0;
}

.selected-contract-item .unified-info-row .info-item.name-info {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.selected-contract-item .unified-info-row .info-item.purchaser-info {
    color: #6c757d;
    font-weight: 500;
}

.selected-contract-item .unified-info-row .info-item.contact-info {
    color: #0d6efd;
    font-weight: 500;
}

.selected-contract-item .unified-info-row .info-item.loan-info {
    color: #28a745;
    font-weight: 600;
}

.selected-contract-item .unified-info-row .separator {
    color: #dee2e6;
    font-weight: 300;
    margin: 0 8px;
    font-size: 14px;
}

/* 响应式设计：小屏幕时换行显示 */
@media (max-width: 768px) {
    .selected-contract-item .unified-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .selected-contract-item .unified-info-row .separator {
        display: none;
    }
    
    .selected-contract-item .unified-info-row .info-item {
        margin: 0;
        white-space: normal;
    }
}

.selected-contract-item .contract-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-contract-item .contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.selected-contract-item .contract-header strong {
    margin-bottom: 0;
    font-size: 16px;
    color: #4e73df;
}

.selected-contract-item .client-details {
    background-color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.selected-contract-item .client-type-info {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    background-color: #e9ecef;
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-block;
    margin: 0;
}

.selected-contract-item .loan-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #28a745;
    font-size: 13px;
}

.selected-contract-item .loan-type {
    font-size: 11px;
    color: #4e73df;
    font-weight: 500;
}

.contract-search-results {
    max-height: 300px;
    overflow-y: auto;
}

.contract-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.contract-item:hover {
    background-color: #f8f9fa;
}

.contract-item.selected {
    background-color: #e3f2fd;
}

.contract-info {
    font-size: 0.875rem;
    color: #6c757d;
}

.client-info-required {
    border: 1px solid #dc3545;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: #fff5f5;
}

.toast-container {
    z-index: 1090;
}

/* 库存状态样式 */
.stock-status {
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.stock-normal {
    background-color: #d1e7dd;
    color: #0f5132;
}

.stock-warning {
    background-color: #fff3cd;
    color: #856404;
}

.stock-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* 产品列表样式 */
.product-list-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
}

.product-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.product-item:last-child {
    border-bottom: none;
}

.product-item:hover {
    background-color: #f8f9fa;
}

.product-checkbox {
    margin-right: 15px;
}

.product-info {
    flex-grow: 1;
}

.product-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.product-details {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #6c757d;
}

.product-quantity {
    width: 100px;
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.selected-count {
    font-weight: 500;
    color: #0d6efd;
}

.no-products {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.product-item.highlight {
    background-color: #e8f4ff;
}

/* 编辑模式样式 */
.item-quantity, .item-price {
    width: 80px;
}

.item-amount {
    font-weight: 500;
    color: #0d6efd;
}

.editable-item {
    transition: background-color 0.3s;
}

.editable-item:focus {
    background-color: #f8f9fa;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 销售人员搜索样式 */
.staff-select-container {
    position: relative;
}

.staff-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.staff-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.staff-option:hover, .staff-option.selected {
    background-color: #e9ecef;
}

.staff-option:last-child {
    border-bottom: none;
}

/* ===== 排序徽章样式 ===== */
.bg-info {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== 分页样式 ===== */
.pagination-section {
    padding: 20px 0;
}

.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.page-link:hover {
    color: #224abe;
    background-color: #eaecf4;
    border-color: #dddfeb;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: #858796;
    background-color: #fff;
    border-color: var(--border-color);
}

.per-page-selector {
    width: auto;
    display: inline-block;
}

/* ===== 搜索框样式增强 ===== */
.search-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.search-form .input-group {
    min-width: 120px;
}

.search-form .col-md-2 .input-group {
    min-width: 100px;
}

.search-form .col-md-4 .input-group {
    min-width: 200px;
}

.search-form .btn-group {
    min-width: 150px;
}

/* 业务员搜索下拉菜单样式 */
.staff-search-container {
    position: relative;
}

/* ===== 状态筛选按钮样式增强 ===== */
.status-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.status-filter-btn {
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
}

.status-filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ======== 公共表单输入框样式 ======== */
/* 统一输入框组样式 */
.uniform-input-group {
    width: 100%;
}

.uniform-input-group .input-group-text {
    font-size: 0.875rem;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.uniform-input-group .input-group-text.required-label::after {
    content: '*';
    color: #dc3545;
    margin-left: 2px;
}

.uniform-input-group input,
.uniform-input-group select,
.uniform-input-group textarea {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    border: 1px solid #ced4da;
}

.uniform-input-group input:focus,
.uniform-input-group select:focus,
.uniform-input-group textarea:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.uniform-input-group input[readonly],
.uniform-input-group select[readonly],
.uniform-input-group textarea[readonly] {
    background-color: #f8f9fa;
}

/* 统一文件上传样式 */
.uniform-file-upload {
    position: relative;
    width: 100%;
}

.uniform-file-upload input[type="file"] {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    cursor: pointer;
}

.uniform-file-upload input[type="file"]:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.uniform-file-upload input[type="file"]::file-selector-button {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.uniform-file-upload input[type="file"]::file-selector-button:hover {
    background-color: #dee2e6;
}

/* 带标签的文件上传样式 */
.uniform-file-upload-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.uniform-file-upload-wrapper .input-group-text {
    font-size: 0.875rem;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.uniform-file-upload-wrapper input[type="file"] {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0 0.375rem 0.375rem 0;
    background-color: #fff;
    cursor: pointer;
    flex: 1;
}

.uniform-file-upload-wrapper input[type="file"]:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.uniform-file-upload-wrapper input[type="file"]::file-selector-button {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.uniform-file-upload-wrapper input[type="file"]::file-selector-button:hover {
    background-color: #dee2e6;
}

/* 基本信息输入框组样式 */
.basic-info-input-group {
    width: 100%;
    margin-bottom: 1rem;
}

.basic-info-input-group .input-group-text {
    font-size: 0.875rem;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    display: flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
}

.basic-info-input-group .input-group-text.required-label::after {
    content: '*';
    color: #dc3545;
    margin-left: 2px;
}

.basic-info-input-group input,
.basic-info-input-group select {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 0.75rem;
    min-height: 38px;
    border: 1px solid #ced4da;
}

.basic-info-input-group input:focus,
.basic-info-input-group select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.basic-info-input-group input[readonly] {
    background-color: #f8f9fa;
}

/* ==================== 图片预览通用样式 ==================== */

.invoice-preview-container {
    display: inline-block;
}

.invoice-thumbnail {
    transition: transform 0.2s ease;
}

.invoice-thumbnail:hover {
    transform: scale(1.1);
}

/* 图片放大查看模态框 */
#invoiceImageViewModal .modal-content {
    background: transparent;
    border: none;
}

#invoiceImageViewModal .modal-header {
    border: none;
    padding: 0 0 10px 0;
    position: relative;
    z-index: 10;
}

#invoiceImageViewModal .modal-header .btn-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #fff !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1056;
}

#invoiceImageViewModal .modal-header .btn-close:hover {
    background-color: #f0f0f0 !important;
    opacity: 1;
}

#invoiceImageViewModal .modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    min-height: 60vh;
}

#invoiceImageViewModal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}