/* ============================================
   客户管理系统 - 精致科技感设计
   设计方向：精致科技感 + 数据可视化专业感
   ============================================ */

/* CSS Variables - 设计系统 */
:root {
    --primary-900: #0a1628;
    --primary-800: #0f2040;
    --primary-700: #142d5a;
    --primary-600: #1a3a74;
    --primary-500: #23488e;
    --primary-400: #3d6db5;
    
    --accent-500: #00b4d8;
    --accent-400: #48cae4;
    --accent-300: #90e0ef;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --font-display: 'Playfair Display', 'STSong', 'SimSun', serif;
    --font-body: 'Source Sans Pro', 'Microsoft YaHei', sans-serif;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --sidebar-width: 260px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--gray-50) 0%, #e0e7ef 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 58, 116, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

/* ============================================
   登录/注册页面
   ============================================ */
.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    z-index: 1;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(26, 58, 116, 0.9) 100%);
    z-index: -1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo-mark {
    font-size: 3rem;
    color: var(--accent-500);
    margin-bottom: var(--spacing-md);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gray-900);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xs);
}

.subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
    font-weight: 300;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.02em;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gray-50);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-500);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.btn-primary {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-500) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 180, 216, 0.3);
}

.btn-secondary {
    padding: 0.875rem 1.5rem;
    background: white;
    color: var(--primary-600);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    border-color: var(--accent-500);
    color: var(--accent-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--gray-500);
    font-size: 0.95rem;
}

.form-footer a {
    color: var(--accent-500);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   主应用布局
   ============================================ */
#main-app {
    min-height: 100vh;
}
#main-app.active {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-900) 0%, var(--primary-800) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-lg) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    margin: 0 var(--spacing-sm);
    border-radius: var(--radius-md);
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-500);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: rgba(0, 180, 216, 0.15);
}

.nav-item.active::before {
    height: 60%;
}

.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-400));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border-color: rgba(239, 68, 68, 0.5);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-2xl);
    position: relative;
    z-index: 1;
}

/* 页面切换 */
.page, .content-page {
    display: none;
}

.page.active, .content-page.active {
    display: block;
    animation: pageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 页面头部 */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header h2 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xs);
}

.page-description {
    color: var(--gray-500);
    font-size: 1rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-500), var(--primary-500));
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100), white);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* 快捷操作 */
.quick-actions {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.quick-actions h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--gray-50), white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
}

.action-btn:hover {
    border-color: var(--accent-500);
    color: var(--accent-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 2rem;
}

/* 表格控件 */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.search-box input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-body);
    width: 300px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.data-table th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.95rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* 表单样式 */
.customer-form {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.form-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-row:last-child {
    margin-bottom: 0;
}

.required {
    color: var(--danger);
}

.upload-shortcuts {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

/* 上传卡片 */
.upload-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.upload-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-card:hover {
    border-color: var(--accent-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
}

.upload-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.upload-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-xs);
}

.upload-hint {
    font-size: 0.875rem !important;
    color: var(--gray-400) !important;
}

.upload-card .btn-primary,
.upload-card .btn-secondary {
    margin-top: var(--spacing-lg);
}

/* 详情页面 */
.detail-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.detail-section {
    margin-bottom: var(--spacing-xl);
}

.detail-section h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--gray-100);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* 有复制按钮的 detail-item：value 行横向排列 */
.detail-item--copy {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.detail-value-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.detail-value-row .detail-value {
    flex: 1;
    min-width: 0;
}
/* 基本信息区一键复制按钮 */
.detail-copy-btn {
    flex-shrink: 0;
    background: #f0f4ff;
    border: 1.5px solid #c7d2fe;
    color: #4f46e5;
    border-radius: 5px;
    padding: 1px 7px;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1.7;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    min-width: 24px;
    text-align: center;
    outline: none;
}
.detail-copy-btn:hover  { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.detail-copy-btn:active { background: #c7d2fe; }

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1rem;
    color: var(--gray-900);
    font-weight: 500;
}

.bill-table-container {
    overflow-x: auto;
    margin-top: var(--spacing-lg);
}

.detail-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

/* 详情页补充证照上传条 */
.detail-cert-upload {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px dashed var(--gray-300);
    flex-wrap: wrap;
}
.detail-cert-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 6px;
}

/* 管理员页面 */
.admin-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--gray-200);
}

.tab-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--accent-500);
    border-bottom-color: var(--accent-500);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 200;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: var(--gray-50);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: var(--spacing-lg);
        padding-top: 60px;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .upload-container {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-actions,
    .detail-actions {
        flex-direction: column;
    }
    
    .upload-shortcuts {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: var(--spacing-xl);
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .customer-form {
        padding: var(--spacing-lg);
    }
    
    .detail-container {
        padding: var(--spacing-lg);
    }
}

/* 详情页面补充样式 */
.detail-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.bill-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.bill-summary-item {
    display: flex;
    gap: var(--spacing-sm);
}

.bill-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
}

.bill-value {
    font-size: 0.875rem;
    color: var(--gray-900);
    font-weight: 500;
}

.fee-detail {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

.fee-detail h4 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-lg);
}

.fee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.fee-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.fee-item-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.fee-item-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* ========== 账单详情展开面板 ========== */
.section-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f0f9ff;
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-view-bill {
    background: var(--primary) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    border: none !important;
    cursor: pointer !important;
}
.btn-view-bill:hover { opacity: 0.85; }

.fee-amount { color: #d4380d; font-weight: 700; }

.bill-detail-panel {
    margin-top: var(--spacing-xl);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f8faff;
}

.bill-detail-inner { padding: var(--spacing-xl); }

.bd-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid #e8ecf5;
}
.bd-section:last-child { border-bottom: none; margin-bottom: 0; }

.bd-section-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(90deg, #e3f2fd, transparent);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.bd-sub-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: var(--spacing-lg) 0 var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.bd-sub-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--secondary);
    border-radius: 2px;
}

.bd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-sm) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.bd-info { display: flex; flex-direction: column; gap: 2px; }
.bd-label { font-size: 0.78rem; color: var(--gray-500); font-weight: 600; }
.bd-val { font-size: 0.92rem; color: var(--gray-900); font-weight: 500; }

.bd-total-row {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #0a1628, #1a3a6e);
    border-radius: var(--radius-md);
}
.bd-total-item { text-align: center; flex: 1; }
.bd-total-num {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    font-family: var(--font-display);
    letter-spacing: -0.5px;
}
.bd-total-fee { color: #ffd54f; }
.bd-total-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

.bd-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}
.bd-analysis-item {
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}
.bd-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* 用能分析 —— 纵向排列 + 编号标题 */
.bd-analysis-grid-full {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.bd-analysis-block {
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}
.bd-analysis-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
}
.bd-heading-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #1a3a74, #00b4d8);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-body);
}
.bd-analysis-body {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.7;
}

