/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    line-height: 1.6;
}

/* 应用内页布局：主区撑满视窗，页脚始终在底部（与首页内容多少无关） */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.app-layout main.main-content-wrap {
    flex: 1;
}

/* 导航栏样式（商务色系：深蓝，固定顶部） */
.navbar {
    background: #1e3a5f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}
.navbar.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }

/* 主内容区为固定导航预留顶部空间 */
.pt-navbar { padding-top: 64px; }

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s ease;
}
.navbar-brand:hover { opacity: 0.9; }

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 6px;
    position: relative;
}
.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
    border-left: 3px solid rgba(255,255,255,0.6);
    padding-left: calc(1rem - 3px);
}

/* 主操作「创建合同」高亮 */
.navbar-nav .nav-link.nav-cta:not(.active) {
    background: rgba(255,255,255,0.1);
}
.navbar-nav .nav-link.nav-cta:hover { background: rgba(255,255,255,0.18); }
.navbar-nav .nav-link.nav-cta.active { border-left-color: #fbbf24; }

/* 菜单分组分隔（业务 / 管理） */
.navbar-nav .nav-divider {
    list-style: none;
    width: 1px;
    min-width: 1px;
    margin: 0.35rem 0.25rem;
    padding: 0 !important;
    background: rgba(255,255,255,0.3);
    align-self: stretch;
    pointer-events: none;
    flex: 0 0 1px;
}
@media (max-width: 991px) {
    .navbar-nav .nav-divider {
        width: calc(100% - 2rem);
        min-width: auto;
        height: 1px;
        flex: 0 0 1px;
        margin: 0.5rem 1rem;
    }
}

/* 用户下拉菜单样式 */
.nav-dropdown {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 0.5rem;
    margin-top: 0.25rem;
}
.nav-dropdown .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
}
.nav-dropdown .dropdown-item:hover {
    background: #f1f5f9;
}
.nav-dropdown .dropdown-divider { margin: 0.5rem 0; }

