﻿/* ============================================================
   AI 外呼工作台 · Voice Console
   全屏工作台布局 · Ant Design 5（token 见 app.js THEME）
   ============================================================ */

:root {
    --primary: #2F5BF5;
    --primary-hover: #4B70FF;
    --primary-active: #1F42D6;
    --primary-soft: #EEF2FF;
    --primary-line: #DCE4FF;

    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --surface-2: #FBFCFD;

    --line: #EAECEF;
    --line-2: #F1F2F5;
    --line-3: #E2E5EA;

    --text: #232830;
    --text-2: #5B6472;
    --muted: #8A919E;
    --muted-2: #A6ACB8;

    --success: #0F8A5F;
    --success-bg: #E8F7EF;
    --warn: #A16207;
    --warn-bg: #FFF7E8;
    --danger: #6B7280;
    --danger-bg: #F2F3F6;

    --radius: 12px;
    --radius-lg: 14px;
    --font: 'Inter', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
    margin: 0; padding: 0;
    background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 13px;
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(17, 19, 24, .14); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(17, 19, 24, .24); }
::-webkit-scrollbar-track { background: transparent; }

.boot-screen {
    display: flex; align-items: center; justify-content: center; height: 100vh;
    color: var(--muted-2); font-size: 11px; letter-spacing: .22em;
}
.boot-fail { display: flex; align-items: center; justify-content: center; height: 100vh; color: var(--danger); font-size: 13px; }