/* 峰谷柱状图容器 */
.bd-chart-wrap {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #f8faff;
    border-radius: var(--radius-md);
    border: 1px solid #e3e8f0;
    height: 320px;
    position: relative;
}
.bd-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.bd-table-wrapper { overflow-x: auto; }
.bd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.bd-table th {
    background: #1a237e;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.8rem;
    white-space: nowrap;
}
.bd-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--gray-800);
    white-space: nowrap;
}
.bd-table tr:hover td { background: #f5f8ff; }
.bd-table-elec th, .bd-table-elec td { font-size: 0.8rem; padding: 6px 8px; }

.bd-row-main td:first-child { font-weight: 600; color: var(--gray-900); }
.bd-row-sub td:first-child { color: var(--gray-600); padding-left: 20px; font-size: 0.82rem; }
.bd-row-total td { font-weight: 700; background: #e8f5e9 !important; color: #2e7d32; }
.bd-neg { color: #d32f2f !important; }

.bd-price-type {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-sm);
}
.bd-rp-total {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-700);
}
.bd-rp-total strong { color: #d4380d; font-size: 1.1rem; }

.bd-pf-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: #fff8e1;
    border-radius: var(--radius-md);
    border: 1px solid #ffe082;
}
.bd-pf-item { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }

.bd-capacity-fee {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--gray-600);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.detail-item-full { grid-column: 1 / -1; }

/* 用电信息区块 */
/* (已迁移至 .ct-compact-* 紧凑布局) */

/* ========== 数据核验面板 ========== */
.verify-panel-container {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.vp-header {
    background: linear-gradient(135deg, #0a1628, #1a3a6e);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.vp-icon { font-size: 2rem; }
.vp-title { color: white; font-size: 1.2rem; font-weight: 700; margin: 0; }
.vp-subtitle { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin: 4px 0 0; }

.vp-body { padding: 24px 28px; background: #f8faff; }

.vp-score {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.vp-score-card {
    flex: 1;
    min-width: 140px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.vp-score-num {
    font-size: 2.4rem;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.vp-score-label { font-size: 0.8rem; color: #666; margin-top: 6px; }

.vp-score-card.all-pass .vp-score-num { color: #2e7d32; }
.vp-score-card.all-pass { border-left: 4px solid #2e7d32; }
.vp-score-card.has-issues .vp-score-num { color: #d32f2f; }
.vp-score-card.has-issues { border-left: 4px solid #d32f2f; }

.vp-section { margin-bottom: 20px; }
.vp-section:last-child { margin-bottom: 0; }
.vp-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: linear-gradient(90deg, #e8eaf6, transparent);
    border-left: 3px solid #1a237e;
    border-radius: 0 4px 4px 0;
}

.vp-check-list {
    display: grid;
    gap: 8px;
}

.vp-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.vp-check-item .check-icon { font-size: 1rem; flex-shrink: 0; }
.vp-check-item .check-name { flex: 1; color: #333; font-weight: 500; }
.vp-check-item .check-detail { color: #888; font-size: 0.78rem; font-family: monospace; }
.vp-check-item.pass { border-left: 3px solid #4caf50; }
.vp-check-item.fail { border-left: 3px solid #f44336; background: #fff5f5; }

.vp-all-clear {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    border: 2px solid #4caf50;
}

.vp-all-clear .big-check { font-size: 2.5rem; }
.vp-all-clear h5 { margin: 0; color: #2e7d32; font-size: 1.1rem; }
.vp-all-clear p { margin: 4px 0 0; color: #4caf50; font-size: 0.85rem; }

.btn-verify { background: linear-gradient(135deg, #00b4d8, #0096c7) !important; color: white !important; border: none !important; }
.btn-verify:hover { opacity: 0.9; transform: translateY(-1px); }

@media (max-width: 768px) {
    .vp-score { gap: 12px; }
    .vp-score-card { min-width: 100px; padding: 14px; }
    .vp-score-num { font-size: 1.8rem; }
    .vp-body { padding: 16px; }
    .vp-header { padding: 14px 18px; }

    .bd-chart-wrap { height: 260px; }
    .bd-analysis-block { padding: var(--spacing-md); }
    .bd-analysis-heading { font-size: 0.9rem; }
    .bd-analysis-body { font-size: 0.82rem; }
}

/* ===== 系统配置 - 字段选项编辑器 ===== */
.field-options-editor {
    max-width: 720px;
}
.fo-group {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.fo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--gray-800);
}
.fo-icon { font-size: 1.1rem; }
.fo-list { display: flex; flex-direction: column; gap: 6px; }
.fo-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fo-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.875rem;
    outline: none;
}
.fo-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26, 58, 116, 0.1); }
.fo-del {
    width: 32px; height: 32px;
    background: none; border: 1px solid var(--gray-300);
    border-radius: 4px; color: #e74c3c; cursor: pointer;
    font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.fo-del:hover { background: #fff5f5; border-color: #e74c3c; }
.fo-add {
    margin-top: 8px;
    font-size: 0.8rem;
    padding: 6px 14px;
}

@media (max-width: 768px) {
    .fo-group { padding: 12px; }
}

/* ===== 用户签约详情（紧凑布局） ===== */

/* 跟进进度 —— 表单内 */
/* ============================================
   用户签约详情 —— 卡片式重设计
   ============================================ */

/* ---- 外层容器 ---- */
.contract-wrap {
    background: linear-gradient(160deg, #f8faff 0%, #f0f4fb 100%) !important;
    border: 1px solid #e0e7f0 !important;
    border-radius: var(--radius-xl) !important;
    padding: 28px 24px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #e0e7f0 !important;
}

/* ---- 顶部标题栏 ---- */
.contract-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #dce4f0;
}
.contract-topbar-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-500) 0%, #1e88e5 100%);
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.25);
}
.contract-topbar h3 {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #1a237e !important;
    margin: 0 0 2px 0 !important;
    font-family: var(--font-body) !important;
}
.contract-topbar-desc {
    margin: 0; font-size: 0.875rem; color: var(--gray-500);
}

/* ---- 简约标题（签约用电信息等）---- */
.contract-section-title {
    font-family: var(--font-body) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #1a237e !important;
    margin: 0 0 22px 0 !important;
    padding-bottom: 14px;
    border-bottom: 2px dashed #dce4f0;
    letter-spacing: 0.02em;
}

/* ---- 卡片行布局 ---- */
.contract-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.ct-row-2col {
    grid-template-columns: 3fr 2fr;
}

/* ---- 单张卡片 ---- */
.ct-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e8edf5;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ct-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.ct-card-head {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 18px 10px;
    font-size: 0.9rem; font-weight: 700; color: var(--gray-700);
    letter-spacing: 0.02em;
}
.ct-card-body {
    padding: 0 18px 18px;
    display: flex; flex-direction: column; gap: 13px;
}

/* ---- 卡片圆点 ---- */
.ct-card-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.ct-dot-blue  { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.ct-dot-amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.ct-dot-green { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.ct-dot-purple{ background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.ct-dot-teal  { background: #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }
.ct-dot-rose  { background: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,0.15); }
.ct-dot-slate { background: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,0.15); }
.ct-dot-cyan  { background: #06b6d4; box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }

/* ---- 字段 ---- */
.ct-field {
    display: flex; flex-direction: column; gap: 5px;
}
.ct-label {
    font-size: 0.78rem; font-weight: 600; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.ct-field input[type="text"],
.ct-field input[type="tel"] {
    height: 42px; padding: 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem; font-family: var(--font-body);
    background: #fafbfc;
    transition: all 0.2s;
    width: 100%;
    outline: none;
}
.ct-field input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

/* ---- 自定义下拉选择器（解决"细长条"问题）---- */
.ct-select-wrap {
    position: relative;
    display: block;
}
.ct-select-wrap select {
    width: 100%; height: 42px;
    padding: 0 36px 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem; font-family: var(--font-body);
    background: #fafbfc;
    color: var(--gray-800);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s;
    outline: none;
}
.ct-select-wrap select:hover {
    border-color: #c4d0e0;
    background: #f4f6fa;
}
.ct-select-wrap select:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.ct-select-chevron {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-400);
    transition: transform 0.2s;
}
.ct-select-wrap select:focus + .ct-select-chevron {
    transform: translateY(-50%) rotate(180deg);
    color: #3b82f6;
}

/* ---- 日期选择器包装 ---- */
.ct-date-wrap {
    position: relative; display: block;
}
.ct-date-wrap input[type="date"],
.ct-date-wrap input[type="month"] {
    width: 100%; height: 42px;
    padding: 0 36px 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem; font-family: var(--font-body);
    background: #fafbfc;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}
.ct-date-wrap input:focus {
    border-color: #8b5cf6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.08);
}
.ct-date-wrap svg {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-400);
}

/* ---- 带后缀单位的输入框 ---- */
.ct-input-suffix {
    position: relative; display: block;
}
.ct-input-suffix input {
    width: 100%; height: 42px;
    padding: 0 56px 0 14px !important;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem; font-family: var(--font-body);
    background: #fafbfc;
    transition: all 0.2s;
    outline: none;
}
.ct-input-suffix input:focus {
    border-color: #14b8a6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.08);
}
.ct-suffix {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem; font-weight: 600; color: var(--gray-400);
    pointer-events: none;
}

/* ---- 卡片内子行布局 ---- */
.ct-field-row {
    display: grid; gap: 13px;
}
.ct-field-row-2 { grid-template-columns: 1fr 1fr; }
.ct-field-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---- 备注 textarea ---- */
.ct-card-body textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92rem; font-family: var(--font-body);
    background: #fafbfc;
    color: var(--gray-800);
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: all 0.2s;
    line-height: 1.6;
}
.ct-card-body textarea:focus {
    border-color: #64748b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(100,116,139,0.08);
}

/* ---- 跟进进度面板 ---- */
.ct-followup-panel {
    margin-top: 18px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e8edf5;
    overflow: hidden;
}
.ct-followup-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #e0eef8;
}
.ct-followup-head strong {
    font-size: 0.92rem; color: #0c4a6e;
}
.ct-followup-badge {
    background: #06b6d4; color: #fff;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
    min-width: 20px; text-align: center;
}
.ct-followup-add-btn {
    padding: 7px 16px;
    background: #fff;
    border: 1.5px solid #bae6fd;
    border-radius: 8px;
    font-size: 0.85rem; font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}
.ct-followup-add-btn:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
}

.ct-followup-table {
    padding: 14px 18px;
}
.ct-fu-empty {
    text-align: center; color: var(--gray-400); font-size: 0.88rem;
    padding: 24px 0;
}

/* ============================================
   客户详情页 —— 签约详情卡片
   ============================================ */
.contract-detail-section {
    background: linear-gradient(160deg, #f8faff 0%, #f0f4fb 100%);
    border-radius: var(--radius-lg);
    padding: 24px !important;
    border: 1px solid #e0e7f0 !important;
}
.contract-detail-section h3 {
    font-family: var(--font-body) !important;
    color: #1a237e !important;
    font-size: 1.15rem !important;
    margin-bottom: 18px !important;
    padding-bottom: 12px;
    border-bottom: 2px dashed #dce4f0;
}

/* ---- 紧凑信息网格（替换旧卡片式） ---- */
.ct-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid #e8edf5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.ct-compact-col {
    padding: 0;
    border-right: 1px solid #eef1f6;
}
.ct-compact-col:last-child { border-right: none; }
.ct-compact-group-title {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 700; color: #374151;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #edf0f5;
    letter-spacing: 0.02em;
}
.ct-compact-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid #f5f7fa;
    font-size: 0.875rem;
    min-height: 36px;
}
.ct-compact-row:last-child { border-bottom: none; }

/* 单行双字段（两个 label+value 并排，中间竖线分隔） */
.ct-compact-pair {
    display: flex; align-items: center;
    padding: 7px 14px;
    border-bottom: 1px solid #f5f7fa;
    min-height: 36px;
    gap: 0;
}
.ct-compact-pair:last-child { border-bottom: none; }
.ct-compact-inline {
    display: flex; align-items: center; gap: 4px;
    flex: 1; min-width: 0;
}
.ct-compact-sep {
    color: #d1d5db; margin: 0 10px; font-size: 0.75rem;
    flex-shrink: 0; user-select: none;
}

.ct-compact-label {
    color: #6b7280;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-right: 8px;
}
.ct-compact-val {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: right;
    flex-shrink: 0;
}

/* 一键复制按钮 */
.ct-compact-row--copy {
    gap: 6px;
}
.ct-copy-btn {
    flex-shrink: 0;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    color: #4f46e5;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 0.78rem;
    cursor: pointer;
    line-height: 1.6;
    transition: background .15s, color .15s;
    white-space: nowrap;
    min-width: 22px;
    text-align: center;
}
.ct-copy-btn:hover { background: #e0e7ff; color: #3730a3; }
.ct-copy-btn:active { background: #c7d2fe; }
.ct-compact-notes {
    margin-top: 10px; padding: 9px 14px;
    background: #fefce8; border: 1px solid #fde68a;
    border-radius: 8px; font-size: 0.8rem; color: #713f12;
}

/* 居间人权限限制标签 */
.ct-role-badge {
    padding: 8px 14px;
    margin-bottom: 12px;
    background: #fff7ed;
    border: 1px dashed #f97316;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #c2410c;
    font-weight: 500;
}

/* 居间人锁定字段：明显不可编辑 */
.ct-field-locked,
input.ct-field-locked,
select.ct-field-locked,
textarea.ct-field-locked {
    background: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    border-color: #e2e8f0 !important;
    opacity: 0.75 !important;
}

/* 是/否 小标签 */
.ct-tag {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 28px; height: 22px;
    border-radius: 6px;
    font-size: 0.72rem; font-weight: 700;
    padding: 0 8px;
}
.ct-tag-yes { background: #dcfce7; color: #166534; }
.ct-tag-no  { background: #fee2e2; color: #991b1b; }
.ct-tag-dash{ background: #f3f4f6; color: #9ca3af; }

/* 响应式 */
@media (max-width: 860px) {
    .ct-compact-grid { grid-template-columns: 1fr 1fr; }
    .ct-compact-col:nth-child(2n) { border-right: none; }
}
@media (max-width: 520px) {
    .ct-compact-grid { grid-template-columns: 1fr; }
    .ct-compact-col { border-right: none; border-bottom: 1px solid #eef1f6; }
    .ct-compact-col:last-child { border-bottom: none; }
}

/* 详情页跟进进度 */
.ct-detail-followup {
    margin-top: 18px;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #e8edf5;
    overflow: hidden;
}
.ct-detail-followup h4 {
    padding: 14px 18px;
    margin: 0;
    background: #f0f9ff;
    font-size: 0.88rem; color: #0c4a6e;
    border-bottom: 1px solid #e0eef8;
}

/* ============================================
   修改密码弹窗
   ============================================ */
.pwd-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
    animation: pwdFadeIn 0.25s ease;
}
@keyframes pwdFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pwd-modal {
    position: relative; width: 420px; max-width: 92vw;
    background: #fff; border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    padding: 40px 36px 32px;
    text-align: center;
    animation: pwdSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes pwdSlideUp { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.pwd-close {
    position: absolute; top: 16px; right: 16px;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: #f1f5f9; color: #94a3b8;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.pwd-close:hover { background: #e2e8f0; color: #475569; }

.pwd-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #6366f1; margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.15);
}

.pwd-title {
    font-size: 1.25rem; font-weight: 700; color: #0f172a;
    margin: 0 0 6px 0; letter-spacing: -0.01em;
}
.pwd-subtitle {
    font-size: 0.85rem; color: #94a3b8; margin: 0 0 28px 0;
}

.pwd-field {
    position: relative; margin-bottom: 14px; text-align: left;
}
.pwd-field-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; transition: color 0.2s; pointer-events: none;
}
.pwd-field input {
    width: 100%; padding: 13px 15px 13px 44px;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 0.9rem; color: #1e293b; background: #f8fafc;
    transition: all 0.2s; outline: none; font-family: inherit;
}
.pwd-field input:focus {
    border-color: #6366f1; background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}
.pwd-field:focus-within .pwd-field-icon { color: #6366f1; }

.pwd-field input::placeholder { color: #cbd5e1; }

.pwd-actions {
    display: flex; gap: 12px; margin-top: 6px;
}
.pwd-btn-cancel {
    flex: 1; padding: 13px 0; border: 1.5px solid #e2e8f0;
    border-radius: 12px; background: #fff; color: #64748b;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.pwd-btn-cancel:hover { background: #f8fafc; border-color: #cbd5e1; color: #334155; }

.pwd-btn-save {
    flex: 1; padding: 13px 0; border: none;
    border-radius: 12px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,0.35);
    transition: all 0.2s;
}
.pwd-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}
.pwd-btn-save:active { transform: translateY(0); }

.profile-msg {
    margin: 12px 0 4px; font-size: 0.82rem; padding: 10px 14px;
    border-radius: 10px; display: none; text-align: left;
}
.profile-msg--success {
    display: block; color: #166534; background: #dcfce7;
}
.profile-msg--error {
    display: block; color: #991b1b; background: #fee2e2;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1100px) {
    .contract-cards-row {
        grid-template-columns: 1fr 1fr;
    }
    .ct-row-2col {
        grid-template-columns: 1fr;
    }
    .ct-detail-cards {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    .contract-wrap {
        padding: 16px 12px !important;
    }
    .contract-cards-row,
    .ct-row-2col {
        grid-template-columns: 1fr;
    }
    .ct-field-row-2,
    .ct-field-row-3 {
        grid-template-columns: 1fr;
    }
    .ct-fu-fields {
        grid-template-columns: 1fr;
    }
    .ct-fu-entry {
        flex-direction: column;
    }
    .ct-fu-del {
        align-self: flex-end;
    }
}

/* ---- 详情页状态徽标（已废弃，改用 .ct-tag-*） ---- */

/* ============================================
   跟进记录弹窗
   ============================================ */
.fu-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 1000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.fu-modal-overlay.active { display: flex; }
.fu-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 520px; max-width: 94vw;
    box-shadow: 0 25px 60px rgba(0,0,0,0.18);
    animation: fuSlideIn 0.25s ease-out;
    overflow: hidden;
}
@keyframes fuSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.fu-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e8edf5;
    background: linear-gradient(135deg, #f8faff, #f0f4fb);
}
.fu-modal-header h3 {
    font-size: 1.05rem; font-weight: 700; color: #1a237e;
    margin: 0; font-family: var(--font-body);
}
.fu-modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.2rem; color: var(--gray-500);
    cursor: pointer; transition: all 0.2s;
}
.fu-modal-close:hover {
    background: #fef2f2; color: #ef4444; border-color: #fecaca;
}
.fu-modal-body {
    padding: 20px 24px;
    display: flex; flex-direction: column; gap: 16px;
}
.fu-field { display: flex; flex-direction: column; gap: 5px; }
.fu-label {
    font-size: 0.82rem; font-weight: 600; color: var(--gray-600);
    font-family: var(--font-body);
}
.fu-required { color: #ef4444; }
.fu-input {
    height: 42px; padding: 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem; font-family: var(--font-body);
    background: #fff;
    outline: none; transition: all 0.2s;
    width: 100%;
}
.fu-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.fu-textarea {
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem; font-family: var(--font-body);
    background: #fff;
    outline: none; resize: vertical;
    transition: all 0.2s;
    width: 100%;
}
.fu-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.fu-modal .ct-select-wrap select {
    height: 42px; width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 36px 0 12px;
    font-size: 0.9rem; font-family: var(--font-body);
    background: #fff;
    outline: none; appearance: none;
    transition: all 0.2s;
}
.fu-modal .ct-select-wrap select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.fu-custom-wrap .fu-input { margin-top: 4px; }
.fu-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e8edf5;
    background: #fafbfc;
}
.fu-modal-footer .btn-primary,
.fu-modal-footer .btn-secondary {
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: none;
    font-family: var(--font-body);
    transition: all 0.2s;
}
.fu-modal-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}
.fu-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}
.fu-modal-footer .btn-secondary {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: var(--gray-600);
}
.fu-modal-footer .btn-secondary:hover {
    background: #f1f5f9;
}

/* ============================================
   跟进记录列表（彩色图标版）
   ============================================ */
.ct-fu-record {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fafbfc;
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.15s;
}
.ct-fu-record:hover {
    background: #f5f7fb;
}
.ct-fu-top {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
}
.ct-fu-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ct-fu-type {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.78rem; font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}
.ct-fu-time {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--gray-400);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.ct-fu-note {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.5;
    padding-left: 19px;
    word-break: break-all;
}
.ct-fu-more {
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    margin-top: 2px;
    border-radius: 8px;
    background: #f0f9ff;
    border: 1px dashed #bae6fd;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem; font-weight: 600;
    color: #0369a1;
    font-family: var(--font-body);
}
.ct-fu-more:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
}

/* ---- 详情页跟进进度新版 ---- */
.ct-detail-followup-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #e0eef8;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.ct-detail-followup-head strong {
    font-size: 0.92rem; color: #0c4a6e;
}
.ct-detail-followup-list {
    padding: 14px 18px;
}

/* ============================================
   客户列表最近跟进圆点
   ============================================ */
.cl-followup-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* ============================================
   回收站样式
   ============================================ */
.trash-header {
    padding: 8px 0 16px;
}
.trash-header h3 {
    font-size: 1.1rem; color: #1a237e;
    font-family: var(--font-body);
}
.trash-cat-icon {
    margin-right: 6px;
    font-size: 1rem;
}
.trash-deleted-by {
    color: var(--gray-500);
    font-size: 0.85rem;
}
.btn-sm {
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    font-family: var(--font-body);
    cursor: pointer; border: none;
    transition: all 0.2s;
}
.btn-danger-trash {
    background: #fff !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
}
.btn-danger-trash:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

/* ============================================
   系统配置 - 跟进事项颜色圆点
   ============================================ */
.fu-color-dot {
    display: inline-flex;
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 8px;
    align-self: center;
}

/* ============================================
   跟进记录响应式
   ============================================ */
@media (max-width: 640px) {
    .ct-fu-record {
        padding: 10px 12px;
    }
    .ct-fu-top {
        gap: 8px;
    }
    .ct-fu-note {
        font-size: 0.8rem;
        padding-left: 17px;
    }
    .fu-modal {
        width: 96vw;
    }
}

/* ============================================
   账单明细弹窗 (Bill Modal)
   ============================================ */
.bmd-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.6);
    z-index: 1001;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.bmd-overlay.active { display: flex; }
.bmd-modal {
    background: #fff;
    border-radius: 16px;
    width: 960px; max-width: 96vw; max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.22);
    animation: bmdSlideIn 0.28s ease-out;
    overflow: hidden;
}
@keyframes bmdSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.bmd-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0a1628, #1a3a6e);
    color: #fff;
    flex-shrink: 0;
}
.bmd-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.bmd-close {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 1.3rem; color: #fff;
    cursor: pointer; transition: all 0.2s;
}
.bmd-close:hover { background: rgba(255,255,255,0.22); }
.bmd-scroll {
    flex: 1; overflow-y: auto;
    padding: 20px 24px;
}

/* ---- 顶部信息条 ---- */
.bmd-top-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0a1628, #1a3a6e);
    border-radius: 12px;
    margin-bottom: 20px;
}
.bmd-top-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bmd-period {
    font-size: 1.15rem; font-weight: 700; color: #fff;
    font-family: 'Noto Sans SC', sans-serif;
}
.bmd-user-tag {
    font-size: 0.82rem; color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.1);
    padding: 3px 10px; border-radius: 20px;
}
.bmd-attr-badge {
    font-size: 0.78rem; font-weight: 700;
    padding: 4px 12px; border-radius: 6px;
}
.bmd-attr-pre { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.bmd-attr-post { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.bmd-top-fees {
    display: flex; align-items: center; gap: 20px;
}
.bmd-fee-box { text-align: center; }
.bmd-fee-num {
    font-size: 1.6rem; font-weight: 800; color: #fff;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: -0.5px;
}
.bmd-fee-amount { color: #ffd54f; }
.bmd-fee-label {
    font-size: 0.72rem; color: rgba(255,255,255,0.6);
    font-weight: 500; margin-top: 2px;
}
.bmd-fee-label span { color: rgba(255,255,255,0.4); }
.bmd-fee-divider {
    width: 1px; height: 40px;
    background: rgba(255,255,255,0.2);
    align-self: center;
}
.bmd-fee-highlight .bmd-fee-num { font-size: 2rem; }

/* ---- 内容块 ---- */
.bmd-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f7;
}
.bmd-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.bmd-section-title {
    font-size: 1rem; font-weight: 700;
    color: #1a237e;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 6px;
}
.bmd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 20px;
}
.bmd-info { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.bmd-label { font-size: 0.76rem; color: var(--gray-500); font-weight: 600; }
.bmd-val { font-size: 0.9rem; color: var(--gray-900); font-weight: 500; }

/* 用能分析 */
.bmd-analysis-grid-full {
    display: flex; flex-direction: column; gap: 12px;
}
.bmd-analysis-block {
    padding: 14px 18px;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #e3e8f0;
}
.bmd-analysis-heading {
    font-size: 0.95rem; font-weight: 700;
    color: #1a237e;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
}
.bmd-heading-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: linear-gradient(135deg, #1a3a74, #00b4d8);
    color: #fff; border-radius: 50%;
    font-size: 0.75rem; font-weight: 700;
}
.bmd-analysis-body {
    font-size: 0.88rem; color: var(--gray-700);
    line-height: 1.7;
}
.bmd-chart-wrap {
    margin-top: 12px; padding: 14px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e3e8f0;
    height: 300px; position: relative;
}
.bmd-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* 费用组成表格 */
.bmd-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid #e8edf5; }
.bmd-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bmd-table th {
    background: #1a237e; color: #fff;
    padding: 10px 14px; text-align: left;
    font-size: 0.8rem; white-space: nowrap;
}
.bmd-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--gray-800); white-space: nowrap;
}
.bmd-table tr:last-child td { border-bottom: none; }
.bmd-table tbody tr:hover td { background: #f5f8ff; }
.bmd-table-sm th, .bmd-table-sm td { font-size: 0.78rem; padding: 6px 8px; }
.bmd-row-main td:first-child { font-weight: 600; }
.bmd-row-sub td:first-child { color: var(--gray-600); padding-left: 24px; font-size: 0.82rem; }
.bmd-row-total td { font-weight: 700; background: #e8f5e9 !important; color: #2e7d32; }
.bmd-neg { color: #d32f2f !important; }

/* 受电点 */
.bmd-rp-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 10px; margin-bottom: 14px;
}
.bmd-rp-tag {
    font-size: 0.78rem; color: var(--gray-600);
    background: #f1f5f9; padding: 3px 10px;
    border-radius: 6px;
}
.bmd-rp-total {
    font-size: 0.9rem; font-weight: 600; color: var(--gray-800);
    margin-left: auto;
}
.bmd-rp-total strong { color: #d4380d; font-size: 1rem; }
.bmd-sub-title {
    font-size: 0.9rem; font-weight: 700;
    color: var(--gray-700); margin: 12px 0 8px;
    display: flex; align-items: center; gap: 6px;
}
.bmd-sub-title::before {
    content: ''; display: inline-block;
    width: 4px; height: 14px;
    background: var(--secondary); border-radius: 2px;
}
.bmd-pf-grid {
    display: flex; flex-wrap: wrap;
    gap: 12px; margin-top: 10px;
    padding: 14px; background: #fff8e1;
    border-radius: 8px; border: 1px solid #ffe082;
}
.bmd-pf-item { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.bmd-capacity-fee {
    margin-top: 12px;
    font-size: 0.85rem; color: var(--gray-600);
    padding: 8px 14px;
    background: #f1f5f9; border-radius: 6px;
}

/* 弹窗底部导航 */
.bmd-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 14px 24px;
    border-top: 1px solid #e8edf5;
    background: #fafbfc;
    flex-shrink: 0;
}
.bmd-nav-btn {
    padding: 8px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff; color: var(--gray-700);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.bmd-nav-btn:hover:not(:disabled) {
    background: #f0f4ff; border-color: #6366f1; color: #4f46e5;
}
.bmd-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.bmd-nav-count {
    font-size: 0.85rem; color: var(--gray-500); font-weight: 600;
}

/* ============================================
   删除确认弹窗 (Delete Confirm Modal)
   ============================================ */
.dcm-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 1002;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.dcm-overlay.active { display: flex; }
.dcm-modal {
    background: #fff;
    border-radius: 14px;
    width: 420px; max-width: 94vw;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: bmdSlideIn 0.22s ease-out;
    overflow: hidden;
    text-align: center;
}
.dcm-icon { font-size: 3rem; padding: 28px 0 8px; }
.dcm-title {
    font-size: 1.15rem; font-weight: 700; color: var(--gray-900);
    padding: 0 24px 8px;
}
.dcm-message {
    font-size: 0.9rem; color: var(--gray-600);
    padding: 0 24px 20px;
    line-height: 1.6;
}
.dcm-footer {
    display: flex; justify-content: center;
    gap: 12px; padding: 16px 24px;
    background: #fafbfc; border-top: 1px solid #e8edf5;
}
.dcm-footer .btn-primary,
.dcm-footer .btn-secondary {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: none;
    transition: all 0.2s;
}
.dcm-footer .btn-primary { background: var(--primary); color: #fff; }
.dcm-footer .btn-primary:hover { background: var(--primary-dark); }
.dcm-btn-danger { background: #ef4444 !important; }
.dcm-btn-danger:hover { background: #dc2626 !important; }
.dcm-footer .btn-secondary {
    background: #fff; color: var(--gray-600);
    border: 1.5px solid #e2e8f0;
}
.dcm-footer .btn-secondary:hover { background: #f1f5f9; }

/* ============================================
   账单归属期标签
   ============================================ */
.bill-attr-badge {
    display: inline-block;
    font-size: 0.78rem; font-weight: 700;
    padding: 3px 10px; border-radius: 5px;
    white-space: nowrap;
}
.bill-attr-pre { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.bill-attr-post { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.bill-attr-na { color: var(--gray-400); font-size: 0.85rem; }

/* ============================================
   上传归属期选择
   ============================================ */
.upload-attr-select {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
    font-size: 0.85rem; color: var(--gray-700);
}
.upload-attr-select label { font-weight: 600; white-space: nowrap; }
.upload-attr-select select {
    height: 36px; padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem; background: #fff;
    outline: none;
}
.upload-attr-select select:focus {
    border-color: var(--primary);
}

/* ============================================
   回收站批量操作
   ============================================ */
.trash-batch-actions {
    display: flex; align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 10px;
}
.trash-batch-actions .btn-primary,
.trash-batch-actions .btn-secondary {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer; border: none;
    transition: all 0.2s;
}
.trash-batch-actions .btn-primary {
    background: var(--primary); color: #fff;
}
.trash-batch-actions .btn-primary:hover { background: var(--primary-dark); }
.trash-batch-actions .btn-secondary {
    background: #fff; color: var(--gray-600);
    border: 1.5px solid #e2e8f0;
}
.trash-batch-actions .btn-secondary:hover { background: #f1f5f9; }
.trash-selected-count {
    font-size: 0.82rem; color: var(--gray-500);
    margin-left: 8px;
}
.trash-check, .trash-check-all {
    width: 18px; height: 18px; cursor: pointer;
    accent-color: var(--primary);
}

/* ============================================
   删除按钮 - 仅管理员可见
   ============================================ */
.btn-delete-bill {
    color: var(--gray-400) !important;
    transition: color 0.2s;
}
.btn-delete-bill:hover {
    color: #ef4444 !important;
    background: #fef2f2 !important;
}

/* ============================================
   账单明细弹窗响应式
   ============================================ */
@media (max-width: 768px) {
    .bmd-modal { max-height: 96vh; border-radius: 12px; }
    .bmd-scroll { padding: 14px; }
    .bmd-top-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .bmd-top-fees { width: 100%; justify-content: space-around; }
    .bmd-fee-num { font-size: 1.3rem; }
    .bmd-summary-grid { grid-template-columns: 1fr 1fr; }
    .dcm-modal { width: 90vw; }
}

/* ============================================
   客户级文档上传弹窗
   ============================================ */
.cdu-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 1000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.cdu-overlay.active { display: flex; }
.cdu-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 620px; max-width: 95vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cdu-header {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #e8ecf5;
    background: linear-gradient(135deg, #f8faff, #f0f4fb);
}
.cdu-header h3 {
    margin: 0; font-size: 1.1rem; color: #1a237e;
    font-weight: 700;
}
.cdu-customer-name {
    font-size: 0.85rem; color: var(--gray-500);
    flex: 1;
}
.cdu-close {
    width: 32px; height: 32px;
    background: none; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 1.2rem;
    color: var(--gray-500); cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.cdu-close:hover { background: #f1f5f9; color: #333; }
.cdu-body {
    padding: 24px;
    overflow-y: auto;
}
.cdu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.cdu-card {
    padding: 20px 16px;
    background: #fafbfc;
    border: 2px solid #e8edf5;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font-body);
}
.cdu-card:hover {
    border-color: var(--accent-500);
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,180,216,0.1);
}
.cdu-card-icon { font-size: 2rem; margin-bottom: 8px; }
.cdu-card-title { font-size: 0.95rem; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.cdu-card-desc { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 4px; }
.cdu-card-hint { font-size: 0.72rem; color: var(--gray-400); }
.cdu-attribution {
    margin-top: 20px;
    padding: 14px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
}
.cdu-attribution-label {
    display: block;
    font-size: 0.82rem; font-weight: 600; color: #92400e;
    margin-bottom: 12px;
}
/* CDU 归属期卡片选择 */
.cdu-attr-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.cdu-attr-card {
    background: #fff; border: 2px solid #fde68a; border-radius: 12px;
    padding: 18px 14px;
    text-align: center; cursor: pointer;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
}
.cdu-attr-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    opacity: 0; transition: opacity 0.25s; z-index: 0;
}
.cdu-attr-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245,158,11,0.12);
    transform: translateY(-2px);
}
.cdu-attr-card.selected {
    border-color: #f59e0b;
    box-shadow: 0 4px 20px rgba(245,158,11,0.18);
}
.cdu-attr-card.selected::before { opacity: 0.06; }
.cdu-attr-card.selected .cdu-attr-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    color: #92400e !important;
}
.cdu-attr-card.selected .cdu-attr-title { color: #92400e; }
.cdu-attr-icon {
    position: relative; z-index: 1;
    width: 46px; height: 46px; border-radius: 12px;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    background: #fffbeb; color: #f59e0b;
    transition: all 0.25s;
}
.cdu-attr-title {
    position: relative; z-index: 1;
    font-size: 1rem; font-weight: 700; color: #451a03;
    margin-bottom: 4px;
    transition: color 0.25s;
}
.cdu-attr-desc {
    position: relative; z-index: 1;
    font-size: 0.75rem; color: #a8a29e;
}
.cdu-attribution-error {
    font-size: 0.8rem; color: #ef4444;
    font-weight: 600;
}
/* 账单文件确认区 */
.cdu-confirm {
    margin-top: 20px;
    padding: 18px 20px;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: var(--radius-md);
    animation: confirmSlideIn 0.3s ease;
}
@keyframes confirmSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cdu-confirm-title {
    font-size: 0.88rem; font-weight: 600; color: #166534;
    margin-bottom: 12px;
}
.cdu-confirm-file {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.cdu-confirm-file:last-child { margin-bottom: 0; }
.cdu-confirm-file-icon { font-size: 1.2rem; flex-shrink: 0; }
.cdu-confirm-file-name { flex: 1; color: #065f46; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdu-confirm-file-size { color: #6b7280; font-size: 0.78rem; flex-shrink: 0; }
.cdu-confirm-actions {
    margin-top: 16px;
    display: flex; gap: 10px; justify-content: flex-end;
}
.cdu-confirm-actions .btn-secondary {
    padding: 9px 20px; font-size: 0.85rem;
}
.cdu-confirm-actions .btn-primary {
    padding: 9px 20px; font-size: 0.85rem;
}

.cdu-progress {
    padding: 0 24px 16px;
    border-top: 1px solid #e8ecf5;
}
.cdu-progress-list {
    max-height: 160px; overflow-y: auto;
}
.cdu-progress-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}
.cdu-progress-item:last-child { border-bottom: none; }
.cdu-progress-item .cdu-pi-name { flex: 1; color: var(--gray-700); }
.cdu-progress-item .cdu-pi-status { font-size: 0.78rem; font-weight: 600; }
.cdu-pi-status.ok { color: #10b981; }
.cdu-pi-status.warn { color: #f59e0b; }

/* ============================================
   覆盖确认弹窗
   ============================================ */
.ow-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.6);
    z-index: 1100;
    align-items: center; justify-content: center;
}
.ow-overlay.active { display: flex; }
.ow-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 420px; max-width: 92vw;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.25s ease;
}
.ow-icon { font-size: 3rem; margin-bottom: 12px; }
.ow-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.ow-message { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 20px; }
.ow-footer {
    display: flex; gap: 12px; justify-content: center;
}
.ow-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* ============================================
   客户操作日志弹窗
   ============================================ */
.clog-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 1000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
}
.clog-overlay.active { display: flex; }
.clog-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 560px; max-width: 94vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.25s ease;
}
.clog-header {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #e8ecf5;
    background: linear-gradient(135deg, #f8faff, #f0f4fb);
}
.clog-header h3 { margin: 0; font-size: 1.05rem; color: #1a237e; font-weight: 700; flex: 1; }
.clog-close {
    width: 32px; height: 32px;
    background: none; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 1.2rem;
    color: var(--gray-500); cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.clog-close:hover { background: #f1f5f9; color: #333; }
.clog-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}
.clog-empty {
    text-align: center; color: var(--gray-400);
    padding: 40px 0; font-size: 0.9rem;
}
.clog-entry {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex; gap: 12px;
    align-items: flex-start;
}
.clog-entry:last-child { border-bottom: none; }
.clog-time {
    font-size: 0.78rem; color: var(--gray-400);
    white-space: nowrap; min-width: 70px;
    padding-top: 2px;
}
.clog-content {
    font-size: 0.88rem; color: var(--gray-700);
    line-height: 1.5;
    flex: 1;
}
.clog-operator {
    font-size: 0.75rem; color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   文档上传按钮（客户列表）
   ============================================ */
.btn-upload-for-customer {
    color: var(--accent-500) !important;
    transition: all 0.2s;
}
.btn-upload-for-customer:hover {
    color: #fff !important;
    background: var(--accent-500) !important;
}

/* ============================================
   所有居间人 - 工具栏
   ============================================ */
.all-users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 14px;
    gap: 12px;
}
.all-users-count {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================
   手动添加居间人弹窗 (aum-)
   ============================================ */
.aum-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(0,0,0,0.45);
    align-items: center; justify-content: center;
}
.aum-overlay.active { display: flex; }
.aum-modal {
    background: #fff;
    border-radius: 14px;
    width: 540px; max-width: 96vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: aumSlideIn 0.22s ease;
}
@keyframes aumSlideIn {
    from { transform: translateY(-24px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.aum-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--gray-200);
}
.aum-header h3 { font-size: 1rem; font-weight: 600; color: var(--navy-900); margin: 0; }
.aum-close {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    color: var(--gray-400); line-height: 1; padding: 0 4px;
}
.aum-close:hover { color: var(--gray-700); }
.aum-form { padding: 20px 22px 18px; }
.aum-fields { display: flex; flex-direction: column; gap: 14px; }
.aum-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.aum-row-single { grid-template-columns: 1fr !important; }
.aum-field { display: flex; flex-direction: column; gap: 5px; }
.aum-field label {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--gray-600);
}
.aum-field .required { color: #e53e3e; }
.aum-field input,
.aum-field select {
    height: 40px; border-radius: 8px;
    border: 1.5px solid var(--gray-300);
    padding: 0 12px; font-size: 0.875rem;
    color: var(--gray-800);
    transition: border-color .15s;
    appearance: none; background: #fff;
    outline: none;
}
.aum-field input:focus,
.aum-field select:focus { border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.aum-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 30px;
}
.aum-tip {
    margin: 14px 0 0;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #1d4ed8;
}
.aum-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}
@media (max-width: 520px) {
    .aum-row { grid-template-columns: 1fr; }
}

/* ============================================
   Toast 提示
   ============================================ */
.toast {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 32px;
    border-radius: 12px;
    background: #1e293b;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.24);
    pointer-events: none;
    white-space: nowrap;
}
.toast--show {
    animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.toast--hide {
    animation: toastOut 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.95); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    to   { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.96); }
}

/* ============================================
   身份证正反面上传弹窗
   ============================================ */
.idu-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
    animation: iduOverlayIn 0.25s ease;
}
.idu-overlay.active { display: flex; }
@keyframes iduOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.idu-modal {
    background: #fff; border-radius: 20px;
    width: 620px; max-width: 94vw; max-height: 90vh;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    display: flex; flex-direction: column;
    animation: iduModalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}
@keyframes iduModalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.idu-header {
    display: flex; align-items: center; gap: 16px;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--gray-100);
}
.idu-header-icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.idu-header-icon::after {
    content: '🪪'; font-size: 24px;
}
.idu-header-info h3 {
    font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin: 0;
}
.idu-header-info p {
    font-size: 0.82rem; color: var(--gray-500); margin: 4px 0 0;
}
.idu-close {
    margin-left: auto; align-self: flex-start;
    background: none; border: none; font-size: 1.6rem;
    color: var(--gray-400); cursor: pointer; padding: 4px; line-height: 1;
    transition: color 0.2s;
}
.idu-close:hover { color: var(--gray-700); }

.idu-body {
    padding: 24px 28px;
    overflow-y: auto;
}

.idu-slots {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

.idu-slot {
    position: relative;
    border-radius: 14px; overflow: hidden;
}

.idu-slot-inner {
    width: 100%; aspect-ratio: 1.6 / 1;
    border: 2px dashed var(--gray-300);
    border-radius: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; cursor: pointer;
    background: var(--gray-50);
    transition: all 0.25s ease;
    position: relative;
}
.idu-slot-inner:hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.04);
}
.idu-slot-inner.filled {
    display: none;
}

.idu-slot-icon-svg {
    color: var(--gray-400);
    transition: color 0.25s;
}
.idu-slot-inner:hover .idu-slot-icon-svg { color: #6366f1; }

.idu-slot-text {
    font-size: 0.92rem; font-weight: 600; color: var(--gray-700);
}
.idu-slot-text span {
    color: #6366f1;
}
.idu-slot-hint {
    font-size: 0.78rem; color: var(--gray-400);
}

.idu-slot-preview {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 14px;
    display: none;
    border: 2px solid #6366f1;
}
.idu-slot-preview.show { display: block; }

.idu-slot-clear {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; border: none;
    font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; z-index: 2;
}
.idu-slot-clear:hover { background: rgba(239,68,68,0.85); }

.idu-footer {
    padding: 16px 28px 20px;
    border-top: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}
.idu-status {
    margin-right: auto;
    font-size: 0.82rem; color: var(--gray-500);
}
.idu-confirm-btn:disabled {
    opacity: 0.4; cursor: not-allowed; pointer-events: none;
}

/* ============================================
   图片放大预览
   ============================================ */
.img-viewer-overlay {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(0,0,0,0.88);
    display: none; align-items: center; justify-content: center;
    flex-direction: column;
}
.img-viewer-overlay.active { display: flex; }
.img-viewer-close {
    position: absolute; top: 20px; right: 24px;
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    font-size: 2rem; width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.img-viewer-close:hover { background: rgba(255,255,255,0.3); }
#img-viewer-img {
    max-width: 90vw; max-height: 80vh;
    border-radius: 10px; box-shadow: 0 16px 60px rgba(0,0,0,0.5);
    object-fit: contain;
}
.img-viewer-caption {
    color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 16px;
}

/* ============================================
   证照缩略图
   ============================================ */
.cert-thumbs {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-top: var(--spacing-md);
}
.cert-thumb-item {
    position: relative;
    width: 80px; height: 80px; border-radius: 10px;
    overflow: hidden; cursor: pointer;
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
    flex-shrink: 0;
}
.cert-thumb-item:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99,102,241,0.18);
    transform: translateY(-2px);
}
.cert-thumb-item img {
    width: 100%; height: 100%; object-fit: cover;
}
.cert-thumb-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6); color: #fff;
    font-size: 0.65rem; text-align: center; padding: 2px 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cert-thumb-empty {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: var(--gray-400);
    padding: 8px 0;
}

/* ============================================
   OSS配置表单
   ============================================ */
.oss-config-form {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px; padding: 20px 24px;
}
.oss-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px; font-size: 0.9rem;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    background: #fff; transition: border 0.2s;
}
.oss-input:focus {
    outline: none; border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.oss-input::placeholder { font-family: inherit; }
.oss-field-note {
    font-weight: 400; font-size: 0.8rem; color: var(--gray-400);
}

@media (max-width: 600px) {
    .idu-slots { grid-template-columns: 1fr; }
    .idu-modal { width: 96vw; }
    .cert-thumb-item { width: 64px; height: 64px; }
}

/* ============================================
   基本信息 · 企业档案 —— 高级重设计
   ============================================ */

/* ---- 区块标题重设计 ---- */
.ep-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 0;
    border-bottom: none;
}
.ep-section-header .ep-header-accent {
    width: 5px; height: 38px;
    border-radius: 3px;
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    flex-shrink: 0;
}
.ep-section-header .ep-header-text {
    display: flex; flex-direction: column; gap: 2px;
}
.ep-section-header .ep-header-title {
    font-family: var(--font-body);
    font-size: 1.18rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.ep-section-header .ep-header-sub {
    font-size: 0.8rem;
    color: var(--gray-400);
    font-weight: 400;
    letter-spacing: 0.02em;
}
.ep-section-header .ep-header-badge {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    color: #4f46e5; white-space: nowrap;
}

/* ---- 主体容器 ---- */
.ep-profile-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- 企业 Hero 卡片 ---- */
.ep-hero-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 28px;
    background: linear-gradient(135deg, #fafbff 0%, #f4f6fd 50%, #f0f2fa 100%);
    border-radius: 16px;
    border: 1px solid #e8ecf5;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.ep-hero-card:hover {
    box-shadow: 0 8px 30px rgba(99,102,241,0.08);
}
.ep-hero-card::after {
    content: '';
    position: absolute;
    right: -30px; top: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ep-hero-avatar {
    width: 68px; height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    font-weight: 700;
    font-family: var(--font-display);
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99,102,241,0.22);
    letter-spacing: 0.04em;
}
.ep-hero-info {
    flex: 1; min-width: 0;
}
.ep-hero-name {
    font-family: var(--font-body);
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.ep-hero-code {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.02em;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    display: flex; align-items: center; gap: 8px;
}
.ep-hero-code .ep-code-copy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px;
    background: #fff; border: 1px solid #e2e8f0;
    color: #6366f1; cursor: pointer;
    font-size: 0.72rem; transition: all 0.2s;
    flex-shrink: 0;
}
.ep-hero-code .ep-code-copy:hover {
    background: #6366f1; color: #fff; border-color: #6366f1;
}

/* ---- 信息卡片网格 ---- */
.ep-field-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* ---- 单张信息卡片 ---- */
.ep-field-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef1f6;
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.ep-field-card:hover {
    border-color: #d4d8e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}
.ep-field-card::before {
    content: '';
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 0 2px 2px 0;
    background: #e2e8f0;
    transition: background 0.3s;
}
.ep-field-card:nth-child(5n+1)::before { background: #c7d2fe; }
.ep-field-card:nth-child(5n+2)::before { background: #a5b4fc; }
.ep-field-card:nth-child(5n+3)::before { background: #93c5fd; }
.ep-field-card:nth-child(5n+4)::before { background: #818cf8; }
.ep-field-card:nth-child(5n+5)::before { background: #6dd5b8; }
.ep-field-card:hover::before {
    background: #6366f1 !important;
}

.ep-field-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.ep-icon-company { background: #eef2ff; color: #6366f1; }
.ep-icon-person  { background: #fdf2f8; color: #ec4899; }
.ep-icon-phone  { background: #ecfdf5; color: #10b981; }
.ep-icon-id     { background: #fef3c7; color: #d97706; }
.ep-icon-code   { background: #f3e8ff; color: #9333ea; }
.ep-icon-type   { background: #e0f2fe; color: #0284c7; }
.ep-icon-money  { background: #fce7f3; color: #db2777; }
.ep-icon-date   { background: #d1fae5; color: #059669; }
.ep-icon-map    { background: #fff7ed; color: #ea580c; }
.ep-icon-agent  { background: #f0fdf4; color: #16a34a; }

.ep-field-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.ep-field-label {
    font-size: 0.75rem; font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}
.ep-field-value-row {
    display: flex; align-items: center; gap: 8px;
}
.ep-field-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1.25;
    word-break: break-all;
}
.ep-field-value--empty {
    color: var(--gray-300);
    font-weight: 400;
}

/* ---- 复制按钮（卡片内） ---- */
.ep-copy-btn {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
    transition: all 0.2s;
    opacity: 0;
}
.ep-field-card:hover .ep-copy-btn { opacity: 1; }
.ep-copy-btn:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* ---- 全宽卡片（经营范围等） ---- */
.ep-card-full {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef1f6;
    padding: 20px 24px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.ep-card-full:hover {
    border-color: #d4d8e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.ep-card-full::before {
    content: '';
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px; border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, #6366f1, #a78bfa);
}
.ep-card-full-label {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
}
.ep-card-full-label .ep-icon-doc {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: #eef2ff;
    color: #6366f1;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.ep-card-full-label span {
    font-size: 0.82rem; font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ep-card-full-value {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.7;
    padding-left: 44px;
}
.ep-card-full-value--empty {
    color: var(--gray-300);
    font-style: italic;
    font-size: 0.88rem;
}

/* ---- 响应式 ---- */
@media (max-width: 1200px) {
    .ep-field-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
@media (max-width: 1000px) {
    .ep-field-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 750px) {
    .ep-field-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 600px) {
    .ep-field-grid { grid-template-columns: 1fr; }
    .ep-hero-card { flex-direction: column; text-align: center; padding: 22px 18px; }
    .ep-hero-name { font-size: 1.2rem; }
    .ep-hero-code { justify-content: center; }
    .ep-field-card { padding: 14px 16px; }
    .ep-section-header { flex-wrap: wrap; }
    .ep-section-header .ep-header-badge { margin-left: 0; }
}

/* ============================================================
   电费账单专属上传弹窗 (Bill Upload Modal)
   ============================================================ */
.bu-overlay {
    position: fixed; inset: 0; z-index: 1100;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
}
.bu-overlay.active { display: flex; }

.bu-modal {
    width: 500px; max-width: 94vw; max-height: 90vh;
    background: #fff; border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden; display: flex; flex-direction: column;
    animation: buFadeIn 0.25s ease;
}
@keyframes buFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bu-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
}
.bu-header h3 {
    margin: 0; font-size: 1.05rem; font-weight: 700; color: #1e293b;
}
.bu-customer-name {
    font-size: 0.8rem; color: #64748b;
    padding: 3px 10px; background: #fff; border-radius: 20px;
    border: 1px solid #e2e8f0;
}
.bu-close {
    margin-left: auto;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid #e2e8f0; background: #fff;
    color: #94a3b8; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.bu-close:hover { background: #fee2e2; color: #ef4444; border-color: #fecaca; }

.bu-body {
    padding: 24px;
    overflow-y: auto;
}

.bu-step-label {
    font-size: 0.82rem; font-weight: 600; color: #64748b;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
}

/* 归属期选择卡片 */
.bu-attr-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-bottom: 20px;
}
.bu-attr-card {
    background: #fff; border: 2px solid #eef1f6; border-radius: 16px;
    padding: 24px 16px 20px;
    text-align: center; cursor: pointer;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
}
.bu-attr-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    opacity: 0; transition: opacity 0.25s;
    z-index: 0;
}
.bu-attr-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 20px rgba(99,102,241,0.1);
    transform: translateY(-2px);
}
.bu-attr-card.selected {
    border-color: #6366f1;
    box-shadow: 0 4px 24px rgba(99,102,241,0.18);
}
.bu-attr-card.selected::before {
    opacity: 0.05;
}
.bu-attr-card-icon {
    position: relative; z-index: 1;
    width: 56px; height: 56px; border-radius: 16px;
    background: #eef2ff; color: #6366f1;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.25s;
}
.bu-attr-card.selected .bu-attr-card-icon {
    background: #6366f1; color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.bu-attr-card-label {
    position: relative; z-index: 1;
    font-size: 0.95rem; font-weight: 700; color: #1e293b;
    margin-bottom: 4px;
    transition: color 0.25s;
}
.bu-attr-card.selected .bu-attr-card-label { color: #6366f1; }
.bu-attr-card-desc {
    position: relative; z-index: 1;
    font-size: 0.75rem; color: #94a3b8;
}

/* 文件列表区 */
.bu-files-area {
    border-top: 1px solid #f1f5f9; padding-top: 18px;
    margin-top: 4px;
}
.bu-files-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: #64748b;
    margin-bottom: 12px;
}
.bu-files-head-icon { color: #6366f1; display: flex; }
.bu-files-head strong { color: #1e293b; }
.bu-file-list { display: flex; flex-direction: column; gap: 6px; }
.bu-file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #f8fafc;
    border-radius: 10px; border: 1px solid #eef1f6;
    font-size: 0.85rem;
}
.bu-file-item-icon { color: #6366f1; display: flex; flex-shrink: 0; }
.bu-file-item-icon.removing { color: #ef4444; }
.bu-file-item-name { flex: 1; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bu-file-item-size { color: #94a3b8; font-size: 0.75rem; flex-shrink: 0; }
.bu-file-item-remove {
    width: 24px; height: 24px; border-radius: 6px;
    border: none; background: transparent; color: #cbd5e1;
    cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.bu-file-item-remove:hover { background: #fee2e2; color: #ef4444; }

/* 底部操作栏 */
.bu-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

/* 响应式 */
@media (max-width: 520px) {
    .bu-modal { width: 96vw; border-radius: 16px; }
    .bu-header { padding: 16px 18px; }
    .bu-body { padding: 18px; }
    .bu-attr-cards { gap: 10px; }
    .bu-attr-card { padding: 18px 10px 16px; }
    .bu-attr-card-icon { width: 48px; height: 48px; }
}