/* 导航可访问性：键盘焦点 */
.navbar-nav .nav-link:focus-visible,
.navbar-toggler:focus-visible {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

/* 主容器（仅用于未使用 container-fluid 的页面） */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

/* 页面标题栏：与「企业信息」一致，图标+文字，字号适中 */
.page-header h1,
.d-flex.justify-content-between.align-items-center.mb-4 > h1 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* 卡片样式（与首页紧凑风格一致） */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 16px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card-header {
    background: #1e3a5f;
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-header h4,
.card-header .mb-0 {
    font-size: 0.95rem;
    font-weight: 600;
}

.card-body {
    padding: 16px;
}

/* 个人资料页：商务风格 */
.profile-card .card-header {
    background: #1e3a5f;
    color: #fff;
}
.profile-field {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #334155;
}
.profile-balance {
    color: #1e4976 !important;
}

/* 合同历史页：统计信息卡片紧凑 */
.contract-stats-row {
    margin-bottom: 12px;
}
.contract-stat-card .card-body {
    padding: 10px 8px;
}
.contract-stat-icon {
    font-size: 1.15rem;
    display: block;
    margin-bottom: 4px;
}
.contract-stat-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.contract-stat-label {
    font-size: 0.75rem;
    color: #64748b !important;
    margin-top: 2px;
}

/* 合同历史列表样式 */
.contract-result-bar {
    padding: 10px 14px;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 8px;
    font-size: 0.9rem;
}

.contract-history-card .card-body.p-0 {
    padding: 0 !important;
}

.contract-history-table {
    font-size: 0.9rem;
}

.contract-history-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.contract-history-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.contract-history-table .main-row {
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contract-history-table .main-row:hover {
    background: #f8fafc;
}

.contract-history-table .main-row td {
    border-bottom: 1px solid #e2e8f0;
}

.contract-history-table .chain-row td {
    background: #fafbfc;
    color: #64748b;
}

.contract-history-table .chain-row:hover td {
    background: #f4f6f8;
}

.contract-history-table .toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.contract-history-table .main-row:hover .toggle-btn {
    background: #1e4976;
    color: #fff;
}

.contract-history-table .contract-no {
    font-weight: 600;
    color: #1e293b;
}

.contract-history-table .project-name {
    font-weight: 500;
    color: #334155;
}

.contract-history-table .party-name {
    font-weight: 500;
    color: #334155;
}

.contract-history-table .amount-cell {
    font-weight: 600;
    color: #1e4976;
    font-size: 0.95rem;
}

.contract-history-table .badge-type {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
    padding: 3px 8px;
}

.contract-history-table .chain-indent {
    padding-left: 40px !important;
}

/* 首页使用流程卡片：紧凑字号与间距 */
.index-steps-card .card-header {
    padding: 10px 16px;
}
.index-steps-card .card-header h4 {
    font-size: 1rem;
    font-weight: 600;
}
.index-steps-card .card-body {
    padding: 14px 16px;
}

/* 按钮样式（紧凑） */
.btn {
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-lg {
    padding: 0.5rem 1.1rem;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: #1e4976;
    border: none;
}

.btn-primary:hover {
    background: #163a61;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 73, 118, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: none;
}

/* 表单样式（紧凑） */
.form-control {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #1e4976;
    box-shadow: 0 0 0 3px rgba(30, 73, 118, 0.12);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 4px;
}

.form-text {
    font-size: 0.8rem;
}

/* 表格样式（紧凑） */
.table {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    font-size: 0.875rem;
}

.table thead th {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.table tbody td {
    padding: 8px 12px;
    border-color: #e2e8f0;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* 待办管理页：与其它管理页风格统一 */
.todo-filter-btn {
    font-weight: 500;
    border-color: #cbd5e1;
    color: #475569;
}
.todo-filter-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e3a5f;
}
.todo-filter-btn.active {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}
.card-header .todo-type-filter {
    border-color: rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.card-header .todo-type-filter:hover {
    background-color: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.card-header .todo-type-filter.active {
    background-color: rgba(255,255,255,0.22);
    border-color: #fff;
    color: #fff;
}
.todo-list-table .badge-type {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
    font-size: 0.8rem;
}
.todo-list-table .btn-sm {
    font-size: 0.8rem;
}
/* 移动设备隐藏业务信息列 */
@media (max-width: 767px) {
    .todo-list-table .todo-business-col {
        display: none !important;
    }
}

/* 步骤指示器（首页使用流程） */
.steps {
    display: flex;
    justify-content: space-between;
    margin: 18px 0;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e1e5e9;
    z-index: 1;
}

.step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #1e4976;
    color: white;
    transform: scale(1.05);
}

.step-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.step.active .step-label {
    color: #1e4976;
    font-weight: 600;
}

/* 首页样式（商务色系，紧凑字号与间距） */
.hero-section {
    background: #1e3a5f;
    color: white;
    padding: 20px 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.05"><path d="M0 70 Q250 30 500 70 T1000 70 V100 H0 Z"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-section h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    color: #fff;
}

.hero-section p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-section .btn {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.hero-section .btn {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.hero-section .btn-light {
    background: #fff;
    color: #1e3a5f;
    border: none;
}
.hero-section .btn-light:hover {
    background: #f1f5f9;
    color: #1e3a5f;
    transform: translateY(-1px);
}
.hero-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.feature-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: #1e4976;
}

.feature-card h3 {
    color: #334155;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 14px;
}

.feature-card .btn {
    font-size: 0.875rem;
    padding: 0.35rem 0.85rem;
}

/* 导航栏移动端 */
@media (max-width: 991px) {
    .navbar-collapse { transition: height 0.3s ease; }
    .nav-user-name { max-width: 120px !important; }
}
@media (max-width: 768px) {
    .pt-navbar { padding-top: 56px; }
    .navbar .container-fluid { padding-left: 1rem; padding-right: 1rem; }
    .nav-user-name { max-width: 100% !important; }
    .profile-field { padding: 6px 10px; font-size: 0.9rem; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero-section h1 {
        font-size: 1.35rem;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .steps::before {
        display: none;
    }

    /* 企业列表：移动端卡片式 */
    .company-list-table thead { display: none; }
    .company-list-table,
    .company-list-table tbody,
    .company-list-table tr,
    .company-list-table td { display: block; }
    .company-list-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .company-list-table td {
        padding: 6px 0;
        border: none;
    }
    .company-list-table td[data-label="公司名称"] {
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 8px;
    }
    .company-list-table .company-name {
        font-size: 1rem;
        color: #1e293b;
    }
    .company-list-table .address-text {
        display: block;
        margin-top: 4px;
        font-size: 0.85rem;
        color: #64748b;
    }
    .company-list-table .tax-code {
        font-size: 0.85rem;
        word-break: break-all;
        background: #f1f5f9;
        padding: 2px 6px;
        border-radius: 4px;
    }
    .company-list-table td[data-label="联系电话"] a {
        font-weight: 500;
        color: #1e4976;
    }
    .company-list-table td[data-label="操作"] {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #f1f5f9;
    }
    .company-list-table td[data-label="操作"] .btn {
        width: 100%;
    }
    .company-list-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.75rem;
        color: #64748b;
        margin-bottom: 2px;
    }
    .company-list-table td[data-label="公司名称"]::before {
        display: none;
    }
    .company-list-table td[data-label="操作"]::before {
        display: none;
    }

    /* 合同历史列表：移动端卡片式 */
    .contract-history-table thead { display: none; }
    .contract-history-table,
    .contract-history-table tbody,
    .contract-history-table tr,
    .contract-history-table td { display: block; }
    .contract-history-table .main-row {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .contract-history-table .main-row td {
        padding: 6px 0;
        border: none;
    }
    .contract-history-table .main-row td:first-child {
        display: none;
    }
    .contract-history-table .main-row td:nth-child(2) {
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 8px;
    }
    .contract-history-table .main-row td:nth-child(2)::before,
    .contract-history-table .main-row td:nth-child(3)::before,
    .contract-history-table .main-row td:nth-child(4)::before,
    .contract-history-table .main-row td:nth-child(5)::before,
    .contract-history-table .main-row td:nth-child(6)::before {
        display: block;
        font-weight: 600;
        font-size: 0.75rem;
        color: #64748b;
        margin-bottom: 2px;
    }
    .contract-history-table .main-row td:nth-child(2)::before { content: '合同编号'; }
    .contract-history-table .main-row td:nth-child(3)::before { content: '项目名称'; }
    .contract-history-table .main-row td:nth-child(4)::before { content: '合同类型'; }
    .contract-history-table .main-row td:nth-child(5)::before { content: '甲方 / 金额'; }
    .contract-history-table .main-row td:nth-child(6)::before { content: '总乙方 / 时间'; }
    .contract-history-table .main-row td:last-child {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #f1f5f9;
        display: flex;
        gap: 8px;
    }
    .contract-history-table .main-row td:last-child .btn {
        flex: 1;
    }
    .contract-history-table tr.chain-row {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        margin: 0 0 8px 12px;
        padding: 10px 14px;
        background: #f8fafc;
    }
    .contract-history-table .chain-row td {
        display: block;
        padding: 4px 0;
    }
    .contract-history-table .chain-row .chain-indent {
        display: none;
    }

    /* 项目类型列表：移动端卡片式 */
    .project-type-table thead { display: none; }
    .project-type-table,
    .project-type-table tbody,
    .project-type-table tr,
    .project-type-table td { display: block; }
    .project-type-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .project-type-table td {
        padding: 6px 0;
        border: none;
    }
    .project-type-table td[data-label="类型名称"] {
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 8px;
    }
    .project-type-table .project-type-name {
        font-size: 1rem;
        color: #1e293b;
    }
    .project-type-table .project-type-desc {
        font-size: 0.9rem;
        color: #64748b;
        line-height: 1.4;
        word-break: break-word;
        display: block;
    }
    .project-type-table td[data-label="操作"] {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #f1f5f9;
    }
    .project-type-table td[data-label="操作"] .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .project-type-table td[data-label="操作"] .btn {
        flex: 1;
        min-width: calc(33% - 4px);
    }
    .project-type-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.75rem;
        color: #64748b;
        margin-bottom: 2px;
    }
    .project-type-table td[data-label="类型名称"]::before,
    .project-type-table td[data-label="操作"]::before {
        display: none;
    }

    /* 合同模板列表：移动端卡片式 */
    .contract-template-table thead { display: none; }
    .contract-template-table,
    .contract-template-table tbody,
    .contract-template-table tr,
    .contract-template-table td { display: block; }
    .contract-template-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .contract-template-table td {
        padding: 6px 0;
        border: none;
    }
    .contract-template-table td[data-label="模板名称"] {
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 8px;
    }
    .contract-template-table .template-name {
        font-size: 1rem;
        color: #1e293b;
    }
    .contract-template-table .template-desc {
        font-size: 0.9rem;
        color: #64748b;
        line-height: 1.4;
        word-break: break-word;
        display: block;
    }
    .contract-template-table .template-filename {
        font-size: 0.85rem;
        word-break: break-all;
        background: #f1f5f9;
        padding: 2px 6px;
        border-radius: 4px;
    }
    .contract-template-table td[data-label="操作"] {
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #f1f5f9;
    }
    .contract-template-table td[data-label="操作"] .btn {
        width: 100%;
    }
    .contract-template-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.75rem;
        color: #64748b;
        margin-bottom: 2px;
    }
    .contract-template-table td[data-label="模板名称"]::before,
    .contract-template-table td[data-label="操作"]::before {
        display: none;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e4976;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功/错误消息（紧凑） */
.alert {
    border-radius: 6px;
    border: none;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* 键盘焦点可见（可访问性） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #1e4976;
    outline-offset: 2px;
}

/* 全局 Toast 与确认弹窗 */
#toastContainer .toast { font-size: 0.875rem; }
#confirmModal .modal-header,
#confirmModal .modal-footer { border-color: #e2e8f0; }
#confirmModalBody { white-space: pre-line; }

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e4976;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #163a61;
}

/* 进度指示器样式 */
.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.step-indicator.active {
    background: #1e4976;
    color: white;
    transform: scale(1.05);
}

.step-indicator.completed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step-indicator:last-child::after {
    display: none;
}

/* 进度条动画 */
.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* 模态框（紧凑） */
.modal-header {
    padding: 10px 16px;
    font-size: 0.95rem;
}
.modal-title {
    font-size: 1rem;
    font-weight: 600;
}
.modal-body {
    padding: 14px 16px;
    font-size: 0.9rem;
}
.modal-footer {
    padding: 10px 16px;
}
.modal-footer .btn {
    padding: 0.35rem 0.85rem;
}

/* 与表单配合的 input-group 紧凑 */
.input-group-text {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

/* 主内容区上间距略收（与整体紧凑一致） */
.app-layout main.main-content-wrap .container-fluid.mt-4 {
    margin-top: 14px !important;
}

/* 模态框动画 */
.modal.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .step-indicator {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}