/* ---------------------------- 全屏骨架 ---------------------------- */
.app-layout {
    display: flex; height: 100vh; overflow: hidden;
    background: var(--bg);
}
.main-col { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------------------------- 侧边栏 ---------------------------- */
.side-col {
    position: relative; z-index: 1;
    width: 252px; flex: 0 0 252px;
    display: flex; flex-direction: column;
    padding: 18px 14px 14px;
    background: var(--surface);
    border-right: 1px solid var(--line);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-logo {
    width: 30px; height: 30px; flex: 0 0 30px;
    display: block; object-fit: contain;
}
.brand-logo.lg { width: 38px; height: 38px; flex-basis: 38px; }
.brand-info { min-width: 0; }
.brand-name {
    font-size: 14px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub {
    font-size: 9px; color: var(--muted-2); letter-spacing: .18em;
    margin-top: 4px; text-transform: uppercase;
}

.side-menu.ant-menu,
.side-menu.ant-menu-inline {
    background: transparent !important;
    border-inline-end: none !important;
    font-size: 13.5px;
}
.side-menu .ant-menu-item {
    height: 40px !important; line-height: 40px !important;
    margin: 3px 0 !important; width: 100% !important;
    padding-inline: 12px !important;
    border-radius: 9px !important;
    color: var(--text-2);
    font-weight: 500;
}
.side-menu .ant-menu-item .anticon { font-size: 16px; color: #6B7280; transition: color .15s; }
.side-menu .ant-menu-item:hover { background: #F4F6FA !important; color: var(--text) !important; }
.side-menu .ant-menu-item:hover .anticon { color: var(--text-2); }
.side-menu .ant-menu-item-selected,
.side-menu .ant-menu-item-selected:hover {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    font-weight: 500;
}
.side-menu .ant-menu-item-selected .anticon { color: var(--primary); }
.side-menu .ant-menu-title-content { display: flex; align-items: center; min-width: 0; }
.side-menu .nav-label {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; width: 100%; min-width: 0;
}
.side-menu .nav-count {
    font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.side-menu .ant-menu-item-selected .nav-count { color: var(--primary); }

.side-user {
    margin-top: auto;
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-2);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.side-user:hover { background: #F4F6FA; border-color: var(--line-3); }
.user-avatar-img {
    width: 28px; height: 28px; flex: 0 0 28px;
    border-radius: 50%; display: block;
}
.user-meta { min-width: 0; }
.u-name {
    font-size: 12.5px; font-weight: 500; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-role { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.side-user-chev { margin-left: auto; color: #C2C7D0; display: flex; align-items: center; }

/* ---------------------------- 顶栏 ---------------------------- */
.topbar {
    flex: 0 0 56px; height: 56px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; font-size: 12px; color: var(--muted); }
.crumb-root { color: var(--muted); }
.crumb-sep { margin: 0 7px; color: #C9CED8; }
.crumb-cur { color: var(--text); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-sep { width: 1px; height: 18px; background: var(--line); }
.top-clock {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px; color: var(--muted-2);
    font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.top-search { width: 260px; margin: 0; }
.top-search .ant-input-affix-wrapper,
.top-search .ant-input-affix-wrapper:hover {
    border-color: transparent !important;
}
.top-search .ant-input-affix-wrapper {
    height: 32px; border-radius: 8px;
    background: #F5F6F8; box-shadow: none;
}
.top-search .ant-input-affix-wrapper:hover { background: #F1F3F7; }
.top-search .ant-input-affix-wrapper-focused,
.top-search .ant-input-affix-wrapper-focused:hover {
    background: #FFFFFF; border-color: var(--primary-line) !important;
    box-shadow: 0 0 0 3px rgba(47, 91, 245, .10);
}
.top-search .ant-input { background: transparent; font-size: 12px; }
.top-search .ant-input-clear-icon { font-size: 11px; }

/* ---------------------------- 内容区 ---------------------------- */
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 26px 34px; }
.watermark-body { position: relative; z-index: 1; min-height: 100%; }

/* 全屏背景水印：铺满整个视口，白色面板/卡片在其之上，水印不遮挡内容 */
.app-watermark {
    position: fixed; left: -15%; top: -15%; width: 130%; height: 130%;
    z-index: 0; overflow: hidden;
    pointer-events: none; user-select: none;
    transform: rotate(-22deg); transform-origin: center center;
    display: flex; flex-direction: column; justify-content: space-around;
}
.app-watermark-row { display: flex; justify-content: space-around; width: 100%; }
.app-watermark-row span { font-size: 13px; color: rgba(17, 19, 24, .055); white-space: nowrap; }
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.flash { border-radius: 10px !important; }

/* ---------------------------- 页头 ---------------------------- */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-title {
    margin: 0; font-size: 26px; line-height: 1.25; font-weight: 500;
    letter-spacing: -.015em; color: var(--text);
}
.page-desc { margin-top: 6px; font-size: 12px; color: var(--muted); }
.page-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------------------- 卡片 ---------------------------- */
.panel.ant-card,
.stat-card.ant-card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
}
.panel .ant-card-head {
    min-height: 50px; padding: 0 18px;
    border-bottom: 1px solid var(--line-2);
}
.panel .ant-card-head-title { font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; }
.panel .ant-card-extra { font-size: 12px; }
.panel .ant-card-body { color: var(--text); }

/* 线索中心空状态 */
.module-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 78px 20px; text-align: center;
}
.module-empty-ico {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-bottom: 18px;
    border-radius: 16px; background: #F3F6FD; color: #5B79D9;
}
.module-empty-title { font-size: 14px; color: #2B3240; }
.module-empty-hint { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 接收线索 · 接口信息 */
.leads-api {
    margin-bottom: 16px; padding: 16px 20px;
    border: 1px solid #E9EDF5; border-radius: 14px;
    background: #FCFDFF;
}
.leads-api-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.leads-api-title { font-size: 13px; letter-spacing: .02em; color: #232830; }
.leads-api-method {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
    border-radius: 5px; background: #EEF3FF; color: #2F5BF5;
    font-size: 10.5px; letter-spacing: .06em;
}
.leads-api-note { font-size: 11px; color: var(--warn); background: var(--warn-bg);
    padding: 2px 9px; border-radius: 999px; }
.leads-api-url {
    padding: 9px 12px;
    border: 1px dashed #E2E8F5; border-radius: 9px;
    background: #F7F9FD; color: #3B5BA9; font-size: 12px;
    word-break: break-all;
}
.leads-api-params {
    display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px;
    font-size: 11.5px; color: #7A8494;
}
.leads-api-params b { margin-left: 5px; font-weight: 500; color: #3A414C; }

/* 接收线索 · 列表 */
.leads-table .ant-table-tbody > tr { cursor: default; }
.lead-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lead-avatar {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #EEF3FF; color: #2F5BF5; font-size: 13px; font-weight: 500;
}
.lead-meta { min-width: 0; }
.lead-name {
    font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead-phone { margin-top: 3px; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.lead-room {
    display: inline-block; max-width: 330px; padding: 3px 10px;
    border: 1px solid #EDF1F7; border-radius: 8px; background: #F6F8FC;
    color: #4B5563; font-size: 12px; vertical-align: middle;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead-area { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lead-area-loc {
    font-size: 12.5px; color: #4B5563;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lead-area-op {
    flex: 0 0 auto; padding: 1px 7px; border-radius: 6px;
    background: #F4F6FA; color: #7A8494; font-size: 11px;
}
.lead-call { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lead-call-time { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.fill-body { padding: 6px 0 4px; }
.fill-line { margin-top: 14px; font-size: 13px; color: #3A414C; }
.fill-stats { margin-top: 8px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 黑名单库 */
.bl-add-card { margin-bottom: 16px; }
.bl-add { padding: 18px 20px 20px; }
.bl-add-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bl-add-title { font-size: 14px; color: var(--text); }
.bl-add-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.bl-total { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bl-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.bl-field { display: flex; flex-direction: column; gap: 7px; width: 260px; }
.bl-field-grow { flex: 1 1 320px; width: auto; }
.bl-field .ant-input { height: 38px; border-radius: 9px; }
.bl-reason {
    display: inline-block; max-width: 420px; font-size: 12.5px; color: #5A6270;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bl-table .ant-table-tbody > tr { cursor: default; }

/* 人工核查 */
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.review-stat {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.review-stat-ico {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #F3F6FC; color: #5B6472;
}
.review-stat-main { min-width: 0; }
.review-stat-label { font-size: 10.5px; letter-spacing: .08em; color: var(--muted-2); }
.review-stat-value {
    margin-top: 5px; font-size: 22px; line-height: 1; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.review-stat-hint { margin-left: auto; font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.review-flex { height: calc(100vh - 320px); min-height: 500px; }
.review-search { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.review-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.review-item {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; cursor: pointer;
}
.review-item + .review-item { margin-top: 4px; }
.review-item.is-on { background: #F5F8FF; border-color: #DCE6FB; }
.review-lv {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: #F5F7FB; color: #77808F; font-size: 12px;
}
.review-item.is-on .review-lv { background: #E7EEFD; color: #2F5BF5; }
.review-item-main { flex: 1; min-width: 0; }
.review-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-phone { font-size: 13px; color: var(--text); letter-spacing: .02em; }
.review-item-time { flex: 0 0 auto; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.review-item-meta {
    display: flex; align-items: center; gap: 6px; margin-top: 5px;
    font-size: 11.5px; color: var(--muted); overflow: hidden;
}
.review-task { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-sep { color: #C9CFDA; }
.review-detail { position: relative; }
.review-detail .transcript { padding-bottom: 76px; }
.review-detail-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-bottom: 12px; border-bottom: 1px dashed #E7EBF3;
}
.review-detail-id { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.review-detail-phone { font-size: 15px; color: var(--text); letter-spacing: .01em; }
.review-detail-meta { font-size: 11.5px; color: var(--muted); }
.review-loading { flex: 1; display: flex; align-items: center; justify-content: center; }
.review-fab {
    position: absolute; right: 24px; bottom: 24px; z-index: 5;
    display: flex; gap: 10px; padding: 10px 12px;
    border: 1px solid #E7EBF3; border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}
.pager-total { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.mt16 { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }

/* 指标卡 */
.stat-row { margin-bottom: 14px; align-items: stretch !important; }
.stat-row .ant-col { display: flex; }
.stat-row .ant-col > .ant-card { width: 100%; height: 100%; }
.stat-card { position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-label {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; color: var(--muted);
}
.stat-label::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: #C9CED8; flex: 0 0 5px;
}
.stat-ico {
    width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
    background: #F5F6F9; color: #98A0AC;
    display: flex; align-items: center; justify-content: center;
}
.stat-ico .anticon { font-size: 13px !important; }
.stat-value {
    margin-top: 12px;
    font-size: 28px; font-weight: 500; letter-spacing: -.015em; line-height: 1.2;
    color: var(--text); font-variant-numeric: tabular-nums;
}
.stat-suffix { font-size: 13px; font-weight: 500; color: var(--muted-2); margin-left: 4px; }
.stat-hint { margin-top: 6px; font-size: 11px; color: var(--muted-2); }

.stat-card.stat-accent {
    background: linear-gradient(135deg, #3E64FF 0%, #2A50F0 58%, #1D3FD8 100%) !important;
    border-color: transparent !important;
}
.stat-card.stat-accent::after {
    content: ''; position: absolute; right: -46px; top: -56px;
    width: 176px; height: 176px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle at 34% 34%, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 62%);
}
.stat-card.stat-accent .stat-label { color: rgba(255, 255, 255, .74); }
.stat-card.stat-accent .stat-label::before { background: rgba(255, 255, 255, .62); }
.stat-card.stat-accent .stat-value { color: #FFFFFF; }
.stat-card.stat-accent .stat-suffix { color: rgba(255, 255, 255, .72); }
.stat-card.stat-accent .stat-hint { color: rgba(255, 255, 255, .62); }
.stat-card.stat-accent .stat-ico { background: rgba(255, 255, 255, .18); color: #FFFFFF; }
.stat-card.stat-accent .txt-danger { color: rgba(255, 255, 255, .78) !important; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* ---------------------------- 表格 ---------------------------- */
.panel .ant-table { background: transparent !important; }
.panel .ant-table-thead > tr > th {
    background: transparent !important;
    color: #9AA1AE !important;
    font-size: 9.5px !important;
    font-weight: 500 !important;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--line) !important;
    white-space: nowrap;
}
.panel .ant-table-thead > tr > th::before { display: none !important; }
.panel .ant-table-thead > tr > th:first-child,
.panel .ant-table-tbody > tr > td:first-child { padding-inline-start: 18px !important; }
.panel .ant-table-thead > tr > th:last-child,
.panel .ant-table-tbody > tr > td:last-child { padding-inline-end: 18px !important; }
.panel .ant-table-tbody > tr > td {
    padding: 11px 14px !important;
    border-bottom: 1px solid var(--line-2) !important;
    font-size: 12.5px;
    color: var(--text-2);
}
.panel .ant-table-tbody > tr:hover > td { background: #FAFBFC !important; }
.panel .ant-table-tbody > tr.ant-table-row-selected > td { background: var(--primary-soft) !important; }
.panel .ant-table-cell { vertical-align: middle; }
.panel .ant-table-placeholder:hover > td { background: transparent !important; }

.task-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-meta { min-width: 0; }
.task-name {
    font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: -.005em;
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px;
}
.task-sub {
    margin-top: 2px; font-size: 11.5px; color: var(--muted-2);
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px;
}
.task-sub.danger, .txt-danger { color: var(--danger) !important; }
.muted { color: var(--muted) !important; font-size: 12px; }
.txt-primary { color: var(--primary) !important; }
.num { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); }
.cell-strong { font-weight: 500; color: var(--text); }
.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 12px; letter-spacing: -.01em; }

.soft-tag {
    border-radius: 6px !important;
    background: #F4F5F8 !important;
    border-color: #E8EAEF !important;
    color: var(--text-2) !important;
    margin: 0 !important;
    font-size: 11.5px !important;
    padding: 0 7px !important;
    line-height: 20px !important;
}
.soft-tag.good { background: var(--success-bg) !important; border-color: #C6EBD9 !important; color: var(--success) !important; }
.mini-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* 行尾箭头按钮 */
.row-actions { display: flex; justify-content: flex-end; }
.row-chevron.ant-btn {
    width: 26px !important; min-width: 26px !important; height: 26px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border-color: var(--line) !important;
    background: #FFFFFF !important;
    color: #B0B6C0 !important;
    box-shadow: none !important;
}
.row-chevron.ant-btn .anticon { font-size: 10px !important; }
.row-chevron.ant-btn:not(:disabled):hover,
.ant-table-row:hover .row-chevron.ant-btn {
    border-color: var(--primary-line) !important;
    color: var(--primary) !important;
    background: #F7FAFF !important;
}

/* ---------------------------- 工具栏 ---------------------------- */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar.wrap { flex-wrap: wrap; }
.toolbar-title { font-size: 13px; letter-spacing: .02em; color: #232830; }
.pager-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 14px;
}

/* 任务表格 */
.task-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-avatar {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #EFF4FF 0%, #E1EAFF 100%);
    color: var(--primary); font-size: 13px; font-weight: 500;
}
.task-table .ant-table-tbody > tr { cursor: pointer; }

/* 拨打进度条 */
.task-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; padding: 20px; }
.task-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.task-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.task-card-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.task-card-info { flex: 1; min-width: 0; }
.task-card-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.task-card-name { font-size: 15px; font-weight: 500; color: #1E293B; }
.task-card-sub { font-size: 12px; color: #94A3B8; }
.task-card-cause { font-size: 12px; color: #DC2626; }
.task-card-progress { margin-bottom: 10px; }
.task-card-stats { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.tcs-item { text-align: center; }
.tcs-num { font-size: 18px; font-weight: 600; color: #1E293B; line-height: 1.2; }
.tcs-num.green { color: #059669; }
.tcs-num.blue { color: #2563EB; }
.tcs-num.red { color: #DC2626; }
.tcs-label { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.tcs-live { font-size: 12px; color: #2563EB; margin-left: auto; display: flex; align-items: center; gap: 4px; }
.empty-wrap { padding: 60px 20px; }

.task-progress-cell { min-width: 180px; }
.progress-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.progress-bar-wrap { flex: 1; height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.progress-pct { font-size: 12px; font-weight: 500; color: #475569; min-width: 36px; text-align: right; }
.progress-stats { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: #64748B; }
.ps-item { white-space: nowrap; }
.ps-item.ok { color: #059669; }
.ps-item.rate { color: #2563EB; }
.ps-item.bad { color: #DC2626; }
.progress-live { margin-top: 3px; font-size: 11px; color: #2563EB; display: flex; gap: 10px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3B82F6; margin-right: 3px; animation: pulse 1.5s infinite; }
.live-dot.green { background: #10B981; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.task-table .ant-table-thead > tr > th {
    padding: 12px 16px !important;
    background: #FAFBFD !important;
    font-size: 10.5px !important; letter-spacing: .08em !important;
    color: #8A919E !important; font-weight: 500 !important;
    border-bottom: 1px solid var(--line) !important;
}
.task-table .ant-table-tbody > tr > td {
    padding: 14px 16px !important; vertical-align: middle;
    border-bottom: 1px solid #F2F4F8 !important;
}
.task-table .ant-table-tbody > tr:hover > td { background: #F7FAFF !important; }
.task-table .ant-table-tbody > tr > td:first-child,
.task-table .ant-table-thead > tr > th:first-child { padding-inline-start: 20px !important; }
.task-table .ant-table-tbody > tr > td:last-child,
.task-table .ant-table-thead > tr > th:last-child { padding-inline-end: 20px !important; }
.task-table .ant-table-tbody > tr:last-child > td { border-bottom: 0 !important; }

/* 状态徽标 */
.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 24px; padding: 0 11px 0 9px;
    border: 1px solid transparent; border-radius: 999px;
    font-size: 11.5px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
}
.status-badge-dot {
    position: relative; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
}
.status-badge.is-live .status-badge-dot::after {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    background: currentColor; opacity: .16;
    animation: status-pulse 2.4s ease-out infinite;
}
@keyframes status-pulse {
    0% { transform: scale(.9); opacity: .2; }
    70% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* 后台自动刷新提示 */
.auto-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; color: var(--muted-2); white-space: nowrap;
}
.auto-live-dot {
    position: relative; width: 5px; height: 5px; border-radius: 50%;
    background: #0C7F56;
}
.auto-live-dot::after {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    background: #0C7F56; opacity: .18;
    animation: status-pulse 2.4s ease-out infinite;
}

/* 创建时间两行 */
.time-cell { display: flex; flex-direction: column; gap: 2px; }
.time-date { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.time-clock { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.rec-file { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.rec-file-time { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

/* 电话录音 · 检索面板 */
.rec-search {
    margin-bottom: 16px; padding: 22px 24px 18px;
    border: 1px solid #E9EDF5; border-radius: 16px;
    background: #FFFFFF;
}
.rec-search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rec-search-head-main { min-width: 0; }
.rec-search-eyebrow { margin-bottom: 8px; font-size: 10px; letter-spacing: .16em; color: #A6AEBD; }
.rec-search-title { font-size: 16px; font-weight: 500; letter-spacing: .01em; color: #1F242C; }
.rec-search-sub { margin-top: 6px; font-size: 12px; color: #7A8494; }

.rec-search-bar {
    display: flex; align-items: stretch; overflow: hidden;
    max-width: 640px; height: 48px; margin-top: 18px;
    border: 1px solid #E3E8F2; border-radius: 12px;
    background: #FBFCFE;
}
.rec-search-input.ant-input-affix-wrapper {
    flex: 1; height: 46px; padding: 0 16px;
    border: 0; background: transparent; box-shadow: none;
}
.rec-search-input .ant-input { font-size: 13.5px; background: transparent; }
.rec-search-input .ant-input-prefix { margin-inline-end: 10px; }
.rec-search-go.ant-btn {
    height: 46px; padding: 0 30px; border-radius: 0;
    font-size: 13.5px; box-shadow: none;
}

.rec-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.rec-filter-label { margin-right: 2px; font-size: 11.5px; color: #8B94A3; }
.rec-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 13px;
    border: 1px solid #EAEDF4; border-radius: 999px;
    background: #FFFFFF; color: #5B6472;
    font-size: 12px; font-family: inherit; cursor: pointer;
}
.rec-chip b { font-weight: 500; color: #A0A9B8; font-variant-numeric: tabular-nums; }
.rec-chip.is-on { border-color: #C9D7FF; background: #F1F5FF; color: #2F5BF5; }
.rec-chip.is-on b { color: #2F5BF5; }
.rec-reset {
    margin-left: auto; padding: 4px 2px;
    border: 0; background: transparent;
    font-size: 11.5px; font-family: inherit; color: #8B94A3; cursor: pointer;
}
.rec-list-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.rec-list-title { font-size: 13px; letter-spacing: .02em; color: #232830; }
@media (max-width: 900px) {
    .rec-search { padding: 18px; }
    .rec-search-head { flex-direction: column; align-items: stretch; }
    .rec-search-bar { max-width: 100%; }
    .rec-reset { margin-left: 0; }
}
.table-toolbar { margin-bottom: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pager-bar.padded { margin-top: 0; padding: 12px 20px; border-top: 1px solid var(--line); }
.unit { margin-left: 3px; font-size: 11.5px; color: var(--muted-2); }
.group-ellipsis {
    display: inline-block; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; vertical-align: bottom;
}
.link-more { font-size: 12px; color: var(--primary) !important; font-weight: 500; }
.link-more:hover { color: var(--primary-hover) !important; }
.inline-form { display: inline-flex; }

/* ---------------------------- 新建任务向导 ---------------------------- */
.create-page { max-width: 1320px; margin: 0 auto; }
.wizard-shell { display: flex; align-items: flex-start; gap: 18px; }
.wizard-card {
    flex: 1; min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.wizard-steps-wrap { padding: 26px 30px 20px; border-bottom: 1px solid var(--line-2); }
.wizard-steps { margin: 0; }
.wizard-steps .ant-steps-item-title { font-size: 12px !important; font-weight: 500; padding-right: 0 !important; }
.wizard-steps .ant-steps-item-description {
    font-size: 10px !important; color: var(--muted-2) !important;
    letter-spacing: .04em; margin-top: 2px !important;
}
.wizard-steps .ant-steps-item-icon { width: 22px; height: 22px; line-height: 20px; margin-inline-end: 8px; }
.wizard-steps .ant-steps-item-icon .ant-steps-icon { font-size: 11px; line-height: 20px; }
.wizard-steps .ant-steps-item-wait .ant-steps-item-icon { background: #F5F6F9; border-color: var(--line-3); }
.wizard-steps .ant-steps-item-wait .ant-steps-item-icon > .ant-steps-icon { color: var(--muted); }
.wizard-steps .ant-steps-item-process .ant-steps-item-icon { background: var(--primary); border-color: var(--primary); }
.wizard-steps .ant-steps-item-finish .ant-steps-item-icon { background: var(--primary-soft); border-color: var(--primary-line); }
.wizard-steps .ant-steps-item-finish .ant-steps-item-icon > .ant-steps-icon { color: var(--primary); }
.wizard-steps .ant-steps-item-tail::after { background: var(--line) !important; height: 1px !important; }

.wizard-content { padding: 26px 30px 8px; }
.content-head { margin-bottom: 22px; }
.content-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.content-desc { margin-top: 6px; font-size: 12px; color: var(--muted); }

.wizard-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; padding: 16px 30px;
    border-top: 1px solid var(--line-2);
    background: #FCFCFD;
}
.wizard-foot-hint { font-size: 11.5px; color: var(--muted-2); letter-spacing: .02em; }

/* 右侧摘要栏 */
.wizard-aside {
    width: 296px; flex: 0 0 296px;
    display: flex; flex-direction: column; gap: 14px;
    position: sticky; top: 0;
}
.aside-card {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.aside-title {
    margin-bottom: 14px;
    font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted-2);
}
.aside-list { display: flex; flex-direction: column; gap: 11px; }
.aside-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.aside-key { flex: 0 0 auto; color: var(--muted); }
.aside-val { color: var(--text); text-align: right; word-break: break-word; }
.aside-val.is-empty { color: var(--muted-2); }
.aside-tips { margin: 0; padding-left: 14px; display: flex; flex-direction: column; gap: 9px; }
.aside-tips li { font-size: 12px; line-height: 1.65; color: var(--text-2); }
.aside-tips li::marker { color: #C9CED8; }

/* 向导内表单：统一控件高度与标签对齐 */
.wizard-card .field-item .ant-form-item-label { padding-bottom: 8px !important; }
.wizard-card .field-item .ant-form-item-label > label {
    font-size: 12.5px !important; line-height: 18px !important; color: var(--text-2) !important;
}
.wizard-card .field-item .ant-form-item-extra { padding-top: 6px; min-height: 0; font-size: 11px; color: var(--muted-2); }
.wizard-card input.ant-input,
.wizard-card .ant-input-number,
.wizard-card .ant-picker,
.wizard-card .ant-input-affix-wrapper,
.wizard-card .ant-select-single,
.wizard-card .ant-select-single .ant-select-selector { height: 38px !important; }
.wizard-card .ant-select-single .ant-select-selection-item,
.wizard-card .ant-select-single .ant-select-selection-placeholder { line-height: 36px !important; }
.wizard-card .ant-select-single .ant-select-selection-search-input { height: 36px; }
.wizard-card .dyn-row { padding: 10px 12px; background: #FCFCFD; }

/* 表单 */
.field-item { margin-bottom: 0 !important; }
.field-item .ant-form-item-label { padding-bottom: 6px !important; }
.field-item .ant-form-item-label > label {
    font-size: 12px !important; color: var(--text-2) !important;
    height: auto !important; font-weight: 500;
}
.field-item .ant-form-item-extra { padding-top: 5px; font-size: 11px; color: var(--muted-2); min-height: auto; }
.field-hint { font-size: 11px; color: var(--muted-2); }
.field-label { margin-bottom: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); }

.dyn-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px; margin-bottom: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
}
.dyn-sep { color: var(--muted-2); font-size: 12px; }
.panel-tip {
    margin-bottom: 12px; padding: 9px 12px;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface-2);
    font-size: 11.5px; line-height: 1.7; color: var(--text-2);
}
.switch-body { margin-top: 10px; }
.summary {
    margin-top: 10px; padding: 18px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface-2);
}
.summary-title {
    margin-bottom: 12px;
    font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    color: var(--primary);
}
.summary-desc .ant-descriptions-item-label { color: var(--muted) !important; font-size: 12px !important; }
.summary-desc .ant-descriptions-item-content { color: var(--text) !important; font-size: 12px !important; }
.err-list { margin: 0; padding-left: 18px; font-size: 12px; }

.kv .ant-descriptions-item { padding-bottom: 11px; }
.kv .ant-descriptions-item-label { color: var(--muted) !important; font-size: 12px !important; }
.kv .ant-descriptions-item-content { color: var(--text) !important; font-size: 12.5px !important; }

/* ---------------------------- 任务详情 ---------------------------- */
.task-detail { max-width: 1320px; margin: 0 auto; }
.task-detail .page-title { font-size: 28px; letter-spacing: -.02em; }
.task-detail .panel .ant-card-head { min-height: 54px; }
.task-detail .panel .ant-card-head-title { font-size: 14px; }
.task-detail .panel .ant-table-thead > tr > th { padding: 12px 16px !important; }
.task-detail .panel .ant-table-tbody > tr > td { padding: 13px 16px !important; }
.task-detail .panel .ant-table-thead > tr > th:first-child,
.task-detail .panel .ant-table-tbody > tr > td:first-child { padding-inline-start: 20px !important; }
.task-detail .panel .ant-table-thead > tr > th:last-child,
.task-detail .panel .ant-table-tbody > tr > td:last-child { padding-inline-end: 20px !important; }
.task-detail .kv .ant-descriptions-item { padding-bottom: 15px; }
.task-detail .kv .ant-descriptions-item-label { font-size: 12.5px !important; }
.task-detail .kv .ant-descriptions-item-content { font-size: 13px !important; }

/* 任务配置字段卡片 */
.config-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.config-cell {
    min-width: 0;
    padding: 14px 16px;
    border: 1px dashed #DDE3EE; border-radius: 12px;
    background: #FCFDFF;
}
.config-label {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 8px;
    font-size: 11.5px; letter-spacing: .03em; color: #2F3644;
}
.config-ico { display: flex; color: #93A3C4; }
.config-value {
    font-size: 13px; line-height: 1.65; color: #5A6270;
    word-break: break-word; font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) { .config-grid { grid-template-columns: 1fr; } }

/* 任务状态描述：滚动提示 */
.stat-marquee {
    margin-top: 9px; overflow: hidden; white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.stat-marquee-text {
    display: inline-block; padding-left: 100%;
    font-size: 11px; color: var(--danger);
    animation: marquee-move 14s linear infinite;
}
.stat-marquee:hover .stat-marquee-text { animation-play-state: paused; }
@keyframes marquee-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ---------------------------- 通话详情 ---------------------------- */
.detail-page {
    max-width: 1320px; margin: 0 auto;
    display: flex; flex-direction: column;
    height: calc(100vh - 112px);
    min-height: 0;
    overflow: hidden;
}
.detail-page .page-title { font-size: 28px; letter-spacing: -.02em; }
.detail-page .panel .ant-card-head { min-height: 54px; }
.detail-page .panel .ant-card-head-title { font-size: 14px; }

.head-desc { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.head-sep { color: #C9CED8; }
.head-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.head-state i { width: 6px; height: 6px; border-radius: 50%; background: #C2C7D0; }
.head-state.is-on { color: var(--success); }
.head-state.is-on i { background: var(--success); }

.metric-strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.metric { padding: 20px 26px; }
.metric + .metric { border-left: 1px solid var(--line-2); }
.metric-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.metric-value {
    margin-top: 10px;
    font-size: 26px; font-weight: 500; letter-spacing: -.02em;
    color: var(--text); font-variant-numeric: tabular-nums;
}
.metric-unit { margin-left: 4px; font-size: 12px; color: var(--muted-2); }

.info-section + .info-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.info-section-title {
    margin-bottom: 14px;
    font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted-2);
}
.audio-note { margin-top: 10px; font-size: 11px; color: var(--muted-2); }
.empty-note { font-size: 12px; line-height: 1.7; color: var(--muted-2); }
.count-pill {
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 9px;
    border-radius: 999px;
    background: #F3F4F8; color: var(--text-2);
    font-size: 11px; font-variant-numeric: tabular-nums;
}

/* 音频播放器 */
.player {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
}
.player audio { display: none; }
.player-btn {
    width: 38px; height: 38px; flex: 0 0 38px; padding: 0;
    border: 0; border-radius: 50%;
    background: var(--primary); color: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.player-btn:hover { background: var(--primary-hover); }
.player-btn:active { transform: scale(.94); }
.player-bar { flex: 1; min-width: 0; padding: 9px 0; cursor: pointer; }
.player-track { height: 4px; border-radius: 4px; background: #E3E7EF; overflow: hidden; }
.player-fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width .12s linear; }
.player-time { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.player-dl { display: flex; align-items: center; color: var(--muted); }
.player-dl:hover { color: var(--primary); }
.player.sm { padding: 7px 10px; gap: 8px; border-radius: 9px; background: #F8F9FC; }
.player.sm .player-btn { width: 26px; height: 26px; flex-basis: 26px; }
.player.sm .player-track { height: 3px; }
.player.sm .player-time { font-size: 10.5px; }

/* 底部悬浮播放器 */
.float-player {
    position: fixed; z-index: 60;
    left: 278px; right: 26px; bottom: 18px;
    max-width: 760px; margin: 0 auto;
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
    animation: fp-in .22s ease-out;
}
@keyframes fp-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.fp-info { flex: 0 0 auto; width: 190px; min-width: 0; }
.fp-title {
    font-size: 13px; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fp-sub {
    margin-top: 2px; font-size: 11px; color: var(--muted-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.float-player .player { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; }
.fp-close.ant-btn { flex: 0 0 auto; color: var(--muted); }
.fp-close.ant-btn:not(:disabled):hover { color: var(--text-2); background: #F3F5F9; }

/* 对话记录 */
.tr-item { display: flex; flex-direction: column; gap: 7px; max-width: 78%; }
.tr-item.is-user { align-self: flex-end; align-items: flex-end; }
.tr-head { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-2); }
.tr-role { padding: 1px 9px; border-radius: 999px; background: #F2F4F8; color: var(--text-2); font-size: 11px; }
.tr-item.is-user .tr-role { background: var(--primary-soft); color: var(--primary); }
.tr-seq { font-variant-numeric: tabular-nums; }
.tr-bubble {
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 13px; line-height: 1.8; color: var(--text);
}
.tr-item.is-ai .tr-bubble { background: #F7F9FD; }
.tr-text { white-space: pre-wrap; word-break: break-word; }
.tr-item .player { min-width: 240px; max-width: 100%; }

/* ---------------------------- 上传 / 代码块 ---------------------------- */
.ant-upload-drag {
    border-radius: 10px !important;
    background: var(--surface-2) !important;
    border: 1px dashed var(--line-3) !important;
}
.ant-upload-drag:hover { border-color: var(--primary) !important; background: #FFFFFF !important; }
.up-icon { color: var(--primary); margin-bottom: 8px; }
.up-title { font-size: 12px; font-weight: 500; color: var(--text-2); }
.up-hint { margin-top: 4px; font-size: 11px; color: var(--muted-2); }

/* ---------------------------- 号码导入 ---------------------------- */
.import-editor {
    border: 1px solid var(--line); border-radius: 12px;
    overflow: hidden; background: var(--surface);
}
.editor-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}
.editor-title { font-size: 12.5px; color: var(--text-2); }
.editor-count { font-size: 11.5px; color: var(--muted); }
.editor-area.ant-input {
    border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    padding: 14px; min-height: 282px; resize: vertical;
    font-size: 12.5px; line-height: 1.9; font-family: inherit;
}
.import-drop .ant-upload-drag { border-radius: 12px; }
.import-drop .ant-upload-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 306px; padding: 24px !important;
}
.import-help {
    height: 100%; padding: 16px 18px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface-2);
}
.help-title { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.help-sample {
    margin: 0 0 14px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    font-size: 11px; line-height: 1.8; color: var(--muted);
    white-space: pre-wrap; word-break: break-all;
    font-family: 'SFMono-Regular', Consolas, monospace;
}
.help-sub { font-size: 11.5px; color: var(--muted-2); margin-bottom: 6px; }
.help-list { margin: 0 0 12px; padding-left: 16px; font-size: 12px; color: var(--text-2); line-height: 2; }
.help-note { font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.import-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.import-foot-info { font-size: 12px; color: var(--muted); }

/* ---------------------------- 手动拨号 ---------------------------- */
.dial-form { max-width: 1320px; margin: 0 auto; }
.dial-card .ant-card-body { padding: 24px; }
.dial-card .ant-card-head { min-height: 54px; }
.dial-card .ant-card-head-title { font-size: 14px; }
.dial-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; color: var(--muted);
}
.dial-status i {
    width: 6px; height: 6px; border-radius: 50%;
    background: #B7BECB; display: inline-block;
}
.dial-status.on { color: #0C7F56; }
.dial-status.on i { background: #12A46E; }
.dial-input-row { display: flex; gap: 10px; align-items: stretch; }
.dial-num.ant-input {
    flex: 1; width: auto; height: 74px; padding: 0 18px;
    border: 1px dashed #DDE3EE; border-radius: 14px;
    background: #FCFDFF; box-shadow: none;
    text-align: center; font-size: 26px; letter-spacing: .12em;
    font-variant-numeric: tabular-nums; color: #232830;
}
.dial-num.ant-input::placeholder { font-size: 14px; letter-spacing: 0; color: #B7BECB; }
.dial-paste.ant-btn {
    height: 74px !important; padding: 0 18px !important;
    border-radius: 14px !important;
    border-color: #DDE3EE !important; color: var(--muted) !important;
    background: #FFFFFF !important;
}
.dial-hint {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 10px;
    font-size: 11.5px; color: var(--muted-2);
}
.dial-count { font-variant-numeric: tabular-nums; color: var(--muted-2); }
.dial-count.ok { color: #0C7F56; }
.dial-pad {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px; margin-top: 16px;
}
.dial-key {
    height: 58px; padding: 0; cursor: pointer;
    border: 1px solid #E8ECF3; border-radius: 12px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
    color: #2F3644;
    font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.dial-key.fn {
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 400; color: var(--muted);
}
.dial-key:active { background: #F5F8FE; border-color: #DCE3F5; }
.dial-call { margin-top: 18px; height: 44px !important; }

/* 外呼配置 */
.dial-config {
    margin-top: 20px; padding: 18px;
    border: 1px solid #EDF0F5; border-radius: 14px;
    background: #FCFDFF;
}
.dial-config-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 16px;
}
.dial-config-title { font-size: 13px; letter-spacing: .02em; color: #232830; }
.dial-config-sub { margin-top: 4px; font-size: 11.5px; color: var(--muted-2); }
.dial-config-badge {
    flex: 0 0 auto; height: 22px; padding: 0 9px;
    display: inline-flex; align-items: center; border-radius: 999px;
    border: 1px solid #DDE6F7; background: #F2F7FF;
    font-size: 11px; color: #3B5BA9;
}
.dial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.dial-field { min-width: 0; }
.dial-label {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 7px; font-size: 11.5px; color: #5B6472;
}
.dial-label::before {
    content: ''; width: 3px; height: 3px; border-radius: 50%;
    background: #C6D0E4;
}
.dial-field .ant-select-selector {
    height: 38px !important; border-radius: 9px !important;
}
.dial-field .ant-select-selection-item,
.dial-field .ant-select-selection-placeholder { line-height: 36px !important; }
.dial-field .ant-input { height: 38px; border-radius: 9px; }
.dial-note {
    margin-top: 16px; padding-top: 14px;
    border-top: 1px dashed #E9EDF4;
    font-size: 11.5px; line-height: 1.8; color: var(--muted-2);
}

/* 右侧拨打记录 */
.dial-log-card { height: 100%; display: flex; flex-direction: column; }
.dial-log-card .ant-card-body {
    flex: 1; min-height: 0; padding: 0;
    display: flex; flex-direction: column;
}
.dial-log { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 0; }
.dial-log-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 20px; border-bottom: 1px solid #F2F4F8;
    text-decoration: none; color: inherit;
}
.dial-log-item:last-child { border-bottom: 0; }
.log-main { min-width: 0; }
.log-phone {
    font-size: 13.5px; letter-spacing: .03em; color: #232830;
    font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-meta {
    display: flex; gap: 6px; margin-top: 3px;
    font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.log-dot { color: #D3D8E2; }
.log-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.log-chev { display: flex; color: #B7BECB; }
.dial-log-empty { padding: 70px 0; }
@media (max-width: 1100px) {
    .dial-grid { grid-template-columns: minmax(0, 1fr); }
    .dial-log-card { height: auto; }
    .dial-log { max-height: 420px; }
}
@media (max-width: 900px) {
    .dial-num.ant-input { height: 62px; font-size: 22px; }
    .dial-paste.ant-btn { height: 62px !important; }
    .dial-key { height: 48px; font-size: 16px; }
}

/* ---------------------------- 登录（左右分栏） ---------------------------- */
.auth-page { display: flex; min-height: 100vh; background: var(--surface); }
.auth-brand {
    position: relative; overflow: hidden;
    flex: 1 1 54%; max-width: 62%;
    display: flex; flex-direction: column;
    padding: 46px 56px;
    color: #FFFFFF;
    background:
        radial-gradient(720px 420px at 84% 108%, rgba(74, 112, 255, .42) 0%, rgba(74, 112, 255, 0) 62%),
        radial-gradient(560px 360px at 6% -8%, rgba(74, 112, 255, .20) 0%, rgba(74, 112, 255, 0) 60%),
        linear-gradient(158deg, #0B1120 0%, #12244E 52%, #1B3A86 100%);
}
.auth-brand::after {
    content: ''; position: absolute; right: -180px; bottom: -220px;
    width: 520px; height: 520px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 90px rgba(255, 255, 255, .022), 0 0 0 180px rgba(255, 255, 255, .014);
    pointer-events: none;
}
.auth-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-logo { filter: brightness(0) invert(1); }
.auth-brand-name { font-size: 14px; font-weight: 500; letter-spacing: -.01em; color: #FFFFFF; }
.auth-brand-sub { margin-top: 4px; font-size: 9px; letter-spacing: .18em; color: rgba(255, 255, 255, .46); }
.auth-brand-body { position: relative; z-index: 1; margin: auto 0; max-width: 470px; padding: 40px 0; }
.auth-headline {
    margin: 0 0 18px;
    font-size: 34px; line-height: 1.32; font-weight: 500; letter-spacing: -.02em;
    color: #FFFFFF;
}
.auth-lead { margin: 0 0 34px; font-size: 13.5px; line-height: 1.95; color: rgba(255, 255, 255, .62); }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.auth-point-ico {
    width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .10); color: #A9C1FF;
}
.auth-brand-foot { position: relative; z-index: 1; font-size: 11px; letter-spacing: .04em; color: rgba(255, 255, 255, .34); }

.auth-form-side {
    flex: 1 1 46%;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
    background: var(--surface);
}
.auth-form { width: 356px; max-width: 100%; }
.auth-eyebrow {
    margin-bottom: 12px;
    font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--muted-2);
}
.auth-title { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
.auth-sub { margin: 8px 0 28px; font-size: 12.5px; color: var(--muted); }
.auth-form .ant-input-affix-wrapper { height: 44px; border-radius: 9px; }
.auth-form .ant-input-affix-wrapper > input.ant-input { height: 100%; }
.auth-submit { width: 100%; height: 44px !important; margin-top: 24px; font-size: 14px !important; letter-spacing: .08em; }
.auth-foot {
    margin-top: 26px; padding-top: 16px;
    border-top: 1px solid var(--line-2);
    text-align: center; font-size: 10.5px; color: var(--muted-2); letter-spacing: .03em;
}

/* ---------------------------- 登录 / 安装（居中卡片） ---------------------------- */
.login-wrap {
    position: relative;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background:
        radial-gradient(820px 360px at 50% -8%, #E7EDFF 0%, rgba(231, 237, 255, 0) 70%),
        var(--bg);
}
.login-glow {
    position: absolute; width: 560px; height: 560px; border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 91, 245, .07), rgba(47, 91, 245, 0) 68%);
    pointer-events: none;
}
.login-card {
    width: 400px; max-width: 100%;
    padding: 32px 30px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 36px rgba(16, 24, 40, .06);
}
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.login-title { font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; }
.login-sub { margin-top: 3px; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.login-head { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.login-lead { margin: 7px 0 22px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.login-caption { margin-bottom: 18px; font-size: 12px; line-height: 1.75; color: var(--text-2); }
.login-btn { height: 42px !important; margin-top: 22px; font-size: 13.5px !important; letter-spacing: .06em; }
.login-foot {
    margin-top: 20px; padding-top: 14px;
    border-top: 1px solid var(--line-2);
    text-align: center; font-size: 10.5px; color: var(--muted-2); letter-spacing: .03em;
}
.mt18 { margin-top: 18px; }

/* ---------------------------- antd 细节 ---------------------------- */
.ant-btn { border-radius: 8px; font-weight: 500; }
.ant-btn-primary { font-weight: 500; box-shadow: 0 1px 2px rgba(47, 91, 245, .20) !important; }
.ant-btn-primary:not(:disabled):hover { box-shadow: 0 3px 8px rgba(47, 91, 245, .24) !important; }
.ant-btn-default { border-color: var(--line-3) !important; color: var(--text) !important; background: #FFFFFF !important; }
.ant-btn-default:not(:disabled):hover {
    border-color: var(--primary-line) !important;
    color: var(--primary) !important;
    background: #FFFFFF !important;
}
.ant-btn-link { color: var(--primary) !important; }
.ant-btn-text:hover { background: #F3F5F9 !important; }
.neutral-action.ant-btn { color: var(--muted) !important; }
.neutral-action.ant-btn:not(:disabled):hover { color: var(--text-2) !important; background: #F3F5F9 !important; }
.dyn-del.ant-btn { color: var(--muted-2) !important; }
.dyn-del.ant-btn:not(:disabled):hover { color: var(--text-2) !important; background: #F1F3F7 !important; }

.ant-input,
.ant-input-affix-wrapper,
.ant-select-selector,
.ant-input-number,
.ant-picker {
    border-radius: 8px !important;
    border-color: var(--line-3) !important;
}
.ant-input:hover,
.ant-input-affix-wrapper:hover,
.ant-select:not(.ant-select-disabled):hover .ant-select-selector,
.ant-input-number:hover,
.ant-picker:hover {
    border-color: var(--primary-line) !important;
}
.ant-input::placeholder,
.ant-select-selection-placeholder,
.ant-picker-input > input::placeholder { color: var(--muted-2) !important; }
.ant-select-dropdown { border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .12) !important; }
.ant-select-item { border-radius: 6px; font-size: 12.5px; }
.ant-select-item-option-selected { background: var(--primary-soft) !important; color: var(--primary) !important; font-weight: 500; }

.ant-dropdown-menu {
    padding: 4px !important; border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .14) !important;
}
.ant-dropdown-menu .ant-dropdown-menu-item {
    border-radius: 6px; padding: 5px 9px !important; font-size: 12.5px;
}
.ant-dropdown-menu .ant-dropdown-menu-item .anticon { font-size: 12px; }

.ant-segmented { background: #F4F5F8 !important; border-radius: 9px !important; padding: 3px !important; }
.ant-segmented .ant-segmented-item { border-radius: 7px !important; font-size: 12px; color: var(--text-2); }
.ant-segmented .ant-segmented-item-selected {
    color: var(--text) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .10), 0 0 0 1px var(--line) !important;
}
.ant-segmented .ant-segmented-thumb { border-radius: 7px !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .10) !important; }

.ant-alert { border-radius: 10px !important; font-size: 12.5px; }
.ant-empty-description { color: var(--muted-2) !important; font-size: 12px; }
.ant-pagination .ant-pagination-item { border-radius: 7px !important; }
.ant-pagination .ant-pagination-item-active { background: var(--primary-soft) !important; border-color: var(--primary-line) !important; }
.ant-pagination .ant-pagination-item-active a { color: var(--primary) !important; }
.ant-form-item-label > label.ant-form-item-required::before { color: var(--muted-2) !important; }
.ant-descriptions .ant-descriptions-item-label { font-size: 12px; }
.ant-tag { border-radius: 6px; }
.ant-collapse-borderless > .ant-collapse-item > .ant-collapse-header { padding: 6px 0; }
.ant-table-wrapper .ant-table-container { border-radius: 10px; }
.ant-tooltip-inner { border-radius: 8px !important; font-size: 12px; }
.ant-steps .ant-steps-item-process .ant-steps-item-icon {
    background: var(--primary); border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(47, 91, 245, .24);
}
.ant-avatar { font-size: 11px; }

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 1240px) {
    .wizard-aside { display: none; }
}

@media (max-width: 1080px) {
    .side-col { width: 236px; flex-basis: 236px; }
    .content { padding: 20px 18px 30px; }
    .top-search { width: 210px; }
    .detail-page { height: calc(100vh - 106px); }
    .float-player { left: 260px; }
}

@media (max-width: 980px) {
    .auth-page { flex-direction: column; }
    .auth-brand { flex: none; max-width: none; padding: 20px 22px; }
    .auth-brand-body, .auth-brand-foot { display: none; }
    .auth-brand::after { display: none; }
    .auth-form-side { flex: 1; align-items: flex-start; padding: 32px 22px 48px; }
    .auth-form { width: 100%; max-width: 380px; margin: 0 auto; }
}

@media (max-width: 900px) {
    .app-layout { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
    .side-col {
        width: 100%; flex: none;
        flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px;
        padding: 10px 14px;
        border-right: 0; border-bottom: 1px solid var(--line);
    }
    .side-brand { padding: 0; flex: 1 1 auto; }
    .brand-sub { display: none; }
    .side-menu.ant-menu { flex: 1 1 100%; display: flex; gap: 4px; border: 0 !important; }
    .side-menu .ant-menu-item { flex: 1; margin: 0 !important; display: flex; align-items: center; justify-content: center; }
    .side-menu .nav-label { justify-content: center; }
    .side-menu .nav-count { display: none; }
    .side-user { order: 2; flex: 0 1 auto; margin-left: auto; }
    .main-col { min-height: 0; }
    .topbar { flex: none; height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
    .topbar-right { flex: 1 1 auto; justify-content: flex-end; }
    .top-search { width: 100%; max-width: 280px; }
    .topbar-sep, .top-clock { display: none; }
    .content { overflow: visible; padding: 16px 14px 28px; }
    .page-title { font-size: 22px; }
    .stat-value { font-size: 26px; }
    .metric-strip { grid-template-columns: repeat(2, 1fr); }
    .metric:nth-child(3) { border-left: 0; }
    .metric:nth-child(n+3) { border-top: 1px solid var(--line-2); }
    .detail-page { height: auto; overflow: visible; }
    .detail-page .record-flex { flex: none; flex-direction: column; }
    .detail-page .record-side { width: 100% !important; flex: none !important; overflow: visible !important; padding-right: 0 !important; }
    .float-player { left: 14px; right: 14px; bottom: 14px; }
    .fp-info { width: 130px; }
    .tr-item { max-width: 100%; }
    .wizard-steps-wrap, .wizard-content, .wizard-foot { padding-left: 16px; padding-right: 16px; }
    .wizard-steps .ant-steps-item-description { display: none; }
}

@media (max-width: 640px) {
    .toolbar { align-items: stretch; }
    .toolbar > .ant-segmented { width: 100%; overflow-x: auto; }
    .pager-bar { flex-direction: column; align-items: flex-start; }
    .login-wrap { padding: 18px; }
    .login-card { padding: 26px 20px 22px; }
    .dyn-row { flex-wrap: wrap; }
}

