:root{color-scheme:only light;--ink:#20262a;--muted:#707b82;--line:#e2e7ea;--paper:#fff;--canvas:#f5f7f8;--accent:#e95730;--accent-hover:#cf4521;--teal:#18856a;--blue:#4274ac;--radius:6px}
*{box-sizing:border-box;letter-spacing:0}
[hidden]{display:none!important}
body{margin:0;color:var(--ink);background:var(--canvas);font:14px/1.6 "Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif}
button,input,select,textarea{font:inherit;color:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;gap:7px;white-space:nowrap}
button:disabled{cursor:not-allowed;opacity:.45}
button:focus-visible,a:focus-visible{outline:3px solid #a6d4c8;outline-offset:3px}
button svg{width:17px;height:17px;flex-shrink:0;stroke-width:1.8}
input,select,textarea{width:100%;border:1px solid #d5dce0;border-radius:var(--radius);background:var(--paper);padding:10px 12px;outline:none;min-height:42px}
input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px #18856a14}
textarea{resize:vertical;min-height:126px}
input::placeholder{color:#919ba1}
label{display:block;font-size:13px;font-weight:500}
label input,label select,label textarea{display:block;margin-top:7px;font-weight:400}
.primary,.secondary{min-height:40px;padding:9px 16px;border:1px solid transparent;border-radius:var(--radius);font-size:13px;font-weight:600}
.primary{background:var(--accent);color:#fff}.primary:hover{background:var(--accent-hover)}
.secondary{background:#fff;border-color:#d7dfe3}.secondary:hover,.icon-button:hover{background:#eef2f3}
.icon-button{width:36px;height:36px;padding:0;border:1px solid transparent;border-radius:var(--radius);background:transparent;color:#657078;flex-shrink:0}
.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 40px;border-bottom:1px solid var(--line);background:#fff}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:15px;min-width:0}
.brand img{width:38px;height:38px;object-fit:contain}.brand strong{font-size:19px}.brand-divider{color:#ccd3d6;font-weight:400;margin:0 4px}
.account-tools{display:flex;align-items:center;gap:9px}.current-user{font-size:12px;color:var(--muted);margin-right:8px}
.workspace-main{max-width:1440px;margin:0 auto;padding:34px 40px 0}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}
.eyebrow{font-size:10px;line-height:1.4;font-weight:600;color:#8a959c}
h1,h2,p{margin:0}h1{font-size:26px;line-height:1.4;font-weight:600;display:flex;align-items:center;gap:12px;margin-top:7px}
.count-badge{font-size:12px;padding:2px 8px;background:#e5ebee;color:#627078;border-radius:4px;min-width:25px;text-align:center}
.heading-actions{display:flex;gap:10px}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:28px 0 26px;gap:24px}
.metrics>div{padding-left:24px;border-left:1px solid #dce3e6}
.metrics>div:first-child{border:0;padding-left:0}
.metrics span{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}
.metrics svg{width:14px;height:14px}.metrics strong{font-size:28px;line-height:1.4;font-weight:500;display:block;margin-top:8px;font-variant-numeric:tabular-nums}
.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex-shrink:0}
.dot-new{background:#dd9150}.dot-contacted{background:var(--blue)}.dot-won{background:var(--teal)}
.customer-register{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);min-height:400px}
.filters{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line);gap:20px}
.status-tabs{display:flex;align-items:center;gap:3px;background:#f0f3f5;padding:3px;border-radius:var(--radius);flex-shrink:0}
.status-tabs button{padding:7px 12px;border:0;border-radius:4px;background:transparent;color:#738088;font-size:12px;min-height:33px}
.status-tabs button.active{background:#fff;color:#242b30;box-shadow:0 1px 3px #20262a10}
.search-tools{display:flex;align-items:center;gap:10px;min-width:0}
.search-field{display:flex;align-items:center;position:relative;width:260px;min-width:0}
.search-field svg{width:16px;height:16px;position:absolute;left:11px;color:#8a969d;pointer-events:none}
.search-field input{padding:8px 10px 8px 34px;margin:0;min-height:38px;font-size:12px;background:#fbfcfc}
.search-tools select{width:112px;min-height:38px;padding:7px 8px;font-size:12px}
.table-wrap{width:100%;overflow:auto;min-height:0}
table{border-collapse:collapse;table-layout:fixed;width:100%;font-size:13px}
thead{background:#fafbfc;color:#8a949b;font-size:11px;font-weight:400}
th{text-align:left;font-weight:500;padding:13px 15px;border-bottom:1px solid var(--line)}
th:nth-child(1){width:24%}th:nth-child(2){width:21%}th:nth-child(3){width:10%}th:nth-child(4){width:12%}th:nth-child(5){width:12%}th:nth-child(6){width:16%}th:last-child{width:5%}
td{padding:18px 15px;border-bottom:1px solid #edf0f2;vertical-align:middle;overflow-wrap:anywhere}
tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fcfdfd}
.customer-name{display:block;border:0;background:none;text-align:left;white-space:normal;padding:0;font-weight:600;color:var(--ink);line-height:1.7;max-width:100%;overflow-wrap:anywhere}
.customer-name:hover{color:var(--accent)}
.contact-phone{display:block;font-size:12px;color:#7d8990;margin-top:3px;font-variant-numeric:tabular-nums}
.cell-muted{color:#76838b;font-size:12px}
.status-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:4px;font-size:11px;white-space:nowrap}
.status-new{background:#fff3e5;color:#a2702f}.status-contacted{background:#edf4fc;color:#4777a9}.status-won{background:#eaf5f0;color:#278165}.status-paused{background:#f0f2f3;color:#818b91}
.action-cell{text-align:right;padding-right:10px}
.empty-state{display:flex;min-height:310px;flex-direction:column;align-items:center;justify-content:center;padding:35px 20px;text-align:center}
.empty-art{width:70px;height:70px;display:grid;place-items:center;background:linear-gradient(145deg,#eef4f6,#f9fbfb);border-radius:8px;color:#879da8;margin-bottom:16px;transform:rotate(-4deg)}
.empty-art svg{width:31px;height:31px;stroke-width:1.2;transform:rotate(4deg)}
.empty-state h2{font-size:17px;font-weight:500}.empty-state p{font-size:12px;color:#8a959c;margin:7px 0 20px}
.pagination{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding:13px 15px;color:#8a959c;font-size:12px;gap:12px}
.pagination>div{display:flex;align-items:center;gap:11px;flex-shrink:0}#page-number{min-width:40px;text-align:center;font-variant-numeric:tabular-nums}
.workspace-footer{max-width:1440px;margin:auto;padding:22px 40px;display:flex;justify-content:space-between;font-size:10px;color:#9aa4aa}
.workspace-footer span:first-child{font-weight:700}
.auth-view{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:36px 20px;background:linear-gradient(130deg,#fff 20%,#f3f7f8 75%);position:relative}
.auth-brand{display:flex;align-items:center;gap:13px;margin-bottom:35px;font-size:18px;font-weight:600}.auth-brand img{height:44px;width:44px;object-fit:contain}
.auth-form{width:100%;max-width:380px;background:white;padding:30px;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 40px #243c4706}
.auth-form h1{font-size:23px;margin:10px 0 26px}.auth-form label{margin-top:18px}.auth-form .primary{width:100%;margin-top:20px;justify-content:space-between}
.auth-footer{margin-top:30px;color:#98a2a8;font-size:11px}
.form-error{font-size:12px;color:#bc4938;overflow-wrap:anywhere}.form-error:not(:empty){margin:12px 0}
.drawer{position:fixed;inset:0 0 0 auto;width:530px;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;padding:0;box-shadow:-12px 0 45px #18212814;color:var(--ink)}
dialog::backdrop{background:#18242c55;backdrop-filter:blur(2px)}
.editor-form{display:flex;flex-direction:column;height:100%;min-height:0}
.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:24px 28px;border-bottom:1px solid var(--line);gap:12px}
.drawer-header h2{font-size:21px;font-weight:500;line-height:1.4;margin-top:4px}
.drawer-body{flex:1;overflow:auto;padding:24px 28px}.drawer-body>label{margin-top:18px}
.form-section-label{font-size:11px;color:#8c989f;font-weight:600;padding-bottom:12px;border-bottom:1px solid var(--line)}
.section-spacing{margin-top:28px}.required{color:#df603c;margin-left:4px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px;margin-top:18px}
.drawer-footer{padding:18px 28px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);background:#fff;flex-shrink:0}
.drawer-footer>div{display:flex;gap:9px;margin-left:auto}
.danger-text{border:0;background:none;color:#bd5b4b;padding:8px 0;font-size:12px}
.record-time{font-size:11px;color:#95a0a6;margin-top:18px}
.integration-dialog{width:480px;max-width:calc(100% - 32px);padding:0;border:0;border-radius:8px;color:var(--ink)}
.integration-dialog .drawer-header{padding:20px 24px}.integration-dialog h2{font-size:18px}
.integration-list{padding:8px 24px 24px;display:grid;grid-template-columns:90px minmax(0,1fr);gap:16px 14px;font-size:12px}
.integration-list dt{color:#8a969e}.integration-list dd{margin:0}.break-text{overflow-wrap:anywhere}.integration-dialog>.form-error{padding:0 24px 20px}
.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#273a35;color:#fff;padding:12px 22px;border-radius:6px;z-index:50;box-shadow:0 8px 20px #203d2c1a;max-width:calc(100% - 32px);font-size:13px;overflow-wrap:anywhere}
.loading{padding:30px;display:flex;align-items:center;justify-content:center;gap:10px;color:#8a959c;font-size:12px}
.spinner{width:16px;height:16px;border-radius:50%;border:2px solid #e0e8e6;border-top-color:var(--teal);animation:spin .7s linear infinite}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1500px){.workspace-main{padding-top:46px}}
@media(max-width:1100px){.topbar{padding:0 24px}.workspace-main{padding:26px 24px 0}.workspace-footer{padding:20px 24px}.filters{flex-direction:column;align-items:stretch;gap:13px}.status-tabs{align-self:flex-start}.search-tools .search-field{flex:1;width:auto}.table-wrap table{min-width:800px}}
@media(max-width:640px){
  .topbar{height:62px;padding:0 17px}.brand{gap:8px;font-size:13px}.brand strong{font-size:17px}.brand img{width:31px;height:31px}.brand-divider{margin:0}.account-tools{gap:0}.current-user{display:none}
  .workspace-main{padding:23px 16px 0}.page-heading{gap:10px;align-items:center}h1{font-size:22px;gap:8px}.eyebrow{font-size:9px}.heading-actions{gap:7px}.heading-actions .primary,.heading-actions .secondary{padding:9px 11px;font-size:12px;min-height:38px}
  .heading-actions #export-button{width:36px;padding:0}.heading-actions #export-button span{display:none}
  .metrics{gap:8px;padding:24px 0}.metrics>div{padding-left:12px}.metrics span{font-size:10px;gap:5px}.metrics strong{font-size:24px;margin-top:6px}.metrics svg{width:12px;height:12px}.status-dot{width:6px;height:6px}
  .filters{padding:13px 0;gap:12px}.status-tabs{width:100%;justify-content:space-between}.status-tabs button{padding:6px 8px;font-size:11px;flex:1}.search-tools{gap:6px}.search-tools select{width:98px;font-size:11px}.search-field input{font-size:11px}.search-tools .icon-button{width:30px}
  .table-wrap{overflow:visible}.table-wrap table{min-width:0;display:block}thead{display:none}tbody{display:block}
  tbody tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 98px;gap:8px;padding:17px 10px;border-bottom:1px solid var(--line)}
  tbody tr:last-child{border-bottom:0}td{display:block;padding:0;border:0;font-size:12px}td:first-child{grid-column:1;grid-row:1}.customer-name{font-size:14px;padding-right:4px}
  td:nth-child(2){grid-column:1;grid-row:2}.contact-phone{display:inline;margin-left:10px;font-size:11px}
  td:nth-child(3){grid-column:1;grid-row:3;font-size:10px;color:#98a2a8}.source-text::before{content:"来源 · "}
  td:nth-child(4){grid-column:1;grid-row:4;font-size:10px}.owner-text::before{content:"负责人 · "}
  td:nth-child(5){grid-column:2;grid-row:1;text-align:right;align-self:start}.status-badge{font-size:10px;padding:2px 6px}
  td:nth-child(6){grid-column:2;grid-row:3;font-size:9px;text-align:right;align-self:end}
  td:last-child{grid-column:2;grid-row:4;text-align:right;position:absolute;right:3px;bottom:9px}.action-cell .icon-button{height:28px;width:28px}
  .empty-state{min-height:280px}.pagination{padding:12px 4px;font-size:11px}.pagination>div{gap:4px}.workspace-footer{padding:18px 17px}
  .drawer-header{padding:20px}.drawer-body{padding:20px}.drawer-footer{padding:16px 20px}.form-grid{gap:16px 12px}.drawer-header h2{font-size:20px}
  .auth-form{padding:26px 24px}.auth-brand{font-size:17px}.integration-list{grid-template-columns:75px minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important}}
