/* 全局 */
* {
    font-variant-emoji: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding-top: 56px;
    padding-bottom: 80px;
}

a {
    text-decoration: none;
    color: inherit;
}

.page-content {
    padding-bottom: 80px;
}

/* 顶部导航 */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 移动端底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 8px 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
}

.bottom-nav .nav-item {
    text-align: center;
    color: #999;
    font-size: 12px;
    flex: 1;
    padding: 4px 0;
}

.bottom-nav .nav-item.active {
    color: #198754;
}

.bottom-nav i {
    font-size: 20px;
    display: block;
    margin-bottom: 2px;
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    padding: 12px 16px;
}

.card-body {
    padding: 16px;
}

/* 数据卡片 */
.stat-card {
    text-align: center;
    padding: 16px 8px;
}

.stat-card i {
    font-size: 28px;
    color: #198754;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 阶段标签颜色 */
.stage-1 { background: #6c757d; }
.stage-2 { background: #0dcaf0; }
.stage-3 { background: #0d6efd; }
.stage-4 { background: #ffc107; }
.stage-5 { background: #198754; }
.stage-6 { background: #212529; }
.stage-7 { background: #198754; }
.stage-8 { background: #20c997; }
.stage-9 { background: #0d6efd; }
.stage-10 { background: #dc3545; }
.stage-11 { background: #198754; }
.stage-12 { background: #146c43; }
.stage-13 { background: #fd7e14; }
.stage-14 { background: #0d6efd; }
.stage-15 { background: #0dcaf0; }
.stage-16 { background: #6f42c1; }
.stage-17 { background: #6c757d; }

.badge-stage {
    color: #fff;
    font-weight: 500;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 优先级 */
.priority-1 { color: #dc3545; font-weight: bold; }
.priority-2 { color: #fd7e14; }
.priority-3 { color: #0d6efd; }
.priority-4 { color: #6c757d; }

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #198754;
}

.timeline-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.timeline-content {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.timeline-action {
    font-size: 12px;
    color: #198754;
    margin-bottom: 4px;
    font-weight: 500;
}

.timeline-next {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

/* 悬浮按钮 */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #198754;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
}

.fab:hover {
    color: white;
    background: #157347;
}

/* 列表项 */
.lead-item {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lead-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lead-item-name {
    font-weight: 600;
    font-size: 16px;
}

.lead-item-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.lead-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

/* Pipeline */
.pipeline-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    gap: 12px;
    align-items: flex-start;
}

.pipeline-column {
    min-width: 220px;
    max-width: 220px;
    max-height: calc(100vh - 160px);
    background: #f0f0f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.pipeline-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    flex-shrink: 0;
    padding: 2px 0;
}

.pipeline-column-count {
    background: #fff;
    color: #666;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    min-width: 24px;
    text-align: center;
}

.pipeline-leads {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

/* 自定义滚动条 */
.pipeline-leads::-webkit-scrollbar {
    width: 4px;
}

.pipeline-leads::-webkit-scrollbar-track {
    background: transparent;
}

.pipeline-leads::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 2px;
}

.pipeline-card {
    display: block;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    word-break: break-all;
    flex-shrink: 0;
}

.pipeline-card:hover {
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pipeline-card:active {
    transform: scale(0.99);
}

.pipeline-card-name {
    color: #333;
}

.pipeline-card-city,
.pipeline-card-days {
    color: #666;
    line-height: 1.4;
}

/* 表单 */
.form-label {
    font-weight: 500;
    font-size: 14px;
}

.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 2px;
}

/* 快捷入口 */
.quick-entry {
    text-align: center;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.quick-entry i {
    font-size: 24px;
    color: #198754;
    margin-bottom: 8px;
}

.quick-entry .label {
    font-size: 13px;
    color: #333;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
}

/* 个人中心 */
.profile-header {
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    padding: 32px 20px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 36px;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
}

.profile-role {
    font-size: 13px;
    opacity: 0.9;
}

/* 筛选面板 */
.filter-panel {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 进度条 */
.stage-progress {
    margin: 16px 0;
}

.stage-progress .progress {
    height: 8px;
    border-radius: 4px;
}

.stage-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* 通用 */
.text-muted {
    color: #999 !important;
}

.btn-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 998;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #333;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-size: 13px;
}

.info-value {
    color: #333;
    font-size: 13px;
    text-align: right;
}
