.clients-section { max-width: 1240px; }.clients-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }.clients-header h2 { margin: 0; font-size: 23px; }.clients-header p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 13px; }.clients-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.import-client-button { display: inline-flex; align-items: center; cursor: pointer; }.client-admin-bar,.client-batch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #dce7f5; border-radius: 10px; color: #66758a; background: #f7faff; font-size: 12px; }.client-admin-bar label,.client-batch-bar label,.client-owner-actions label { display: flex; align-items: center; gap: 7px; color: #56677d; font-size: 12px; font-weight: 700; }.client-admin-bar select,.client-batch-bar select,.client-owner-actions select { min-height: 34px; padding: 6px 8px; border: 1px solid #d4dfeb; border-radius: 7px; color: #34495f; background: #fff; }.client-batch-bar { border-color: #c4d8f7; background: #eef5ff; }.client-batch-bar span { margin-right: auto; color: #3264ad; font-weight: 800; }.client-batch-bar .primary-button,.client-batch-bar .secondary-button { padding: 8px 11px; font-size: 12px; }.client-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }.client-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; text-align: left; background: #fff; }.client-stat.active { border-color: #8ea4dd; box-shadow: 0 0 0 2px #eef3ff; }.client-stat span { display: block; color: #7f8b9b; font-size: 12px; font-weight: 700; }.client-stat strong { display: block; margin-top: 5px; color: #344356; font-size: 24px; }.client-stat.warning-stat { border-color: #f0d69a; background: #fffaf0; }.client-stat.warning-stat strong { color: #a8781a; }.client-stat.danger-stat { border-color: #f0bdc0; background: #fff5f5; }.client-stat.danger-stat strong { color: #bd4b54; }.client-stat.pool-stat { border-color: #d7c9e8; background: #faf7ff; }.client-stat.pool-stat strong { color: #76549e; }.client-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }.client-filters label,.client-edit-grid label { display: grid; gap: 5px; color: #758297; font-size: 11px; font-weight: 700; }.client-filters select,.client-edit-grid input,.client-edit-grid select { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #dce3ec; border-radius: 7px; color: #47576b; background: #fff; }.clients-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; }.client-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; }.client-table { width: 100%; min-width: 820px; border-collapse: collapse; text-align: left; }.client-table th { padding: 12px 13px; color: #718096; background: #f8fafc; font-size: 11px; white-space: nowrap; }.client-table td { padding: 12px 13px; border-top: 1px solid #edf0f4; color: #607084; font-size: 12px; vertical-align: middle; }.client-table td small { color: #9aa6b4; font-size: 11px; }.client-table tbody tr { cursor: pointer; }.client-table tbody tr:hover,.client-table tbody tr.selected { background: #fafbfe; }.client-table td:nth-child(2) { color: #344355; font-weight: 800; }.client-select-column { width: 38px; text-align: center; }.client-select-column input { width: 16px; height: 16px; accent-color: var(--blue); }.client-status { display: inline-block; padding: 4px 7px; border-radius: 999px; color: #447d5c; background: #edf8f1; font-size: 11px; font-weight: 800; white-space: nowrap; }.client-status.warning { color: #a8781a; background: #fff3d5; }.client-status.danger { color: #bd4b54; background: #ffe4e5; }.client-status.pool { color: #76549e; background: #efe8fb; }.client-empty { padding: 35px; color: var(--muted); text-align: center; }.client-detail { position: sticky; top: 20px; min-height: 450px; padding: 20px; border: 1px solid #e1e8f2; border-radius: 13px; background: #fbfcfe; }.client-detail-empty { display: grid; min-height: 390px; place-items: center; color: #8b98aa; text-align: center; font-size: 13px; }.client-detail h3 { margin: 4px 0; color: #334052; font-size: 21px; }.client-phone { margin: 0; color: #7a889b; font-size: 13px; }.client-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }.client-profile-item { color: #8490a1; font-size: 11px; }.client-profile-item strong { display: block; margin-top: 4px; color: #465466; font-size: 12px; line-height: 1.5; }.client-owner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -6px 0 14px; }.client-owner-actions p { margin: 0; color: #8a6b3e; font-size: 12px; }.client-owner-actions .primary-button,.client-owner-actions .secondary-button { padding: 8px 11px; font-size: 12px; }.client-edit-box { margin-bottom: 16px; padding: 13px; border: 1px solid #e1e7f1; border-radius: 9px; background: #fff; }.client-edit-box h4 { margin: 0 0 10px; color: #617086; font-size: 12px; }.client-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 11px; }.client-edit-box .secondary-button { width: 100%; padding: 8px; font-size: 12px; }.client-todo-button { width: 100%; }.follow-up-box { display: grid; gap: 8px; margin-top: 18px; padding-top: 17px; border-top: 1px solid #e5ebf4; }.follow-up-box label { display: grid; gap: 6px; color: #66758a; font-size: 12px; font-weight: 700; }.follow-up-box textarea { min-height: 90px; padding: 9px; border: 1px solid #d9e2ef; border-radius: 8px; font: inherit; resize: vertical; }.follow-up-box small,.first-follow-label small { color: #9aa5b3; font-size: 11px; font-weight: 500; line-height: 1.45; }.follow-history { margin-top: 18px; }.follow-history h4 { margin: 0 0 10px; color: #58677b; font-size: 13px; }.follow-history-item { padding: 10px 0; border-top: 1px solid #e7ecf3; color: #66758a; font-size: 12px; line-height: 1.55; }.follow-history-item time { display: block; margin-bottom: 3px; color: #9ba6b4; font-size: 11px; }.client-footnote { margin: 14px 0 0; color: #8792a1; font-size: 12px; }.client-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.client-form-grid label,.first-follow-label { display: grid; gap: 6px; }.client-form-grid input,.client-form-grid select { width: 100%; }.first-follow-label { margin-top: 15px; }.first-follow-label textarea { min-height: 150px; }
@media (max-width: 1020px) { .clients-layout { grid-template-columns: 1fr; }.client-detail { position: static; }.client-table-wrap { overflow-x: auto; }.client-table { min-width: 740px; } } @media (max-width: 680px) { .clients-header { display: grid; }.clients-actions { flex-wrap: wrap; }.client-stats,.client-filters,.client-form-grid { grid-template-columns: 1fr 1fr; } } @media (max-width: 440px) { .client-stats,.client-filters,.client-form-grid,.client-edit-grid { grid-template-columns: 1fr; } }

#clientDialog { width: min(680px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
#clientPoolDialog { width: min(480px, calc(100% - 32px)); }
#clientPoolForm { display: grid; gap: 15px; padding: 26px; }
#clientPoolForm label { display: grid; gap: 7px; color: #526176; font-size: 13px; font-weight: 700; }
#clientPoolForm select { min-height: 40px; padding: 9px 10px; border: 1px solid #d8e1ed; border-radius: 8px; color: var(--ink); background: #fff; }
.client-pool-tip { margin: 0; padding: 10px; border-radius: 8px; color: #756090; background: #f6f1ff; font-size: 12px; line-height: 1.6; }
#clientForm { padding: 28px; }
#clientForm .dialog-header { padding-bottom: 17px; border-bottom: 1px solid #e8edf3; }
#clientForm .client-form-grid { gap: 15px 16px; }
#clientForm label { color: #526176; font-size: 13px; font-weight: 700; }
#clientForm input,#clientForm select,#clientForm textarea { padding: 11px 12px; border: 1px solid #d8e1ed; border-radius: 8px; color: var(--ink); background: #fff; outline-color: #91a9ec; }
#clientForm .first-follow-label { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e8edf3; }
.client-edit-toggle { width: 100%; margin-bottom: 12px; }
.client-edit-box { margin-top: 0; }

.clients-layout { display: block; }
#clientDetailDialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
#clientDetailDialog .client-detail { position: relative; min-height: 0; padding: 30px; border: 0; border-radius: 0; background: #fbfcfe; }
#clientDetailDialog .client-detail-empty { min-height: 280px; }
.client-detail-close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border: 0; border-radius: 9px; color: #627389; background: #edf2f8; font-size: 24px; line-height: 1; }
#clientDetailDialog .client-profile { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 16px; border: 1px solid #e2e8f1; border-radius: 10px; background: #fff; }
#clientDetailDialog .client-edit-toggle { width: auto; margin: 16px 0; }
#clientDetailDialog .follow-up-box { margin-top: 22px; }
@media (max-width: 760px) { .client-filters { grid-template-columns: 1fr 1fr; }.client-admin-bar,.client-batch-bar { align-items: stretch; }.client-admin-bar label,.client-batch-bar label { display: grid; }.client-admin-bar select,.client-batch-bar select { width: 100%; } }
@media (max-width: 620px) { #clientDetailDialog .client-detail { padding: 22px; }.client-detail-close { top: 13px; right: 13px; }#clientDetailDialog .client-profile { grid-template-columns: 1fr 1fr; }.client-owner-actions { align-items: stretch; }.client-owner-actions label { display: grid; flex: 1 1 100%; }.client-owner-actions button { width: 100%; } }

.client-detail-tools { display:grid; grid-template-columns:1fr 1fr; gap:9px; }.client-detail-tools .client-todo-button { width:auto; }.client-follow-templates { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }.client-follow-templates button { padding:6px 9px; border:1px solid #d5e3f6; border-radius:999px; color:#4671b8; background:#f5f9ff; font-size:11px; font-weight:700; }.client-viewing-form { padding:24px; }.client-viewing-form > p { margin:0 0 16px; color:#7b899b; font-size:13px; }.client-viewing-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.client-viewing-options button { min-height:54px; border:1px solid #d7e4f5; border-radius:10px; color:#3766a8; background:#f7faff; font-weight:800; }.client-viewing-options button:hover { border-color:#7e9de0; background:#edf4ff; }
@media (max-width:440px) { .client-detail-tools,.client-viewing-options { grid-template-columns:1fr; }.client-inline-follow-head { align-items:stretch; flex-direction:column; } }

.client-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-right:46px; }
.client-detail-heading > span { margin-top:4px; padding:5px 8px; border:1px solid #dbe5f1; border-radius:999px; color:#718198; background:#fff; font-size:10px; font-weight:800; white-space:nowrap; }
.client-detail-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin:15px 0 13px; padding:4px; border:1px solid #dfe7f1; border-radius:10px; background:#eef3f8; }
.client-detail-tabs button { min-height:34px; border:0; border-radius:7px; color:#6d7d91; background:transparent; font-size:12px; font-weight:800; cursor:pointer; }
.client-detail-tabs button:hover { color:#2d5f9d; background:#f7faff; }
.client-detail-tabs button.active { color:#174f91; background:#fff; box-shadow:0 1px 4px rgba(35,61,94,.12); }
.client-detail-tabs button:focus-visible { outline:2px solid #7aa7df; outline-offset:1px; }
.client-tab-panel { min-height:180px; }
.client-tab-panel[hidden] { display:none; }
.client-tab-panel .client-profile { margin-top:0; }
.client-inline-follow { margin-top:16px; padding-top:16px; border-top:1px solid #dfe7f1; }
.client-inline-follow-head { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.client-inline-follow-head > div:first-child span { color:#7c8b9f; font-size:10px; font-weight:800; letter-spacing:.06em; }
.client-inline-follow-head h4 { margin:3px 0 0; color:#30455f; font-size:14px; }
.client-inline-follow .follow-up-box { margin-top:12px; padding:13px; border:1px solid #dfe7f1; border-radius:10px; background:#fff; }
.client-inline-follow .follow-history { margin-top:14px; padding:0 2px; }
.client-battle-card { display:grid; gap:10px; }
.client-battle-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:14px 15px; border:1px solid #dbe7f5; border-left:4px solid #4b7ebd; border-radius:10px; background:linear-gradient(110deg,#f4f8fd 0%,#fff 76%); }
.client-battle-hero.warning { border-left-color:#d7a43c; background:linear-gradient(110deg,#fff9eb 0%,#fff 76%); }
.client-battle-hero.danger { border-left-color:#d75d63; background:linear-gradient(110deg,#fff4f4 0%,#fff 76%); }
.client-battle-hero div > span { color:#56708f; font-size:10px; font-weight:800; letter-spacing:.04em; }
.client-battle-hero h4 { margin:5px 0 0; color:#243b58; font-size:15px; line-height:1.5; }
.client-battle-hero p { margin:5px 0 0; color:#8290a1; font-size:10px; line-height:1.5; }
.client-battle-hero > em { flex:none; margin:1px 0 0; padding:5px 8px; border-radius:999px; color:#32679f; background:#e8f2fd; font-size:10px; font-style:normal; font-weight:900; white-space:nowrap; }
.client-battle-hero.warning > em { color:#956a14; background:#fff0c9; }
.client-battle-hero.danger > em { color:#ae4147; background:#ffe1e2; }
.client-battle-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(210px,.65fr); gap:10px; align-items:start; }
.client-battle-section { padding:12px; border:1px solid #dfe7f0; border-radius:10px; background:#fff; }
.client-battle-section > header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.client-battle-section > header span { display:block; color:#8390a0; font-size:9px; font-weight:800; letter-spacing:.08em; }
.client-battle-section > header h4 { margin:3px 0 0; color:#30455f; font-size:13px; }
.client-battle-section > header > em { color:#76879a; font-size:10px; font-style:normal; white-space:nowrap; }
.client-battle-fields { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.client-battle-field { min-width:0; padding:8px 9px; border:1px solid #e7ecf2; border-radius:8px; background:#f9fbfd; }
.client-battle-field > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.client-battle-field span { color:#697b91; font-size:9px; font-weight:800; }
.client-battle-field em { color:#4a7baf; font-size:8px; font-style:normal; font-weight:800; }
.client-battle-field strong { display:block; margin-top:5px; color:#364b64; font-size:11px; line-height:1.45; }
.client-battle-field.inferred { border-color:#dce8f6; background:#f6faff; }
.client-battle-field.missing { border-style:dashed; background:#fcfcfd; }
.client-battle-field.missing em,.client-battle-field.missing strong { color:#9a7a4f; }
.client-battle-actions ol { display:grid; gap:7px; margin:0; padding:0; list-style:none; counter-reset:battle-action; }
.client-battle-actions li { display:grid; gap:7px; padding:9px; border-radius:8px; background:#f7f9fc; counter-increment:battle-action; }
.client-battle-actions li > div { display:grid; grid-template-columns:auto 1fr; gap:3px 7px; }
.client-battle-actions li > div::before { content:counter(battle-action); grid-row:1 / span 2; display:grid; place-items:center; width:20px; height:20px; border-radius:6px; color:#fff; background:#4b79b3; font-size:9px; font-weight:900; }
.client-battle-actions li strong { color:#3c5069; font-size:11px; line-height:1.35; }
.client-battle-actions li span { color:#8491a1; font-size:9px; line-height:1.45; }
.client-battle-actions button { min-height:30px; border:1px solid #cbdcf1; border-radius:7px; color:#2f69aa; background:#fff; font-size:10px; font-weight:800; cursor:pointer; }
.client-battle-actions button:hover { border-color:#7fa4d4; background:#eef5fd; }
.client-battle-actions button:focus-visible { outline:2px solid #7aa7df; outline-offset:1px; }
.client-battle-footnote { margin:0; color:#8b97a6; font-size:9px; line-height:1.5; }

@media (max-width:700px) {
  .client-battle-layout { grid-template-columns:1fr; }
  .client-battle-actions ol { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:520px) {
  .client-detail-heading { padding-right:36px; }
  .client-detail-heading > span { display:none; }
  .client-detail-tabs { margin-top:12px; }
  .client-detail-tabs button { font-size:11px; }
  .client-battle-hero { display:grid; gap:8px; }
  .client-battle-hero > em { justify-self:start; }
  .client-battle-fields { grid-template-columns:1fr; }
  .client-battle-actions ol { grid-template-columns:1fr; }
}

.clients-section { max-width: none; }.clients-header { align-items: center; margin-bottom: 16px; padding-bottom: 15px; border-bottom: 1px solid #e7edf5; }.clients-header h2 { font-size: 22px; }.client-filter-panel { margin-bottom: 14px; padding: 13px 14px; border: 1px solid #e0e7f0; border-radius: 12px; background: #fff; }.client-filter-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 11px; }.client-search-field { display: grid; gap: 5px; flex: 1 1 300px; max-width: 430px; color: #758297; font-size: 11px; font-weight: 700; }.client-search-field input { width: 100%; padding: 9px 10px; border: 1px solid #dce3ec; border-radius: 8px; color: #47576b; background: #fbfcfe; outline-color: #91a9ec; }.client-filter-head > span { color: #8492a4; font-size: 12px; white-space: nowrap; }.client-filter-panel .client-filters { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }.clients-layout { display: block; }.client-table-wrap { border-radius: 12px; }.deals-section { max-width: 1080px; }.deals-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #e5ebf3; }.deals-header h2 { margin: 0; color: #293d5a; font-size: 24px; }.deals-header p:not(.eyebrow) { margin: 8px 0 0; color: #7d8b9e; font-size: 13px; }.deals-role-badge { padding: 7px 10px; border-radius: 999px; color: #89651e; background: #fff3d8; font-size: 12px; font-weight: 800; white-space: nowrap; }.deals-empty-card { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 25px; border: 1px solid #d9e5f4; border-radius: 14px; background: linear-gradient(120deg, #f7fbff, #fff); }.deals-empty-card > span { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #2d70c7; background: #e8f2ff; font-size: 24px; }.deals-empty-card h3,.deals-flow-card h3 { margin: 0; color: #2b405e; font-size: 17px; }.deals-empty-card p,.deals-flow-card p { margin: 7px 0 0; color: #748398; font-size: 13px; line-height: 1.65; }.deals-flow-card { margin-top: 16px; padding: 21px; border: 1px solid #e2e8f1; border-radius: 14px; background: #fff; }.deals-flow-card > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }.deals-flow-card article { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 10px; background: #f7f9fc; }.deals-flow-card strong { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: #4c7ed1; font-size: 13px; }.deals-flow-card span { color: #52657d; font-size: 13px; font-weight: 700; }
@media (max-width: 760px) { .client-filter-head { display: grid; }.client-search-field { max-width: none; }.client-filter-head > span { text-align: right; }.deals-flow-card > div { grid-template-columns: 1fr; }.deals-header { align-items: center; }.deals-empty-card { align-items: flex-start; } }

.client-identity { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.client-identity > div { display: grid; gap: 3px; min-width: 0; }
.client-identity > div span { overflow: hidden; color: #2f4055; font-size: 13px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.client-identity > div small { overflow: hidden; color: #8a98a9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.client-avatar,
.client-detail-avatar { position: relative; display: grid; flex: none; place-items: center; overflow: hidden; padding: 0; border: 1px solid #d7e2ef; color: #315f9d; background: linear-gradient(145deg,#edf5ff,#dce9f8); cursor: pointer; }
.client-avatar { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 4px 12px rgba(44,79,119,.1); }
.client-avatar img,
.client-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.client-avatar > span,
.client-detail-avatar > span { font-size: 16px; font-weight: 900; }
.client-avatar i,
.client-detail-avatar i { position: absolute; right: 2px; bottom: 2px; padding: 2px 4px; border-radius: 5px; color: #fff; background: rgba(18,45,76,.82); font-size: 7px; font-style: normal; font-weight: 800; line-height: 1.2; opacity: .88; }
.client-avatar:hover,
.client-detail-avatar:hover { border-color: #7fa4d4; box-shadow: 0 0 0 3px rgba(83,133,195,.14); }

#clientDetailDialog { width: min(1480px, calc(100vw - 44px)); max-width: none; height: min(920px, calc(100dvh - 36px)); max-height: none; padding: 0; overflow: hidden; }
#clientDetailDialog .client-detail { display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; overflow: hidden; padding: 0; }
#clientDetailContent:not([hidden]) { display: grid; grid-template-rows: auto auto minmax(0,1fr); flex: 1; min-height: 0; }
.client-detail-heading { align-items: center; min-height: 82px; padding: 12px 62px 12px 17px; border-bottom: 1px solid #dfe7f1; background: #fff; }
.client-detail-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.client-detail-photo-wrap { display: grid; flex: none; justify-items: center; gap: 4px; }
.client-detail-avatar { width: 62px; height: 62px; border-radius: 17px; }
.client-detail-avatar > span { font-size: 24px; }
.client-detail-avatar i { right: 5px; bottom: 5px; padding: 3px 5px; font-size: 8px; }
.client-photo-change { padding: 0; border: 0; color: #4673ad; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.client-photo-change:hover { color: #174f91; text-decoration: underline; }
.client-detail-person h3 { margin-top: 3px; font-size: 23px; }
.client-detail-heading > .client-status { margin-top: 0; padding: 6px 9px; border: 0; font-size: 10px; }
.client-detail-tabs { grid-template-columns: 170px 170px; justify-content: start; margin: 8px 10px 0; }
#clientDetailDialog .client-tab-panel { min-height: 0; overflow: hidden; }
#clientDetailDialog .client-tab-panel[data-client-tab-panel="battle"] { overflow: auto; padding: 10px; }
.client-profile-workspace { display: grid; grid-template-columns: minmax(470px,.9fr) minmax(0,1.35fr); gap: 10px; height: 100%; min-height: 0; padding: 10px; overflow: hidden; }
.client-profile-overview { min-width: 0; min-height: 0; padding: 12px; overflow: auto; border: 1px solid #e0e7f0; border-radius: 12px; background: #fff; }
#clientDetailDialog .client-profile { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; }
#clientDetailDialog .client-profile-item { min-height: 54px; padding: 9px 10px; border: 1px solid #e9edf3; border-radius: 8px; background: #f7f9fc; }
#clientDetailDialog .client-profile-item strong { color: #33485f; font-size: 12px; }
#clientDetailDialog #clientBusinessStatus { display: block; width: 100%; min-width: 0; min-height: 32px; margin-top: 3px; padding: 4px 6px; border: 1px solid #d8e1ed; border-radius: 6px; color: #33485f; background: #fff; font: inherit; font-size: 12px; }
#clientDetailDialog .client-owner-actions { margin: 12px 0 0; }
#clientDetailDialog .client-edit-toggle { width: 100%; margin: 12px 0 0; }
#clientDetailDialog .client-edit-box { margin: 10px 0 0; }
.client-profile-workspace .client-inline-follow { min-width: 0; min-height: 0; margin: 0; padding: 12px; overflow: auto; border: 1px solid #e0e7f0; border-radius: 12px; background: #fff; }
#clientDetailDialog .client-inline-follow .follow-up-box { margin-top: 10px; padding: 12px; }
#clientDetailDialog .follow-up-box textarea { min-height: 72px; }
#clientDetailDialog .follow-history { max-height: 260px; overflow: auto; padding-right: 7px; }
#clientDetailDialog .follow-history-item { padding: 8px 0; }

.client-photo-preview-dialog { width: min(980px, calc(100vw - 36px)); max-width: none; height: min(880px, calc(100dvh - 36px)); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: transparent; }
.client-photo-preview-card { position: relative; display: grid; grid-template-rows: minmax(0,1fr) auto; width: 100%; height: 100%; overflow: hidden; border: 1px solid #d7e2ee; border-radius: 18px; background: #eef2f6; box-shadow: 0 28px 80px rgba(15,35,62,.34); }
.client-photo-preview-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 11px; color: #fff; background: rgba(17,34,55,.68); cursor: pointer; font-size: 24px; }
.client-photo-preview-stage { display: grid; min-height: 0; padding: 18px; place-items: center; overflow: hidden; background: #152235; }
.client-photo-preview-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 16px 46px rgba(0,0,0,.3); }
.client-photo-preview-card footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 17px; border-top: 1px solid #dce4ed; background: #fff; }
.client-photo-preview-card footer div { display: grid; gap: 3px; }
.client-photo-preview-card footer span { color: #7a899d; font-size: 10px; font-weight: 800; }
.client-photo-preview-card footer strong { color: #263b57; font-size: 15px; }

@media (max-width: 900px) {
  #clientDetailDialog { width: calc(100vw - 22px); height: calc(100dvh - 22px); }
  .client-profile-workspace { grid-template-columns: 1fr; overflow: auto; }
  .client-profile-workspace .client-inline-follow { overflow: visible; }
}
@media (max-width: 620px) {
  #clientDetailDialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .client-detail-heading { min-height: 66px; padding: 9px 48px 9px 12px; }
  .client-detail-avatar { width: 52px; height: 52px; border-radius: 15px; }
  .client-detail-person h3 { font-size: 19px; }
  .client-detail-heading > .client-status { display: none; }
  .client-detail-tabs { grid-template-columns: 1fr 1fr; margin: 7px 7px 0; }
  #clientDetailDialog .client-profile { grid-template-columns: 1fr 1fr; }
  .client-profile-workspace { padding: 7px; }
  .client-photo-preview-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .client-photo-preview-card { border: 0; border-radius: 0; }
  .client-photo-preview-stage { padding: 8px; }
  .client-table td[data-label="客户"] { grid-column: 1 / -1; }
}

.followup-ledger-trigger { color: #285f9f; background: #f3f8ff; }
.followup-ledger-dialog { width: min(1040px, calc(100vw - 36px)); max-width: none; height: min(820px, calc(100dvh - 36px)); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: transparent; }
.followup-ledger-dialog::backdrop { background: rgba(14,31,54,.54); backdrop-filter: blur(4px); }
.followup-ledger-card { display: grid; grid-template-rows: auto auto minmax(0,1fr); width: 100%; height: 100%; overflow: hidden; border: 1px solid #d8e3ef; border-radius: 18px; color: #24374f; background: #f4f7fb; box-shadow: 0 28px 80px rgba(15,35,62,.3); }
.followup-ledger-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 15px; border-bottom: 1px solid #dfe7f1; background: #fff; }
.followup-ledger-head h2 { margin: 2px 0 4px; color: #17375e; font-size: 22px; }
.followup-ledger-head p:not(.eyebrow) { margin: 0; color: #738197; font-size: 12px; }
.followup-ledger-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid #dbe4ee; border-radius: 11px; color: #61728a; background: #f8fafc; cursor: pointer; font-size: 24px; line-height: 1; }
.followup-ledger-controls { display: grid; grid-template-columns: 180px 180px 210px minmax(220px,1fr); gap: 10px; align-items: end; padding: 12px 14px; border-bottom: 1px solid #dfe7f1; background: #f9fbfd; }
.followup-ledger-controls label { display: grid; gap: 5px; color: #64758a; font-size: 11px; font-weight: 800; }
.followup-ledger-controls input,
.followup-ledger-controls select { width: 100%; min-height: 40px; padding: 7px 10px; border: 1px solid #d5e0ec; border-radius: 9px; color: #2f445e; background: #fff; outline: none; }
.followup-ledger-controls input:focus,
.followup-ledger-controls select:focus { border-color: #7fa9e5; box-shadow: 0 0 0 3px rgba(23,104,229,.09); }
.followup-ledger-summary { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; min-height: 40px; padding: 8px 11px; border: 1px solid #d8e5f4; border-radius: 9px; color: #718096; background: #eef5ff; }
.followup-ledger-summary strong { color: #1768e5; font-size: 20px; }
.followup-ledger-summary span { color: #31577f; font-size: 11px; font-weight: 800; }
.followup-ledger-summary small { margin-left: 7px; font-size: 10px; }
.followup-ledger-list { display: grid; align-content: start; gap: 8px; min-height: 0; padding: 12px 14px 22px; overflow: auto; }
.followup-ledger-item { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid #dfe7f0; border-left: 4px solid #3d7ac5; border-radius: 11px; background: #fff; box-shadow: 0 4px 13px rgba(28,58,91,.05); }
.followup-ledger-item.client { border-left-color: #7c68b8; }
.followup-ledger-time { display: grid; justify-items: start; gap: 4px; }
.followup-ledger-time strong { color: #203c5c; font-size: 15px; }
.followup-ledger-time span { padding: 3px 6px; border-radius: 6px; color: #2867ad; background: #eaf3ff; font-size: 9px; font-weight: 900; }
.followup-ledger-item.client .followup-ledger-time span { color: #665199; background: #f0ebfb; }
.followup-ledger-content { min-width: 0; }
.followup-ledger-content > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.followup-ledger-content h3 { margin: 0; color: #263c57; font-size: 14px; }
.followup-ledger-content small { color: #8794a5; font-size: 10px; }
.followup-ledger-content p { margin: 6px 0 0; color: #52657d; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.followup-ledger-item > button { min-height: 34px; padding: 7px 10px; border: 1px solid #cbdcf1; border-radius: 8px; color: #2f69aa; background: #f7fbff; cursor: pointer; font-size: 11px; font-weight: 800; }
.followup-ledger-empty { display: grid; min-height: 310px; place-content: center; justify-items: center; color: #7f8da0; text-align: center; }
.followup-ledger-empty span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #39755d; background: #e8f6ef; font-size: 20px; }
.followup-ledger-empty strong { margin-top: 12px; color: #42566f; font-size: 15px; }
.followup-ledger-empty p { margin: 6px 0 0; font-size: 11px; }

@media (min-width: 761px) {
  .client-table { table-layout: fixed; min-width: 1230px; }
  .client-table th, .client-table td { padding-left: 10px; padding-right: 10px; }
  .client-table .client-select-column { width: 36px; padding-left: 8px; padding-right: 8px; }
  .client-table .client-identity-heading { width: 224px; }
  .client-table .client-latest-heading { width: 32%; }
  .client-table .client-grade-heading { width: 60px; }
  .client-table #clientFollowSortHeading { width: 106px; }
  .client-table #clientStatusHeading { width: 114px; }
  .client-table #clientCreatedSortHeading { width: 110px; }
  .client-table .client-identity { min-width: 0; }
  .client-table .client-identity > div { flex: 1; overflow: hidden; }
  .client-table td > span:not(.client-status) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .client-table td > .client-follow-preview:not(.client-status) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; max-height: 36px; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; text-overflow: clip; font-size: 11px; line-height: 12px; }
}

.client-filter-summary { display: grid; justify-items: end; gap: 5px; margin-left: auto; min-width: 0; }
.client-filter-summary #clientFilterCount { grid-row: 1; color: #8492a4; font-size: 12px; white-space: nowrap; text-align: right; }
.client-filter-summary .client-business-views { grid-row: 2; }
.client-filter-head .client-search-field input { height: 36px; box-sizing: border-box; }
#clientViewingForm { display: grid; gap: 12px; width: min(560px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); overflow-y: auto; box-sizing: border-box; padding: 20px; }
#clientViewingForm > label { display: grid; gap: 6px; font-size: 13px; color: #52657d; }
#clientViewingForm input:not([type="hidden"]), #clientViewingForm textarea { min-width: 0; width: 100%; box-sizing: border-box; border: 1px solid #dce5ef; border-radius: 8px; padding: 9px; font: inherit; }
#clientViewingForm .client-viewing-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
#clientViewingForm [data-viewing-result] { min-width: 0; padding: 9px 4px; font-size: 12px; }
#clientViewingForm [aria-pressed="true"] { color: white; background: #2869ce; border-color: #2869ce; }
#clientViewingMessage { margin: 0; color: #b9404f; font-size: 12px; }
.dashboard-activity .dashboard-activity-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-activity .dashboard-activity-grid article { min-width: 0; }
.dashboard-activity .dashboard-source-date { display: flex; align-items: end; gap: 8px; }
.dashboard-attention li > button { flex: none; padding: 6px 10px; font-size: 12px; }
@media (max-width: 760px) {
  .dashboard-activity .dashboard-activity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-activity .dashboard-activity-head { align-items: start; gap: 8px; flex-wrap: wrap; }
  .dashboard-activity .dashboard-source-date input { width: 136px; min-width: 0; }
  #clientViewingForm { padding: 12px; gap: 9px; }
}
.client-business-views { display: grid; width: 256px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.client-business-views button { min-height: 36px; padding: 7px 10px; border: 1px solid #dce5ef; border-radius: 8px; background: #f4f7fb; color: #536a86; font-size: 11px; white-space: nowrap; cursor: pointer; }
.client-business-views button[aria-pressed="true"] { color: #fff; background: #2869ce; border-color: #2869ce; }
.client-business-views button:focus-visible { outline: 2px solid #91b5ed; outline-offset: 2px; }
@media (max-width: 760px) {
  .client-filter-summary { width: 100%; margin-left: 0; }
  .client-filter-summary #clientFilterCount { font-size: 10px; }
  .client-business-views { width: 100%; min-width: 0; }
  .client-business-views button { padding: 7px 4px; font-size: 10px; }
}
.client-follow-sort { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; min-height: 28px; margin-left: 4px; padding: 2px 5px; border: 1px solid #cddcef; border-radius: 6px; color: #2869ce; background: #edf4ff; cursor: pointer; font: inherit; }
.client-follow-sort:focus-visible { outline: 2px solid #2869ce; outline-offset: 2px; }
.client-mobile-follow-sort { display: none; }
@media (max-width: 760px) { .client-mobile-follow-sort { display: inline-flex; justify-self: end; font-size: 11px; padding: 5px 8px; } }
.client-grade-badge { font-size: 12px; color: #8a97a8; }
.client-grade-badge.graded { color: #2460a6; font-weight: 800; }
.client-table [data-label="最新跟进记录"] { color: #53667f; font-size: 12px; }
@media (min-width: 1101px) {
  .client-filters { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .client-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .client-table tbody tr { row-gap: 4px; padding-top: 7px; padding-bottom: 7px; }
  .client-table tbody td.mobile-client-latest { grid-column: 1 / -1; min-width: 0; height: 30px; padding: 0; color: #708197; }
  .client-table .mobile-client-latest .client-follow-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 30px; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; font-size: 10px; line-height: 15px; }
  .client-table .mobile-client-source:empty, .client-table .mobile-client-grade:empty { display: none !important; }
  .client-table .mobile-client-grade { color: #31669d; font-size: 10px; font-weight: 700; }
}

@media (max-width: 760px) {
  .followup-ledger-dialog { width: calc(100vw - 18px); height: calc(100dvh - 18px); }
  .followup-ledger-controls { grid-template-columns: 1fr 1fr; }
  .followup-ledger-summary { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .followup-ledger-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .followup-ledger-card { border: 0; border-radius: 0; }
  .followup-ledger-head { padding: 13px 13px 11px; }
  .followup-ledger-head h2 { font-size: 19px; }
  .followup-ledger-controls { gap: 7px; padding: 9px; }
  .followup-ledger-controls label { font-size: 10px; }
  .followup-ledger-summary { grid-column: 1 / -1; }
  .followup-ledger-list { padding: 8px 8px 22px; }
  .followup-ledger-item { grid-template-columns: 58px minmax(0,1fr); gap: 8px; padding: 10px; }
  .followup-ledger-item > button { grid-column: 2; justify-self: start; }
}
.client-create-photo { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 12px; border: 1px solid #dbe6f5; border-radius: 10px; background: #f6f9ff; }
.client-create-photo-preview { flex: 0 0 64px; width: 64px; height: 64px; padding: 0; overflow: hidden; border: 1px dashed #9ab6dc; border-radius: 12px; color: #3166a6; background: #eaf2ff; font-size: 26px; cursor: pointer; }
.client-create-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.client-create-photo strong { font-size: 13px; color: #203955; }
.client-create-photo p { margin: 5px 0 8px; font-size: 12px; color: #718198; }
.client-create-photo > div > div { display: flex; gap: 10px; align-items: center; }
#clientCreatePhotoStatus:empty { display: none; }
.client-profile-hint { padding: 10px; margin: 8px 0; border: 1px solid #dbe6f5; border-radius: 8px; background: #f5f9ff; }
.client-profile-hint p { margin: 0 0 8px; font-size: 12px; line-height: 1.6; color: #426183; }
.client-profile-hint > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.client-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#clientDetailDialog .client-profile-actions > button { flex: 1; width: auto; margin: 0; min-height: 38px; font-size: 12px; }
#clientDetailPhone { max-width: min(660px, 62vw); overflow-wrap: anywhere; max-height: 54px; overflow: auto; }
#clientDetailDialog .client-profile-item strong { overflow-wrap: anywhere; }
#clientContactsDialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; box-sizing: border-box; }
#clientContactsForm { padding: 22px; }
#clientContactsForm .dialog-header { gap: 14px; }
#clientContactsTitle { font-size: 22px; }
#clientContactsName { color: #2d4a6b; font-size: 14px; font-weight: 700; }
#clientContactsForm > label { display: grid; gap: 6px; margin: 14px 0; font-size: 13px; color: #465e7a; }
#clientContactsForm input { width: 100%; min-height: 42px; padding: 10px 12px; box-sizing: border-box; border: 1px solid #cad9ec; border-radius: 8px; background: #fff; color: #29486b; font: inherit; outline: none; }
#clientContactsForm input:focus { border-color: #4c8bdf; box-shadow: 0 0 0 3px #e7f0ff; }
.client-existing-contacts { display: grid; gap: 10px; padding: 12px; max-height: 180px; overflow: auto; border: 1px solid #dce7f4; border-radius: 10px; background: #f5f9ff; }
.client-existing-contacts strong { font-size: 11px; color: #6b8099; }
.client-existing-contacts p { margin: 4px 0 0; color: #2a4e78; font-size: 13px; overflow-wrap: anywhere; }
.client-contact-tip { font-size: 12px; line-height: 1.6; color: #748299; }
#additionalClientContactError { font-size: 12px; color: #b64450; }
#additionalClientContactError:empty { display: none; }
.client-dispatch-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 16px; border: 1px solid #bcd3ef; border-radius: 12px; background: #f1f7ff; }
.client-dispatch-summary strong { color: #22589c; font-size: 16px; }
.client-dispatch-summary p { margin: 7px 0; color: #405d7d; font-size: 13px; }
.client-dispatch-summary small { color: #70859c; line-height: 1.6; }
.client-dispatch-summary > button { flex-shrink: 0; }
#openDispatchedClients[aria-pressed="true"] { color: #fff; background: #2868be; border-color: #2868be; }
.client-table .client-dispatch-owner { display: block; margin-bottom: 4px; font-size: 10px; color: #32649f; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100px; }
.client-table .client-identity small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .client-dispatch-summary { flex-direction: column; align-items: flex-start; }
  #clientDetailPhone { max-width: 58vw; }
  #clientContactsForm .dialog-actions { flex-wrap: wrap; }
  #clientContactsForm { padding: 16px; }
  #clientContactsTitle { font-size: 20px; }
  #clientContactsForm .eyebrow { font-size: 10px; }
}
