/* Juketong Studio — a local, accessible presentation layer. */
:root{--brand:#2864ed;--muted:#65748b;--border:#e5eaf1;--ink:#162337;--canvas:#f3f6fa;--sidebar-width:228px;--radius:16px;font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:var(--canvas);font-size:13px;font-synthesis:none}
body{background:radial-gradient(ellipse at 85% 0,#e8effb70,transparent 50%),var(--canvas);-webkit-font-smoothing:antialiased}
button{min-height:36px;border-radius:9px;border-color:#dce3ec;color:#40516a;font-weight:500;transition:background .18s,border-color .18s,color .18s,box-shadow .18s,transform .18s}
button:hover:not(:disabled){background:#f3f6fb;border-color:#aebed5;box-shadow:0 3px 9px #152d5210}
button:active:not(:disabled){transform:translateY(1px)}
button:focus-visible,a:focus-visible{outline:3px solid #6d9cf6;outline-offset:3px}
button:disabled{cursor:not-allowed}
button[aria-busy="true"]{cursor:wait}
.primary,.v1-btn{background:var(--brand);border-color:var(--brand);color:white;box-shadow:0 4px 9px #2864ed20}
.primary:hover:not(:disabled),.v1-btn:hover:not(:disabled){background:#1b51cb;border-color:#1b51cb;box-shadow:0 5px 14px #2864ed30}
.soft-primary{background:#edf3ff;color:#245bcc;border-color:#d9e6ff}
.link,.v1-btn-sub{color:#285cbd}
.link:hover:not(:disabled){background:#edf3ff;box-shadow:none}
input,select,textarea{background:#fff;border:1px solid #dce3ed;border-radius:9px;color:var(--ink);font-size:13px;transition:box-shadow .18s,border-color .18s}
input:focus,select:focus,textarea:focus{border-color:#77a0ee;box-shadow:0 0 0 3px #2864ed12}
input:disabled,select:disabled,textarea:disabled{background:#f3f5f8;color:#5d6c80}
label{color:#4a5b72;font-size:12px;font-weight:500}
h1,h2,h3{color:var(--ink)}h1{font-size:28px;letter-spacing:-.8px}h2{font-size:16px;letter-spacing:-.2px}
::selection{background:#d7e7ff;color:#173d7e}
#sidebar{width:var(--sidebar-width);background:linear-gradient(170deg,#142132,#101c2d 85%);padding:29px 14px 90px;transition:width .24s,transform .24s;box-shadow:4px 0 30px #10234108}
#sidebar>.brand{padding:0 12px 24px;gap:10px;font-size:21px}
.brand-mark{background:linear-gradient(145deg,#5388ff,#2a64ed);box-shadow:0 5px 15px #0c193c28;width:36px;height:38px;border-radius:11px;font-size:22px}
.brand em{border-color:#ffffff25;background:#ffffff05;color:#d7e2f8;font-size:9px}
.nav-label{color:#8494ac;font-size:10px;font-weight:600;letter-spacing:1.8px;padding:15px 15px 10px}
#sidebar nav{gap:5px;padding-bottom:15px}
#sidebar nav button{color:#adbcd0;padding:12px 14px;min-height:44px;border-radius:10px;gap:13px;font-size:13px;font-weight:400;overflow:hidden;flex-shrink:0}
#sidebar nav button svg{width:18px;height:18px;opacity:.9}
#sidebar nav button:hover{color:#fff;background:#ffffff09;box-shadow:none;transform:translateX(2px)}
#sidebar nav button.active{color:#fff;background:linear-gradient(100deg,#2864ed,#3975f4);box-shadow:0 5px 18px #0b183b35;font-weight:600}
#sidebar nav button.active:after{width:4px;height:18px;background:#b7d8ff;right:auto;left:0;border-radius:0 3px 3px 0}
.sidebar-bottom{background:#0d1929;border-color:#ffffff08;min-height:78px;padding:18px 17px;gap:10px}
.user-avatar{background:#233b5d;color:#dbe8ff;border:1px solid #ffffff0c;width:36px;height:36px;border-radius:50%}
.user-info span{font-size:11px;color:#c2d0e3}
#logout{border-radius:8px;color:#9fb1cd}#logout:hover{background:#ffffff09}
main{margin-left:var(--sidebar-width);transition:margin-left .24s;min-width:0}
.topbar{height:72px;padding:0 32px;background:#ffffffde;backdrop-filter:blur(18px);border-bottom:1px solid #e2e8f080;position:sticky;top:0;z-index:15}
.breadcrumb{font-size:12px;color:#6c7d94;gap:14px}.breadcrumb b{color:#243a58;font-weight:600}
.topbar-right{color:#61718a;font-size:11px;gap:17px}.topbar-right .tag{background:#edf6f3;color:#27846d;border:1px solid #d6eee5;border-radius:20px;padding:5px 11px}
#menu-toggle{display:flex;width:32px;height:32px;border:0;padding:7px;color:#5e718e;background:transparent}
#menu-toggle:hover{background:#edf2f9}
.main-content{max-width:1800px;padding:32px 32px 40px}
.main-content>header{margin-bottom:26px;min-height:40px}.main-content>header h1{margin:0;font-weight:700}
.header-actions{gap:9px}.header-actions button{height:38px;font-size:12px}.header-actions .primary{padding-left:18px;padding-right:18px}
.panel,.v1-panel{border:1px solid var(--border);border-radius:var(--radius);background:#fff;box-shadow:0 3px 14px #16385e03}
.panel-heading,.v1-panel-head{margin-bottom:19px}.v1-panel-head{padding-bottom:18px;border-bottom:1px solid #edf0f6}
.v1-panel h2{font-size:16px;color:#223750}
.page-tabs{border:0;background:#e9eef6;padding:5px;border-radius:11px;display:inline-flex;max-width:100%;gap:4px;margin-bottom:24px;overflow:auto}
.page-tabs button{padding:9px 21px;border:0;border-radius:8px;background:transparent;color:#66768e;font-size:12px;min-height:36px}
.page-tabs button.active{color:#215acb;background:#fff;box-shadow:0 2px 7px #16385e0c;font-weight:600}
.page-tabs button.active:after{display:none}.page-tabs button:hover{box-shadow:none;background:#ffffff80}
.dm-filters{padding:16px 22px;margin-bottom:24px;box-shadow:none}
.dm-filters form{gap:20px}.dm-filters label{font-size:12px}.dm-filters input,.dm-filters select{min-height:38px;background:#f9fbfd}
.dm-filters form>span{font-size:11px;color:#667990}
.dm-main-metrics{gap:18px;margin-bottom:28px}
.dm-card{position:relative;overflow:hidden;border-radius:16px;border:1px solid var(--border);padding:23px 22px;background:#fff;box-shadow:0 3px 13px #16385e04;transition:transform .22s,box-shadow .22s;min-width:0;min-height:142px}
.dm-card:hover{transform:translateY(-3px);box-shadow:0 9px 28px #203c6a0d}
.dm-card>span{font-size:12px;color:#62748b;display:block;padding-right:35px;letter-spacing:.3px}
.dm-card strong{font-size:clamp(22px,2vw,32px);color:#182d49;font-weight:650;letter-spacing:-.7px;margin-top:23px;position:relative;font-variant-numeric:tabular-nums}
.dm-metric-icon{position:absolute;right:19px;top:17px;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf3ff;color:#4c79cc}
.dm-metric-icon svg{width:17px;height:17px}
.dm-main-metrics .dm-card:nth-child(3) .dm-metric-icon{background:#edf8f3;color:#278568}
.dm-main-metrics .dm-card:nth-child(4) .dm-metric-icon{background:#fff5e8;color:#b78b48}
.dm-primary{background:linear-gradient(115deg,#172f50,#245281);border-color:#1e456c;box-shadow:0 8px 22px #193b6720}
.dm-primary:before,.dm-primary:after{content:"";position:absolute;width:180px;height:180px;border:1px solid #ffffff12;border-radius:50%;right:-75px;top:4px}
.dm-primary:after{width:230px;height:230px;right:-92px;top:-20px}
.dm-primary>span{color:#c0d5ef}.dm-primary strong{color:#fff}.dm-primary .dm-metric-icon{background:#ffffff10;color:#c0ddff}
.dm-section-title{margin:0 0 17px}.dm-section-title h2{font-size:16px;font-weight:650}
.dm-plan-metrics{gap:18px;margin-bottom:20px}.dm-plan-metrics .dm-card{min-height:119px;padding:20px 22px}
.dm-plan-metrics .dm-card strong{font-size:24px;margin-top:18px}.dm-plan-metrics .dm-metric-icon{background:transparent}
.dm-channels{gap:0;background:#fff;border:1px solid var(--border);border-radius:16px;overflow:hidden;margin-bottom:26px;padding:8px 0}
.dm-channel{border:0;border-radius:0;padding:20px 24px;background:transparent;box-shadow:none;position:relative}
.dm-channel+.dm-channel:before{content:"";position:absolute;left:0;top:22px;bottom:22px;width:1px;background:#edf0f5}
.dm-channel>div{font-size:12px;color:#546984}.dm-channel strong{font-size:22px;color:#243b59;margin:17px 0;font-variant-numeric:tabular-nums;font-weight:600}
.dm-channel-progress{height:5px;background:#edf2f8;border:0;border-radius:5px;overflow:hidden}
.dm-channel-progress::-webkit-progress-bar{background:#edf2f8}
.dm-channel-progress::-webkit-progress-value{border-radius:5px;transition:width .4s}
.dm-departments{padding:23px 0 0;overflow:hidden}.dm-departments>.panel-heading{padding:0 24px}
.tag,.mini-tag,.v1-badge,.status{font-size:11px;border-radius:6px}
table{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}
table thead th,.v1-table th{font-size:11px;line-height:1.5;color:#5f728c;background:#f6f8fc;border-bottom:1px solid #e7edf5;font-weight:600;letter-spacing:.2px;padding:15px 18px}
table tbody td,.v1-table td{font-size:12px;line-height:1.7;color:#354c6c;padding:17px 18px;border-bottom:1px solid #edf1f6}
table tbody tr:last-child td{border-bottom:0}
table tbody tr:hover>td{background:#f7faff}
table tbody tr:has(input[type=checkbox]:checked)>td{background:#eef4ff}
table th{position:sticky;top:0;z-index:1}
table .link{font-size:12px;padding:5px 7px;min-height:30px}
.customer-panel{padding:0;overflow:hidden}
.customer-panel>.toolbar{padding:20px 22px;margin:0;border-bottom:1px solid #eef2f7;gap:12px}
.segmented{background:#edf1f7;border:0;padding:4px;border-radius:9px}
.segmented button{border:0;border-radius:6px;color:#62718a;font-size:12px;padding:7px 13px;min-height:31px}
.segmented button.active{background:#fff;color:#255ccc;box-shadow:0 2px 5px #1c365814}
.search-box{border-color:#dee5ef;border-radius:9px;background:#fff;height:37px;max-width:250px}
.search-box input{font-size:12px}.search-box button{min-height:31px;border-radius:6px}
.table-tools{display:flex;gap:5px;margin-left:auto}
.table-tools button{font-size:11px;padding:7px 10px;background:#fff}
.table-tools button[aria-pressed=true]{background:#edf3ff;color:#2864ed;border-color:#d6e4ff}
.table-tools .icon{width:15px;height:15px}
.customer-panel>.filters{margin:0;padding:20px 22px 21px;background:#fbfcfe;border:0;border-bottom:1px solid #e9eef5;border-radius:0}
.lead-field-filters{grid-template-columns:repeat(6,minmax(0,1fr));gap:14px 16px}
.lead-field-filters label{font-size:11px;margin:0;color:#5e718a;font-weight:500}
.lead-field-filters input,.lead-field-filters select{font-size:12px;min-height:36px;margin-top:7px;padding:8px 10px;background:#fff}
.lead-field-filters>button{align-self:end}
#lead-table{min-width:1280px}#lead-table td,#lead-table th{padding-left:15px;padding-right:15px}
#lead-table td.lead-name{font-weight:600;color:#253f64}
.lead-phone{font-variant-numeric:tabular-nums;letter-spacing:.25px}
.followup-preview{color:#3b6195}.lead-followup small{color:#62748a}
.customer-panel>.batch-bar{margin:14px 22px;padding:12px 16px;background:#eef4ff;border:1px solid #dbe7ff;border-radius:10px;color:#365f9b;flex-wrap:wrap}
.pagination{padding:17px 22px;font-size:12px;color:#60748f;border-top:1px solid #edf1f6}
.pagination button{font-size:11px;border-radius:7px;min-height:31px}
.studio-compact table td,.studio-compact .v1-table td{padding-top:9px;padding-bottom:9px}
.studio-compact table th,.studio-compact .v1-table th{padding-top:11px;padding-bottom:11px}
.v1-table-wrap,.table-wrap{scrollbar-width:thin;scrollbar-color:#c4d2e4 #f6f8fc}
.v1-toolbar label{font-size:12px}.v1-toolbar input,.v1-toolbar select{font-size:13px}
.v1-btn,.v1-btn-sub{border-radius:8px;font-size:12px}
.v1-positive{color:#248368;background:#ebf7f1}
.v1-muted{color:#65748a;background:#f1f4f8}
.v1-badge{padding:4px 9px}
#v1-code-search{max-width:400px}
.interface-tabs{display:flex;width:100%;background:#fff;border:1px solid var(--border);padding:6px;gap:6px;margin-bottom:24px;box-shadow:0 3px 10px #19334e03}
.interface-tabs button{flex:1;padding:15px 18px;min-width:0;gap:12px;border-radius:9px;font-size:13px}
.interface-tabs button svg{width:19px;height:19px}
.interface-tabs button.active{background:#edf4ff;box-shadow:none;color:#245dcc}
.interface-view>.v1-panel{margin-bottom:22px}
.interface-view{min-width:0}
.empty{padding:52px 25px;color:#6e7f96}.empty h3{font-size:14px;color:#6b7d96;font-weight:500}.empty-symbol{background:#f0f5fb;border:1px solid #e3ebf7;color:#88a3c8;border-radius:16px;margin-bottom:17px}
.v1-empty{color:#6b7d92;padding:38px 20px!important}
dialog,dialog.v1-dialog,dialog.dm-dialog{border:1px solid #e2e8f1;border-radius:20px;box-shadow:0 30px 100px #0c214b36;padding:32px;animation:studio-dialog-in .23s cubic-bezier(.16,1,.3,1)}
dialog::backdrop{background:#10243f66;backdrop-filter:blur(5px);animation:studio-fade .2s}
dialog h2{font-size:22px;color:#223856;margin-bottom:24px}dialog p{color:#526681;font-size:12px}
dialog label{color:#445b7b;font-size:12px}dialog input,dialog select,dialog textarea{background:#fbfcfe}
dialog .close{background:#f0f4f9;color:#6b7e98;border-radius:9px;width:32px;height:32px}
dialog .divider,.v1-dialog-foot{border-color:#e9eef5;padding-top:22px;margin-top:26px}
.detail-drawer{max-width:780px;width:min(780px,100%);border-radius:22px 0 0 22px;padding:30px 34px;animation:studio-drawer-in .28s cubic-bezier(.16,1,.3,1)}
.detail-hero{display:block;padding:12px 0 25px}.detail-hero h2{font-size:30px;letter-spacing:-.5px;margin-bottom:12px}
.detail-hero p{color:#5c7493;font-size:13px;margin-bottom:15px}
.detail-hero .tag-list{display:flex;gap:8px}
.detail-tabs{width:100%;display:flex;gap:2px;margin:22px 0;background:#f0f4f9}.detail-tabs button{padding:10px 13px;font-size:12px;flex:1;box-shadow:none}
.detail-block .account-info{background:#f5f8fc;border-radius:10px;padding:15px}
.detail-block .account-info span{color:#586f8e;font-size:12px}.detail-block .account-info strong{color:#223b60}
.detail-block h3{font-size:14px;color:#2c4466}
.history-item{border-color:#dce6f5;color:#3b5474;font-size:13px}.history-item:before{background:#4480ed}.history-item small{color:#667d98;font-size:11px}
.security-symbol{background:#edf5ff;color:#3874df}
.security-summary h2,.account-form h2{font-size:18px}
#toast:not(:empty){background:#183453;border:1px solid #ffffff16;box-shadow:0 12px 32px #122b4b25;padding:15px 22px;border-radius:12px;font-size:13px;animation:studio-toast-in .24s ease-out}
.studio-progress{position:fixed;z-index:150;top:0;left:0;right:0;height:3px;pointer-events:none;overflow:hidden;background:#2864ed12;opacity:0;transition:opacity .15s}
.studio-progress:after{content:"";display:block;width:30%;height:100%;background:linear-gradient(90deg,transparent,#377aef,#63ccb8);animation:studio-progress 1.25s ease-in-out infinite}
body.studio-loading .studio-progress{opacity:1}
button.primary:disabled,.v1-btn:disabled{opacity:.7}
button.primary[aria-busy="true"]:before,.v1-btn[aria-busy="true"]:before{content:"";width:12px;height:12px;border:2px solid #ffffff55;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.studio-enter{animation:studio-enter .28s ease-out both}
.dm-card{animation:studio-enter .35s ease-out both}.dm-card:nth-child(2){animation-delay:.035s}.dm-card:nth-child(3){animation-delay:.07s}.dm-card:nth-child(4){animation-delay:.105s}
.login-wrap{position:relative;min-height:100dvh;grid-template-columns:1.1fr .9fr;background:linear-gradient(108deg,#122237 0%,#193957 53%,#f4f7fb 53%);gap:110px;padding:68px max(calc((100vw - 1200px)/2),65px)}
.intro{min-width:0;isolation:isolate}.intro>.brand{font-size:25px}.login-kicker{margin-top:70px;color:#89b9d9;font-size:12px;letter-spacing:2.5px}
.intro h1{font-size:clamp(36px,3.5vw,55px);font-weight:600;line-height:1.4;letter-spacing:1px;color:#fff;margin:23px 0}
.intro h1 span{color:#8ed9cb}
.intro p{font-size:14px;color:#b0c6dc;line-height:2;letter-spacing:.5px}
.login-card{width:410px;max-width:100%;border-radius:22px;padding:42px;border:1px solid #e0e7f0;box-shadow:0 28px 85px #193d6210;background:#fff}
.login-card:before{content:"JUKE TONG";display:block;font-size:10px;font-weight:700;letter-spacing:3px;color:#3062ad;margin-bottom:14px}
.login-card h2{font-size:25px;letter-spacing:-.5px;margin:0 0 32px}
.login-card input{background:#f8fafd;padding:14px;font-size:14px}.login-card label{font-size:12px;color:#546882}
.login-submit{min-height:46px;border-radius:10px;font-size:14px;margin:25px 0 7px;padding:13px 18px}
.login-submit span{transition:transform .2s}.login-submit:hover span{transform:translateX(4px)}
.login-visual{height:210px;max-width:430px;margin-top:30px;position:relative}
.studio-orbit{position:absolute;border:1px solid #8cbaed1c;border-radius:50%;width:330px;height:180px;left:30px;top:10px;transform:rotate(-18deg)}
.studio-orbit:after{content:"";position:absolute;border:1px solid #8cbaed12;border-radius:50%;inset:22px -25px;transform:rotate(30deg)}
.flow-node{position:absolute;border:1px solid #91bfff26;background:linear-gradient(130deg,#365677c9,#233d59f2);box-shadow:0 15px 35px #06152430;backdrop-filter:blur(8px);display:flex;align-items:center;gap:13px;padding:18px 23px;border-radius:15px;color:#e3eefc;font-size:13px}
.flow-node svg{width:23px;height:23px;color:#95bfef}
.flow-node-a{left:0;top:25px;animation:studio-float 7s ease-in-out infinite}
.flow-node-b{right:2px;top:85px;animation:studio-float 7s ease-in-out -2s infinite}
.flow-node-c{left:55px;bottom:2px;animation:studio-float 7s ease-in-out -4s infinite}
.flow-node-c svg{color:#8ad9c4}
.steps{color:#98b6d0;font-size:11px;gap:24px;margin-top:29px}
@keyframes studio-enter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes studio-dialog-in{from{opacity:0;transform:translateY(15px) scale(.98)}to{opacity:1;transform:none}}
@keyframes studio-drawer-in{from{opacity:0;transform:translateX(45px)}to{opacity:1;transform:none}}
@keyframes studio-fade{from{opacity:0}to{opacity:1}}
@keyframes studio-toast-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
@keyframes studio-progress{from{transform:translateX(-110%)}to{transform:translateX(440%)}}
@keyframes studio-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@media(min-width:761px){
 body.studio-collapsed{--sidebar-width:78px}
 .studio-collapsed #sidebar{padding-left:11px;padding-right:11px}
 .studio-collapsed #sidebar>.brand{padding-left:10px;padding-right:0;font-size:0;gap:0}
 .studio-collapsed #sidebar .brand em,.studio-collapsed .nav-label,.studio-collapsed .nav-caption,.studio-collapsed .user-info,.studio-collapsed #unread{display:none}
 .studio-collapsed #sidebar nav{padding-top:6px;gap:9px}
 .studio-collapsed #sidebar nav button{justify-content:center;padding:13px;min-height:45px}
 .studio-collapsed .sidebar-bottom{padding:15px 0;justify-content:center;flex-wrap:wrap;gap:5px}
 .studio-collapsed #logout{width:36px;min-height:28px}
}
@media(min-width:1550px){.main-content{padding:34px 40px 45px}.topbar{padding:0 40px}.dm-card strong{font-size:32px}.dm-plan-metrics .dm-card strong{font-size:25px}}
@media(max-width:1200px){:root{--sidebar-width:208px}.main-content{padding:26px 24px}.topbar{padding:0 24px}.lead-field-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.dm-card{padding:20px 17px}.dm-card strong{font-size:24px}.dm-metric-icon{right:14px}.dm-channel{padding:18px}.login-wrap{gap:65px;padding:55px}.login-card{padding:33px}.intro h1{font-size:39px}}
@media(max-width:1000px){.dm-main-metrics,.dm-plan-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.login-wrap{gap:38px;padding:40px}.login-card{padding:28px}.intro h1{font-size:35px}.intro p{font-size:12px}.flow-node{padding:15px;font-size:11px}.steps{gap:10px}.dm-channel{padding:17px 15px}.dm-channel strong{font-size:19px}}
@media(max-width:760px){
 :root{--sidebar-width:0px}
 #sidebar{width:235px;transition:transform .24s;visibility:visible!important}
 #sidebar:not(.mobile-open){transform:translateX(-100%);pointer-events:none;visibility:hidden!important}
 #sidebar.mobile-open{transform:translateX(0);pointer-events:auto}
 main{margin-left:0}.topbar{height:62px;padding:0 18px;z-index:15}.main-content{padding:24px 16px 32px}
 .breadcrumb{gap:10px}.breadcrumb>span,.breadcrumb>i,#today-label{display:none}.topbar-right{gap:9px}
 #menu-toggle{display:flex;font-size:16px}.main-content>header{margin-bottom:21px;gap:10px}.main-content>header h1{font-size:23px}
 .header-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end}.header-actions #new-customer{font-size:11px;padding:8px 11px}.header-actions button{font-size:11px}
 .panel,.v1-panel{border-radius:13px}.page-tabs{max-width:100%;gap:2px;padding:4px}.page-tabs button{font-size:11px;padding:9px 15px}
 .dm-filters{padding:16px}.dm-filters form{gap:13px}.dm-filters form>span{display:none}.dm-filters label{min-width:0;flex:1}
 .dm-main-metrics,.dm-plan-metrics{gap:11px}.dm-card{padding:18px 15px;min-height:127px;border-radius:13px}.dm-card>span{font-size:11px;padding-right:0}.dm-card strong{font-size:22px;margin-top:28px}
 .dm-metric-icon{width:26px;height:26px;top:12px;right:11px;opacity:.75}.dm-card>span{max-width:85px}
 .dm-plan-metrics .dm-card{padding:17px 15px;min-height:111px}.dm-plan-metrics .dm-card strong{font-size:21px;margin-top:23px}
 .dm-channels{grid-template-columns:repeat(2,minmax(0,1fr));padding:0;border-radius:13px}.dm-channel{padding:18px}.dm-channel:nth-child(3){border-top:1px solid var(--border)}.dm-channel:nth-child(4){border-top:1px solid var(--border)}.dm-channel:nth-child(3):before{display:none}
 .dm-channel strong{font-size:21px}.dm-channel>div{font-size:11px}.dm-departments>.panel-heading{padding:0 17px}
 .customer-panel>.toolbar{padding:16px;gap:10px;flex-wrap:wrap}.segmented{width:100%;overflow:auto;justify-content:flex-start}.segmented button{font-size:11px;padding:7px 10px;flex:none}
 .search-box{max-width:none;min-width:120px;flex:1}.table-tools{margin-left:0}.table-tools button{padding:7px 8px}
 .customer-panel>.filters{padding:18px 16px}.lead-field-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
 .customer-panel>.batch-bar{margin:13px 16px;padding:12px;gap:7px}.batch-bar button{font-size:10px}
 .customer-panel .table-wrap{overflow:auto}
 #lead-table{display:table;min-width:1280px;width:100%}#lead-table thead{display:table-header-group}#lead-rows{display:table-row-group;width:auto}
 #lead-rows tr{display:table-row;padding:0;position:static}#lead-rows td,#lead-rows td.check-cell{display:table-cell;position:static;padding:15px;border-bottom:1px solid #edf1f6;white-space:normal}
 #lead-rows td[data-label]:before{display:none}#lead-rows td.check-cell{width:40px}#lead-rows .lead-action .link{display:inline-flex;width:auto;background:transparent}
 .pagination{padding:15px 16px}.interface-tabs{gap:3px;padding:5px}.interface-tabs button{padding:13px 7px;font-size:11px;gap:6px}.interface-tabs button svg{width:16px}
 dialog,dialog.v1-dialog,dialog.dm-dialog{padding:25px 21px;border-radius:17px;width:calc(100% - 24px);max-height:92dvh}
 dialog.detail-drawer{width:100%;height:100dvh;max-height:100dvh;border-radius:17px 0 0 17px;padding:25px 20px}
 .detail-hero h2{font-size:27px}.detail-hero p{font-size:12px}.detail-tabs{gap:1px}.detail-tabs button{font-size:11px;padding:9px 10px}
 .detail-block .form-grid{grid-template-columns:1fr}.detail-block .full-width{grid-column:auto}
 .login-wrap{display:block;background:linear-gradient(145deg,#12243a,#214867);padding:34px 24px 40px;min-height:100dvh}
 .intro>.brand{font-size:23px}.login-kicker{margin-top:36px;font-size:10px}.intro h1{font-size:34px;margin:16px 0}.intro p{font-size:12px;margin-bottom:0}
 .login-card{width:100%;max-width:420px;margin:29px auto 0;padding:29px;border-radius:18px}.login-card h2{font-size:23px;margin-bottom:26px}.login-visual,.steps{display:none}
 #toast{left:16px;right:16px;top:14px}.v1-toolbar{gap:12px}
}
@media(prefers-reduced-motion:reduce){
 *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
 .studio-progress:after{width:100%;transform:none;background:#377aef}
}
/* Keep data section headers and form toolbars on the same spacing rhythm. */
.v1-panel-head{margin-bottom:0}
.v1-toolbar label{margin:0;gap:0}
.dm-departments .panel-heading{padding:0 24px;margin-bottom:22px}
#sidebar #unread{margin-left:auto}
@media(max-width:760px){.dm-departments .panel-heading{padding:0 17px}}
.studio-compact #lead-table #lead-rows td{padding-top:9px;padding-bottom:9px}
.studio-compact #lead-table th{padding-top:11px;padding-bottom:11px}
.dm-channel-baidu .dm-channel-progress::-webkit-progress-value{background:#4b7bf0}
.dm-channel-tencent .dm-channel-progress::-webkit-progress-value{background:#32a79f}
.dm-channel-xiaohongshu .dm-channel-progress::-webkit-progress-value{background:#e78098}
.dm-channel-douyin .dm-channel-progress::-webkit-progress-value{background:#9172d6}
.filter-actions{display:flex;align-items:center;gap:7px;align-self:end}
.filter-actions>.soft-primary{flex:1}
.filter-actions>.link{flex:none}
.customer-panel .table-wrap{max-height:clamp(320px,calc(100dvh - 485px),660px);overflow:auto}
.customer-panel:has(>#filters[hidden]) .table-wrap{max-height:clamp(360px,calc(100dvh - 300px),850px)}
@media(max-width:760px){.customer-panel .table-wrap{max-height:60dvh}}
.interface-view .v1-table-wrap{max-height:390px;overflow:auto}
@media(max-width:760px){
 .dm-filters form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
 .dm-filters form>button{grid-column:1/-1;justify-self:end}
 .dm-filters input[type=date]{padding:10px 8px;font-size:12px}
 .interface-view .v1-table-wrap{max-height:55dvh}
}

.baidu-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin-bottom:22px;background:#edf4ff;border:1px solid #dfe9fc;border-radius:14px}.baidu-intro h3{margin:12px 0}.baidu-intro p{max-width:680px;line-height:1.8}.baidu-search{display:block;padding:18px 22px;max-width:480px}.baidu-actions{min-width:230px;white-space:normal}.baidu-actions button{margin:3px}.baidu-departments{border:1px solid #e4eaf4;border-radius:10px;padding:16px;margin:18px 0;display:grid;gap:8px}.baidu-json{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;font-family:inherit;font-size:13px;line-height:1.7;background:#f5f7fb;padding:16px;border-radius:10px}.baidu-credentials textarea{font-family:monospace}@media(max-width:650px){.baidu-intro{align-items:flex-start;flex-direction:column}}

.tencent-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin-bottom:22px;background:#edf4ff;border:1px solid #dfe9fc;border-radius:14px}.tencent-intro h3{margin:12px 0}.tencent-intro p{max-width:680px;line-height:1.8}.tencent-search{display:block;padding:18px 22px;max-width:480px}.tencent-actions{min-width:230px;white-space:normal}.tencent-actions button{margin:3px}.tencent-departments{border:1px solid #e4eaf4;border-radius:10px;padding:16px;margin:18px 0;display:grid;gap:8px}.tencent-json{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;font-family:inherit;font-size:13px;line-height:1.7;background:#f5f7fb;padding:16px;border-radius:10px}.tencent-credentials textarea{font-family:monospace}@media(max-width:650px){.tencent-intro{align-items:flex-start;flex-direction:column}}

/* Keep per-account polling controls compact on desktop and touch friendly on mobile. */
#edit-form .baidu-pull-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:14px}
#edit-form .baidu-pull-types legend{font-weight:600;padding:0 6px}
#edit-form .baidu-pull-types .v1-check{display:flex;align-items:center;gap:8px;margin:0;padding:10px 8px;border:1px solid var(--line,#e2e8f0);border-radius:9px;background:var(--surface,#fff)}
#edit-form .baidu-pull-types input{width:16px;height:16px;margin:0;flex:none}
@media(max-width:600px){#edit-form .baidu-pull-types{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Follow-up board: compact stage overview and a paginated customer list. */
#tab-board{display:flex;flex-direction:column;gap:18px;min-width:0}
#tab-board .board-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:none}
#tab-board .board-intro{display:flex;align-items:center;gap:13px;flex-wrap:wrap}#tab-board .board-eyebrow{font-size:12px;color:#6582b8;background:#e9efff;padding:6px 9px;border-radius:7px}#tab-board .board-intro h2{margin:0;font-size:22px;font-weight:750;color:#1c2c45;letter-spacing:-.5px}#tab-board .board-scope{font-size:12px;color:#7a899e}
#tab-board .board-tools{display:flex;align-items:center;gap:8px}#tab-board .board-tools>button{height:38px;font-size:12px;padding:8px 13px}#tab-board .board-search{display:flex;align-items:center;border:1px solid #e1e7f0;background:#fff;border-radius:10px;width:325px;height:39px;overflow:hidden}#tab-board .board-search>span{display:flex;padding-left:12px;color:#899ab4}#tab-board .board-search svg{width:16px;height:16px}#tab-board .board-search input{margin:0;border:0;box-shadow:none;background:transparent;min-width:0;flex:1;font-size:12px;padding:10px}#tab-board .board-search button{flex:none;border:0;border-radius:0;height:100%;padding:0 14px;font-size:12px;background:#f5f8ff;color:#3564f5}
#tab-board .board-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;flex:none}
#tab-board .board-stage{position:relative;display:grid;grid-template-columns:1fr auto;gap:9px 5px;align-items:center;text-align:left;padding:15px 17px 19px;background:#fff;border:1px solid #e1e7f1;border-radius:12px;overflow:hidden;min-width:0;box-shadow:0 2px 3px #23365002;transition:border-color .16s,box-shadow .16s;white-space:normal}#tab-board .board-stage:hover{border-color:var(--stage-color);box-shadow:0 4px 14px #23365008}#tab-board .board-stage.active{background:#f4f7ff;border-color:#6387f5;box-shadow:0 0 0 2px #3564f514}#tab-board .board-stage-label{font-size:12px;color:#64748d;display:flex;align-items:center;gap:7px;grid-column:1/-1}#tab-board .board-stage-label i{width:7px;height:7px;border-radius:50%;background:var(--stage-color);flex:none}#tab-board .board-stage strong{font-size:28px;line-height:1.15;letter-spacing:-.7px;color:#223552;font-weight:750}#tab-board .board-stage-foot{font-size:11px;color:#8b9ab1}#tab-board .board-stage.active .board-stage-label,#tab-board .board-stage.active strong{color:#3564f5}#tab-board .board-stage-meter{position:absolute;bottom:0;left:0;right:0;height:3px;background:#f0f3f9}#tab-board .board-stage-meter i{height:100%;display:block;background:var(--stage-color);opacity:.8}
#tab-board .board-results{display:flex;flex-direction:column;flex:1;min-height:0;background:#fff;border:1px solid #e1e7f1;border-radius:14px;overflow:hidden;box-shadow:0 3px 10px #23365003}#tab-board .board-list-heading{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;border-bottom:1px solid #edf1f7;flex:none;gap:14px}#tab-board .board-list-heading h3{font-size:15px;font-weight:700;color:#253650;margin:0}#tab-board .board-list-heading>span{font-size:11px;color:#8999af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:65%}#tab-board .board-table-wrap{overflow:auto;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#ced8e7 transparent;overscroll-behavior:contain}
#tab-board .board-table{table-layout:fixed;min-width:1030px;width:100%;border-collapse:separate;border-spacing:0;white-space:normal}#tab-board .board-col-customer{width:18%}#tab-board .board-col-owner{width:13%}#tab-board .board-col-property{width:14%}#tab-board .board-col-stage{width:10%}#tab-board .board-col-followup{width:20%}#tab-board .board-col-time{width:16%}#tab-board .board-col-actions{width:9%}
#tab-board .board-table th{position:sticky;top:0;z-index:2;background:#f8faff;padding:12px 17px;font-size:11px;font-weight:600;color:#74849c;border-bottom:1px solid #e8eef6}#tab-board .board-table td{padding:12px 17px;color:#455b77;font-size:12px;border-bottom:1px solid #edf1f7;vertical-align:middle}#tab-board .board-table tbody tr:hover{background:#f8faff}#tab-board .board-table small{display:block;font-size:10px;color:#8a9bb2;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
#tab-board .board-customer{display:flex;align-items:center;gap:11px;min-width:0}#tab-board .board-customer>div{min-width:0}#tab-board .board-avatar{width:35px;height:35px;flex:none;display:grid;place-items:center;background:#ecf1ff;color:#5378e1;font-size:15px;font-weight:700;border-radius:10px}#tab-board .board-customer-name{display:block;padding:0;border:0;background:transparent;border-radius:0;text-align:left;max-width:100%;color:#243752;font-weight:700;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5}#tab-board .board-customer-name:hover{color:#3564f5}#tab-board .board-cell-primary{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5}#tab-board .board-followup-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0;border:0;background:transparent;border-radius:0;line-height:1.7;color:#536783;text-align:left;font-size:12px;white-space:normal;word-break:break-word}#tab-board .board-followup-text:hover{color:#3564f5}#tab-board .board-time>span{font-size:11px;display:block;white-space:nowrap;line-height:1.5;font-variant-numeric:tabular-nums}#tab-board .board-time small{font-size:10px}
#tab-board .board-stage-tag{display:inline-block;padding:4px 7px;border-radius:5px;font-size:10px;color:#587fcc;background:#edf3ff;white-space:nowrap}#tab-board .board-stage-tag[data-stage="跟进中"]{color:#8862cd;background:#f2edfd}#tab-board .board-stage-tag[data-stage="约带看"]{color:#b78537;background:#fff5e6}#tab-board .board-stage-tag[data-stage="已带看"]{color:#248e8c;background:#eaf7f6}#tab-board .board-stage-tag[data-stage="成交客户"]{color:#2e986b;background:#eaf7ef}#tab-board .board-table .status{font-size:9px;padding:2px 5px}#tab-board .board-row-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}#tab-board .board-followup-action{border:0;background:#edf3ff;color:#3564f5;font-size:11px;padding:6px 9px;border-radius:7px}#tab-board .board-detail-action{border:0;background:transparent;color:#7c8da5;padding:5px 0;font-size:11px}#tab-board .board-followup-action:hover{background:#dce7ff}#tab-board .board-detail-action:hover{color:#3564f5}
#tab-board .board-pagination{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:13px 19px;border-top:1px solid #e8eef6;flex:none;background:#fff;font-size:11px;color:#71849e}#tab-board #board-count{margin-right:auto}#tab-board .board-pagination label{display:flex;align-items:center;gap:7px;margin:0;font-size:11px;white-space:nowrap}#tab-board .board-pagination select{font-size:11px;width:74px;margin:0;padding:6px 8px;height:30px}#tab-board .board-pagination button{font-size:11px;padding:6px 11px;height:30px}#tab-board #board-page{min-width:44px;text-align:center;font-variant-numeric:tabular-nums}#tab-board .board-table .board-table-empty{text-align:center;padding:55px 20px;color:#8797ae}#tab-board .board-table-empty strong{display:block;color:#617590;font-size:14px;font-weight:600;margin-bottom:9px}#tab-board .board-table-empty>span{display:block;font-size:12px}#tab-board .board-table-empty button{margin-top:15px}#tab-board .board-empty-mark{display:grid;place-items:center;margin:0 auto 17px;width:46px;height:46px;background:#f1f5ff;border-radius:13px;color:#91a9d6}#tab-board .board-empty-mark svg{width:23px;height:23px}
@media(max-width:1200px){#tab-board .board-toolbar{gap:14px}#tab-board .board-intro{gap:8px}#tab-board .board-scope{flex-basis:100%}#tab-board .board-search{width:265px}#tab-board .board-stage{padding:13px 12px 17px}#tab-board .board-stage strong{font-size:25px}}
@media(max-width:760px){#tab-board{height:auto!important}#tab-board .board-toolbar{align-items:flex-start;flex-direction:column;gap:14px}#tab-board .board-tools{width:100%;flex-wrap:wrap}#tab-board .board-search{flex:1;min-width:200px}#tab-board .board-stages{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}#tab-board .board-stage strong{font-size:24px}#tab-board .board-stage-label{font-size:11px}#tab-board .board-table-wrap{max-height:55dvh;flex:auto}#tab-board .board-pagination{flex-wrap:wrap;gap:8px;padding:12px}#tab-board #board-count{flex-basis:100%;font-size:11px}#tab-board .board-results{flex:auto}#tab-board .board-list-heading{padding:14px}}
/* Keep the board in one viewport; automatic pages fit all their rows. */
.main-content:has(>#tab-board:not([hidden]))>header{display:none}
#tab-board .board-table{min-width:950px}#tab-board .board-col-followup{width:19%}#tab-board .board-col-actions{width:10%}
#tab-board .board-table th{padding:11px 12px}#tab-board .board-table td{padding:10px 12px;height:68px;box-sizing:border-box}
#tab-board .board-table button{min-height:0;height:auto}#tab-board .board-table small{margin-top:4px}
#tab-board .board-followup-text{-webkit-line-clamp:1}#tab-board .board-table .status{line-height:1.3}
#tab-board .board-pagination select{width:102px}#tab-board .board-table .board-table-empty{height:auto}

/* Compact operations pages: preserve readable text and existing controls. */
.main-content:has(>#tab-finance:not([hidden])),.main-content:has(>#tab-leads:not([hidden])){padding:18px 24px 24px;max-width:1800px}
.main-content:has(>#tab-finance:not([hidden]))>header,.main-content:has(>#tab-leads:not([hidden]))>header{min-height:34px;margin-bottom:12px}
.main-content:has(>#tab-finance:not([hidden]))>header h1,.main-content:has(>#tab-leads:not([hidden]))>header h1{font-size:24px}
#tab-finance>.page-tabs{margin-bottom:12px;padding:3px;border-radius:8px}
#tab-finance>.page-tabs button{min-height:30px;padding:6px 16px}
#finance-overview{display:flex;flex-direction:column;gap:12px}
#finance-overview .dm-filters{display:grid;grid-template-columns:auto 1fr;gap:9px 22px;margin:0;padding:12px 16px;border-radius:10px}
#finance-overview .dm-filters form{grid-column:1/-1;grid-row:1;display:flex;align-items:end;gap:10px;margin:0}
#finance-overview .dm-filters label{flex:0 1 210px;min-width:130px;font-size:12px;margin:0}
#finance-overview .dm-filters label:has(select){flex:1 1 250px;max-width:400px}
#finance-overview .dm-filters input,#finance-overview .dm-filters select{min-height:32px;height:32px;font-size:13px;padding:4px 9px;margin-top:4px;border-radius:6px}
#finance-overview .dm-filters form>button{min-height:32px;height:32px;padding:5px 14px;font-size:12px}
#finance-overview .dm-presets{display:flex;align-items:center;gap:4px;margin:0;flex-wrap:wrap}
#finance-overview .dm-presets:not(.dm-data-scopes){justify-content:flex-end}
#finance-overview .dm-presets button{font-size:12px;min-height:27px;padding:4px 10px;border-radius:5px}
#finance-overview .dm-data-scopes strong{font-size:12px;font-weight:500;color:#61748d;margin-right:4px}
#finance-overview .dm-own-department{padding-bottom:3px;min-width:160px}
#finance-overview .dm-own-department small{font-size:12px;margin-bottom:4px}
#finance-overview .dm-main-metrics,#finance-overview .dm-plan-metrics{gap:10px;margin:0}
#finance-overview .dm-card{min-height:80px;border-radius:10px;padding:12px 16px;box-shadow:none}
#finance-overview .dm-card:hover{transform:none;box-shadow:none}
#finance-overview .dm-card>span{font-size:12px;letter-spacing:0}
#finance-overview .dm-card>strong{font-size:25px;line-height:1.2;letter-spacing:-.4px;margin:9px 0 0}
#finance-overview .dm-metric-icon{width:26px;height:26px;right:12px;top:10px;border-radius:7px}
#finance-overview .dm-metric-icon svg{width:14px;height:14px}
#finance-overview .dm-billing-breakdown{margin:0}
#finance-overview .dm-section-title{margin:0 0 7px}
#finance-overview .dm-section-title h2,#finance-overview .dm-departments h2{font-size:14px;margin:0}
#finance-overview .dm-billing-groups{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#finance-overview .dm-billing-group{border-radius:9px}
#finance-overview .dm-billing-heading{padding:10px 12px 0}
#finance-overview .dm-billing-heading h3{font-size:13px}
#finance-overview .dm-billing-heading>span{padding:2px 6px}
#finance-overview .dm-billing-values{padding:10px 4px 12px;grid-template-columns:.85fr 1.2fr 1fr}
#finance-overview .dm-billing-values>div{padding:0 8px}
#finance-overview .dm-billing-values span{font-size:11px;white-space:nowrap}
#finance-overview .dm-billing-values strong{font-size:17px;line-height:1.3;margin:6px 0 0;overflow-wrap:normal}
#finance-overview [data-billing-cost]{font-size:15px}
#finance-overview .dm-billing-values strong small{font-size:11px}
#finance-overview .dm-departments{padding:0;border-radius:10px;margin:0}
#finance-overview .dm-departments>.panel-heading{padding:10px 14px;margin:0;min-height:42px;align-items:center}
#finance-overview .dm-departments .table-wrap{max-height:480px;overflow:auto}
#finance-overview .dm-departments th,#finance-overview .dm-departments td{padding:8px 10px;font-size:12px;line-height:1.5;vertical-align:middle}
#finance-overview .dm-departments th{height:36px}
#finance-overview .dm-departments td small{display:none}
#finance-overview .dm-departments tbody tr:nth-child(even){background:#f7f9fc}
#finance-overview .dm-departments .link{padding:3px 6px;min-height:26px;font-size:12px}
#finance-overview .dm-departments th:nth-child(n+2):not(:last-child),#finance-overview .dm-departments td:nth-child(n+2):not(:last-child){text-align:right;font-variant-numeric:tabular-nums}
#finance-overview .dm-departments+.dm-section-title{margin:4px 0 -5px}
#finance-overview .dm-plan-metrics .dm-card{min-height:66px;padding:10px 14px}
#finance-overview .dm-plan-metrics .dm-card>strong{font-size:20px;margin:6px 0 0}
#finance-overview .dm-channels{margin:0;padding:0;border-radius:10px}
#finance-overview .dm-channel{padding:10px 14px}
#finance-overview .dm-channel>strong{font-size:20px;margin:7px 0}
#finance-overview .dm-channel+.dm-channel:before{top:12px;bottom:12px}

#tab-leads .customer-panel{border-radius:10px}
#tab-leads .customer-panel>.toolbar{padding:10px 14px;gap:8px;margin:0;flex-wrap:wrap}
#tab-leads .segmented{padding:3px;gap:2px}
#tab-leads .segmented button{min-height:29px;padding:5px 10px;font-size:12px}
#tab-leads .search-box{height:32px;max-width:220px;min-width:130px;flex:1}
#tab-leads .search-box input{font-size:12px;padding:5px 9px}
#tab-leads .search-box button{min-height:28px;padding:4px 7px}
#tab-leads .toolbar>.icon-button{min-height:30px;height:30px;width:30px;padding:5px}
#tab-leads .table-tools{gap:4px;margin-left:0}
#tab-leads .table-tools button{min-height:30px;padding:5px 8px}
#tab-leads #filters{padding:10px 14px;grid-template-columns:repeat(6,minmax(0,1fr)) auto;gap:9px 12px;margin:0;align-items:end}
#tab-leads #filters label{font-size:12px;line-height:1.25;margin:0;min-width:0}
#tab-leads #filters input,#tab-leads #filters select{height:31px;min-height:31px;padding:4px 8px;font-size:12px;margin-top:4px;border-radius:5px}
#tab-leads #filters label:nth-of-type(7){grid-column:1}
#tab-leads #filters .filter-actions{grid-column:7;grid-row:1/3;align-self:end;display:flex;flex-direction:column;gap:5px;min-width:54px}
#tab-leads #filters .filter-actions button{width:100%;height:31px;min-height:31px;padding:4px 9px;font-size:12px}
#tab-leads .customer-panel>.batch-bar{padding:7px 12px;margin:7px 14px;gap:7px;border-radius:6px;font-size:12px}
#tab-leads .customer-panel>.batch-bar button{min-height:28px;padding:4px 8px;font-size:12px}
#tab-leads #lead-table th{padding:8px 10px;font-size:12px;line-height:1.5;height:36px}
#tab-leads #lead-table #lead-rows td{padding:7px 10px;font-size:13px;line-height:1.4;vertical-align:middle}
#tab-leads #lead-table #lead-rows td small{font-size:11px;margin-top:2px;line-height:1.3}
#tab-leads #lead-table .link{min-height:25px;padding:3px 5px;font-size:12px;line-height:1.4}
#tab-leads #lead-table .status{padding:3px 6px}
#tab-leads #lead-table tbody tr:nth-child(even){background:#f7f9fc}
#tab-leads .lead-followup{min-width:160px;max-width:240px}
#tab-leads .followup-preview{line-height:1.4;-webkit-line-clamp:2}
#tab-leads .customer-panel>.pagination{padding:8px 14px;min-height:46px;font-size:12px}
#tab-leads .pagination button{min-height:28px;padding:4px 9px;font-size:12px}
#tab-leads .pagination span{color:#60748f}
#tab-leads .customer-panel .table-wrap{max-height:max(300px,calc(100dvh - 390px))}
#tab-leads .customer-panel:has(>#filters[hidden]) .table-wrap{max-height:max(300px,calc(100dvh - 265px))}
body.studio-compact #tab-leads #lead-table #lead-rows td{padding-top:5px;padding-bottom:5px}

@media(max-width:1400px){
 #finance-overview .dm-billing-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
 #tab-leads #filters{grid-template-columns:repeat(4,minmax(0,1fr)) auto}
 #tab-leads #filters label:nth-of-type(7){grid-column:auto}
 #tab-leads #filters label:nth-of-type(5),#tab-leads #filters label:nth-of-type(9){grid-column:1}
 #tab-leads #filters .filter-actions{grid-column:5;grid-row:1/4}
 #tab-leads .customer-panel .table-wrap{max-height:max(300px,calc(100dvh - 445px))}
}
@media(max-width:900px){
 #finance-overview .dm-filters{display:flex;flex-direction:column;gap:9px}
 #finance-overview .dm-filters form{order:-1;flex-wrap:wrap}
 #finance-overview .dm-filters label{flex:1 1 120px}
 #finance-overview .dm-presets:not(.dm-data-scopes){justify-content:flex-start}
 #finance-overview .dm-card>strong{font-size:22px}
 #tab-leads .segmented{width:100%;overflow-x:auto}
 #tab-leads .search-box{max-width:none}
 #tab-leads .customer-panel .table-wrap{max-height:60dvh}
}
@media(max-width:680px){
 .main-content:has(>#tab-finance:not([hidden])),.main-content:has(>#tab-leads:not([hidden])){padding:14px 12px 20px}
 #finance-overview .dm-main-metrics,#finance-overview .dm-plan-metrics,#finance-overview .dm-channels{grid-template-columns:repeat(2,minmax(0,1fr))}
 #finance-overview .dm-billing-groups{grid-template-columns:1fr}
 #finance-overview .dm-filters{padding:10px 12px}
 #finance-overview .dm-filters form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
 #finance-overview .dm-filters label{min-width:0;max-width:none}
 #finance-overview .dm-filters form>button{grid-column:auto;justify-self:stretch}
 #tab-leads #filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #tab-leads #filters label:nth-of-type(n){grid-column:auto}
 #tab-leads #filters .filter-actions{grid-column:1/-1;grid-row:auto;flex-direction:row;justify-content:flex-end}
 #tab-leads #filters .filter-actions button{width:auto;flex:0 1 100px}
 #tab-leads #lead-table #lead-rows td{font-size:12px}
}

/* One shared heading bar; data begins immediately beneath it. */
#app .topbar{height:54px;min-height:54px;padding:0 20px;gap:12px}
#app .breadcrumb{gap:10px;min-width:0}
#app .breadcrumb h1{font-size:18px;line-height:1.3;margin:0;font-weight:650;color:#1d3452;white-space:nowrap}
#app .topbar-right{gap:8px;min-width:0}
#app .topbar-right #today-label,#app .topbar-right #mode{display:none}
#app .topbar .header-actions{display:flex;gap:6px;align-items:center}
#app .topbar .header-actions button{min-height:31px;padding:5px 10px;font-size:12px;border-radius:6px}
#app .topbar .header-actions button .icon{width:15px;height:15px}
#app .topbar .notification-shortcut{width:30px;height:31px;min-height:31px;padding:5px}
#app main .main-content.main-content{padding:14px 20px 22px}
.main-content>section>.page-tabs{margin-bottom:12px;padding:3px;border-radius:8px}
.main-content>section>.page-tabs button{min-height:30px;padding:6px 15px}
#tab-leads .customer-panel .table-wrap{max-height:max(300px,calc(100dvh - 305px))}
#tab-leads .customer-panel:has(>#filters[hidden]) .table-wrap{max-height:max(300px,calc(100dvh - 180px))}
@media(max-width:1400px){#tab-leads .customer-panel .table-wrap{max-height:max(300px,calc(100dvh - 360px))}}
@media(max-width:900px){#tab-leads .customer-panel .table-wrap{max-height:60dvh}}
@media(max-width:680px){
 #app .topbar{padding:0 12px;height:auto;min-height:50px;flex-wrap:wrap;gap:5px 8px;padding-top:8px;padding-bottom:8px}
 #app .breadcrumb h1{font-size:17px}
 #app .topbar .header-actions button{padding:5px 7px}
 #app .topbar-right{margin-left:auto}
 #app main .main-content.main-content{padding:12px 10px 18px}
}

/* Compact lead filters, daily budgets and department accounting. */
.lead-department-picker{display:block;position:relative;min-width:0}
#lead-department-options{position:absolute;z-index:80;top:calc(100% + 4px);left:0;width:100%;min-width:200px;max-height:260px;overflow:auto;background:#fff;border:1px solid #cbd8ed;border-radius:8px;box-shadow:0 8px 24px #17345b22;padding:4px}
#lead-department-options button{display:block;width:100%;border:0;text-align:left;background:none;padding:8px 10px;border-radius:4px;white-space:nowrap;font-size:13px;color:#243e61}
#lead-department-options button:hover,#lead-department-options button.active{background:#edf3ff;color:#215bda}
#lead-department-options .picker-empty{display:block;padding:9px;color:#8793a7;font-size:12px}
#filter-department[hidden],#lead-department-options[hidden]{display:none!important}
#tab-leads .customer-panel{overflow:visible}
#filters input[type=date][data-empty=true]::-webkit-datetime-edit{color:transparent}
#tab-leads #lead-table td{height:44px;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:6px;padding-bottom:6px;overflow-wrap:normal}
#tab-leads .lead-followup .followup-preview{display:block;max-width:230px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px;-webkit-line-clamp:unset;padding:0;text-align:left}
#finance-overview .dm-plan-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.dm-dialog{max-width:440px;padding:20px}
.dm-dialog .form-grid{gap:10px}.dm-dialog .divider{margin-top:14px;padding-top:14px}
#finance-content{display:flex;flex-direction:column;gap:12px}
#finance-content[hidden]{display:none}
#finance-content>.panel:first-child,#finance-policy>.v1-panel:first-child{padding:16px;margin:0}
#finance-filters{display:grid;grid-template-columns:minmax(160px,220px) minmax(180px,280px) minmax(130px,160px) 160px 160px max-content max-content;justify-content:start;gap:12px;align-items:end;margin:0;padding:0;background:none;border:0}
#finance-filters label,#billing-department-picker label{display:flex;flex-direction:column;align-items:stretch;margin:0;gap:7px;line-height:18px;font-size:12px;min-width:0}
#finance-filters input,#finance-filters select,#billing-department-picker input,#billing-department-picker select{height:32px;min-height:32px;margin:0;padding:5px 9px;font-size:13px}
#finance-filters>button{height:32px;padding:5px 10px;font-size:12px;white-space:nowrap}
#finance-filters input[type=date][data-empty=true]:not(:focus)::-webkit-datetime-edit{color:transparent}
#finance-filters [data-department-search-status],#billing-department-picker [data-department-search-status]{grid-column:1/-1;font-size:12px}
#finance-filters [data-department-search-status]:empty,#billing-department-picker [data-department-search-status]:empty{display:none}
#finance-content .section-toolbar{margin:0;min-height:32px;gap:12px}
#finance-content h2,#finance-policy h2{font-size:14px;margin:0}
#finance-content button{font-size:12px;padding:6px 10px;min-height:30px}
#finance-content .finance-accounts{display:flex;flex-direction:column;gap:8px;margin:0}
#finance-content .finance-account-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(150px,1fr) minmax(330px,2fr) auto;align-items:center;gap:20px;padding:14px 16px;margin:0;min-height:90px}
.finance-account-name h3{font-size:14px;margin:0}.finance-account-name .status{margin-top:5px}
.finance-account-balance>span{font-size:12px;color:#72829a;display:block;margin-bottom:6px}
.finance-account-balance>strong{font-size:24px;color:#264b76;font-weight:700}
#finance-content .finance-totals{margin:0;padding:0;border:0;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
#finance-content .finance-totals span{font-size:12px;color:#72829a}
#finance-content .finance-totals b{font-size:16px;font-weight:600;color:#30496b;margin-top:7px;white-space:nowrap}
#finance-content .finance-account-row .actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
#finance-content .finance-ledger-panel{margin:0;padding:0;overflow:hidden}
#finance-content .finance-ledger-panel .toolbar{padding:10px 14px;min-height:42px;margin:0}
#finance-content .finance-table th{padding:9px 12px;font-size:12px}
#finance-content .finance-table td{padding:8px 12px;font-size:13px;line-height:1.4}
#finance-content .finance-table td small{margin-top:3px;font-size:11px;line-height:1.3}
#finance-content .finance-ledger-panel>.table-wrap{max-height:calc(100vh - 460px);min-height:120px;overflow:auto}
#finance-content .pagination{padding:8px 14px;min-height:40px}
#finance-content .empty{padding:20px;min-height:0}
#finance-policy{display:flex;flex-direction:column;gap:12px}
#finance-policy[hidden]{display:none}
#billing-department-picker{display:grid;grid-template-columns:220px 300px;justify-content:start;gap:12px;margin:0;padding:0;border:0;background:none}
#finance-policy .billing-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#finance-policy .v1-panel{margin:0;overflow:hidden;padding:0}
#finance-policy .v1-panel-head{padding:12px 14px;min-height:42px;margin:0}
#finance-policy .v1-table-wrap{overflow:auto}
#finance-policy th,#finance-policy td{padding:10px 12px;font-size:13px;line-height:1.4}
#finance-policy td small{font-size:11px;margin-top:4px}
#finance-policy .v1-empty{padding:24px 14px;min-height:0}
#finance-policy .v1-empty>span{display:none}
#finance-policy>article:last-child .v1-table-wrap{max-height:330px}
#finance-policy button{font-size:12px;padding:6px 9px;min-height:30px}
@media(max-width:1500px){#finance-filters{grid-template-columns:180px minmax(180px,1fr) 140px 145px 145px max-content max-content}#finance-content .finance-account-row{gap:12px;grid-template-columns:150px 170px minmax(270px,1fr) auto}#finance-content .finance-account-row .actions{max-width:190px}}
@media(max-width:1200px){#finance-filters{grid-template-columns:repeat(3,minmax(130px,1fr))}#finance-content .finance-account-row{grid-template-columns:1fr 1fr}#finance-content .finance-account-row .actions{max-width:none}#finance-policy .billing-settings-grid{grid-template-columns:1fr}}
@media(max-width:760px){#finance-filters,#billing-department-picker{grid-template-columns:repeat(2,minmax(0,1fr))}#finance-content .finance-account-row{gap:14px}#finance-content .finance-totals{grid-column:1/-1;gap:10px}#finance-content .finance-account-row .actions{grid-column:1/-1;justify-content:flex-start}#finance-content .finance-ledger-panel>.table-wrap{max-height:none}#finance-overview .dm-plan-metrics{grid-template-columns:1fr}}

/* Keep lead intake time readable to the minute on one line. */
#tab-leads #lead-table th:nth-child(2),#tab-leads #lead-table td:nth-child(2){width:150px;min-width:150px;white-space:nowrap}
#tab-leads #lead-table th:nth-child(3),#tab-leads #lead-table td:nth-child(3){width:160px;max-width:160px}

/* System/data pages share the operating workspace density, without changing its controls. */
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit,#tab-account){min-width:0;width:100%}
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit,#tab-account) :is(.panel,.v1-panel){border-radius:10px;box-shadow:none;margin-bottom:12px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit,#tab-account) :is(.panel-heading,.v1-panel-head){padding:11px 14px;margin:0;min-height:44px;gap:12px;align-items:center;flex-direction:row}
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit,#tab-account) :is(h2,h3){font-size:14px;line-height:20px;margin:0}
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit,#tab-account) :is(button,.v1-btn,.v1-btn-sub){min-height:30px;padding:6px 11px;font-size:12px;line-height:18px;border-radius:7px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-account) label:not(.v1-check){font-size:12px;line-height:18px;margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
:is(#tab-properties,#tab-v1,#tab-data,#tab-account) :is(input:not([type=checkbox]),select){min-width:0;height:32px;min-height:32px;padding:5px 10px;margin:0;line-height:20px;font-size:12px;box-sizing:border-box;border-radius:7px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-notifications,#tab-audit) :is(th,td){padding:9px 12px;font-size:12px;line-height:19px;vertical-align:middle}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) th{height:36px;padding-top:7px;padding-bottom:7px;white-space:nowrap}
:is(#tab-v1,#tab-data,#tab-audit) td{height:44px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) td small{font-size:11px;line-height:16px;margin-top:2px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) tbody tr:nth-child(even){background:#f6f8fc}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) :is(.table-wrap,.v1-table-wrap,.pm-table-wrap){min-width:0}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) :is(.empty,.v1-empty,.pm-empty){padding:22px 14px;min-height:74px}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) :is(.empty-symbol,.v1-empty>span,.pm-empty>div){display:none}
:is(#tab-properties,#tab-v1,#tab-data,#tab-audit) :is(.pagination,.pm-pagination,.v1-pagination){padding:9px 14px;margin:0;font-size:12px}
:is(#tab-v1,#tab-data) .page-tabs{margin-bottom:12px}

/* Department/personnel tools stay together; actions use the remaining right edge. */
#tab-v1 .v1-panel{overflow:visible}
#tab-v1 .v1-table-wrap{border-radius:0 0 10px 10px}
#tab-v1 .v1-toolbar{justify-content:flex-start;flex-wrap:wrap;align-items:flex-end;padding:14px;gap:12px}
#tab-v1 .v1-toolbar label{width:220px;min-width:180px;flex:0 1 220px}
#tab-v1 .v1-toolbar .staff-search-field{width:260px;flex-basis:260px}
#tab-v1 .v1-toolbar .staff-department-field{width:280px;flex-basis:280px}
#tab-v1 .v1-toolbar-actions{margin-left:auto;gap:8px}
#v1-staff-search-result{font-size:12px;color:#7386a5;white-space:nowrap}
#tab-v1 .v1-badge{padding:3px 7px;font-size:11px}
#tab-v1 .v1-receiving{padding:4px 9px;min-height:28px;gap:6px}
#tab-v1 .v1-table td:has(.v1-row-menu){white-space:nowrap}
#tab-v1 .v1-row-menu{display:inline-block;vertical-align:middle;margin-left:10px}
#tab-v1 .v1-row-menu>div{position:absolute;right:0;top:23px;z-index:8;width:160px;padding:8px;margin:0;display:grid;gap:5px;border:1px solid #dce4f1;border-radius:8px;background:white;box-shadow:0 6px 20px #263c5f20}
#tab-v1 .v1-row-menu button{margin:0;text-align:left}
.staff-department-picker{position:relative;display:flex;min-width:0}
#tab-v1 .staff-department-picker input{width:100%;padding-right:34px}
#tab-v1 .staff-picker-toggle{position:absolute;right:1px;top:1px;min-height:30px;width:30px;padding:0;background:transparent;border:0;color:#516a90}
.staff-department-options{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:25;max-height:264px;overflow:auto;background:#fff;border:1px solid #cddbf0;border-radius:8px;padding:4px;box-shadow:0 8px 24px #20395d26}
#tab-v1 .staff-department-options button{display:block;width:100%;text-align:left;border:0;background:white;border-radius:4px;padding:7px 9px;min-height:32px;margin:0}
#tab-v1 .staff-department-options button:is(:hover,.active),#tab-v1 .staff-department-options button[aria-selected=true]{background:#edf3ff;color:#2159c4}
.staff-picker-empty{display:block;padding:9px;color:#8795ab;font-size:12px}

/* Property filters, metrics and list use the entire content width. */
#tab-properties .pm-filter{padding:14px!important;gap:12px;margin:0 0 12px}
#tab-properties .pm-filter label{flex:0 1 200px;min-width:160px}
#tab-properties .pm-filter .pm-search{flex:0 1 300px}
#tab-properties .pm-filter button{height:32px}
#tab-properties .pm-stats{margin:0 0 12px;gap:10px}
#tab-properties .pm-stats>div{flex:1;min-width:0;padding:11px 14px;border-radius:9px;display:flex;align-items:center;justify-content:space-between}
#tab-properties .pm-stats strong{font-size:22px;margin:0;line-height:28px}
#tab-properties .pm-toolbar{padding:10px 14px;gap:10px;flex-direction:row;flex-wrap:wrap;align-items:center}
#tab-properties .pm-actions{gap:6px}
#tab-properties .pm-table th:first-child{width:23%}
#tab-properties .pm-table th:nth-child(2){width:18%}
#tab-properties .pm-table th:nth-child(3){width:18%}
#tab-properties .pm-table td:last-child{width:300px}
#tab-properties .pm-row-actions{max-width:none;gap:10px}
#tab-properties .pm-row-actions :is(button,a){min-height:24px;padding:2px 0;border-radius:0}
#tab-properties .pm-sharing{margin-top:2px}
#tab-properties .pm-empty h3{margin:0;color:#7386a5;font-weight:400;font-size:13px}
#tab-properties .pm-warning{margin:0;padding:8px 14px;font-size:12px}

/* Import file/ownership/mapping are compact working controls. */
#tab-data .panel{padding:14px}
#tab-data .import-grid{display:block}
#tab-data .toolbar{padding:0;margin:0 0 10px;gap:10px;flex-wrap:wrap;min-height:32px}
#tab-data .toolbar h2{margin:0}
#tab-data .upload-zone{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin:0;text-align:left;min-height:60px}
#tab-data .upload-zone h3{font-size:13px;overflow-wrap:anywhere}
#tab-data label.upload-file-label{flex-direction:row;align-items:center;gap:10px;max-width:100%;color:#506c95}
#tab-data .upload-file-label input{width:330px;max-width:100%;padding:4px 8px}
#tab-data .divider{margin-top:12px;padding-top:12px}
#tab-data .panel-heading{padding:0;margin:0 0 10px;min-height:20px}
#tab-data .form-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
#tab-data .mapping-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px}
#tab-data .data-mapping-title{margin:12px 0 10px}
#tab-data .form-grid label,#tab-data .mapping-grid label{margin:0}
#tab-data .data-file-count{font-size:12px;color:#7587a2;margin-left:10px}
#tab-data #data-preview .panel-heading>div{display:flex;align-items:center}
#tab-data #data-import-cost .divider{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;margin-top:10px;padding:10px 12px;background:#f6f9fe;border:1px solid #e0e8f6;border-radius:7px}
#tab-data #data-import-cost p{margin:0;font-size:12px;line-height:18px}
#tab-data .data-preview-controls{padding:0;margin:0 0 8px}
#tab-data .data-import-preview{max-height:360px}
#tab-data #data-import-form>.toolbar.divider{padding:10px 0 0;margin-bottom:0}

/* Interface sections: compact summaries and scrollable records, retaining all statuses. */
#tab-v1 .interface-summary-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:12px}
#tab-v1 .interface-summary-grid>.v1-panel{margin:0;min-width:0}
#tab-v1 .interface-summary-grid .v1-table-wrap{max-height:280px}
#tab-v1 .interface-summary-grid>.v1-panel>label{padding:10px 14px;width:320px;max-width:100%}
#tab-v1 .interface-view .table-wrap,#tab-v1 .interface-view .v1-table-wrap{max-height:370px;overflow:auto}
#tab-v1 .interface-view thead{position:sticky;top:0;z-index:2}
#tab-v1 .interface-view th{background:#f1f5fb}
#tab-v1 .interface-view .v1-panel-head>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
#tab-v1 .interface-view .v1-panel-head p{margin:0;font-size:12px;color:#687f9f}
#tab-v1 .tencent-intro{padding:0;margin:0 0 10px;display:flex;justify-content:flex-end;border:0;background:none}
#tab-v1 .tencent-search{padding:10px 14px;width:310px;max-width:100%;margin:0}
#tab-v1 .baidu-toolbar{padding:12px 14px;margin:0;gap:10px}
#tab-v1 .baidu-toolbar input{max-width:280px}
#tab-v1 #sms-content .sms-panel-body{padding:12px 14px}
#tab-v1 #sms-content .sms-panel-body .form-grid{gap:12px}
#tab-v1 #sms-content .sms-contacts-search{padding:10px 14px}
#tab-v1 #sms-content .sms-contacts-search label{max-width:280px}
#tab-v1 .v1-loading,#tab-v1 .v1-error{padding:24px;font-size:13px}

/* Notifications and audit are working lists, with readable single-row rhythm. */
#tab-notifications .section-toolbar{margin:0 0 10px}
#tab-notifications #notification-list,#tab-audit #audit-list{padding:0;overflow:hidden}
#tab-notifications .message{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;min-height:46px;border-radius:0;font-size:13px}
#tab-notifications .message small{margin:0;font-size:12px;white-space:nowrap}
#tab-audit .table-wrap{max-height:calc(100vh - 184px);overflow:auto}
#tab-audit thead{position:sticky;top:0;z-index:2}
#tab-audit th{background:#f1f5fb}
#tab-audit th:first-child{width:175px}
#tab-audit th:nth-child(2){width:145px}
#tab-audit th:nth-child(3){width:150px}
#tab-audit .audit-detail{line-height:20px;overflow-wrap:anywhere}
#tab-audit .pagination{padding:0;justify-content:flex-end}

/* Account identity and password fields stay in adjacent, proportionate cards. */
#tab-account .security-layout{grid-template-columns:300px minmax(0,1fr);max-width:none;gap:12px;align-items:start}
#tab-account .security-summary{padding:14px}
#tab-account .security-summary .security-symbol{display:none}
#tab-account .security-summary h2{margin:0 0 8px}
#tab-account .account-info{padding:10px 0;gap:12px}
#tab-account .account-form{max-width:none;padding:14px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 12px}
#tab-account .account-form h2{grid-column:1/-1;margin:0}
#tab-account .account-form button{grid-column:1/-1;justify-self:start;margin:0}

@media(max-width:1400px){
 #tab-v1 .interface-summary-grid{grid-template-columns:1fr}
 #tab-data .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 #tab-v1 .v1-toolbar label{flex-basis:200px;min-width:160px}
 #tab-account .security-layout{grid-template-columns:260px minmax(0,1fr)}
 #tab-account .account-form{grid-template-columns:1fr}
}
@media(max-width:1000px){
 #tab-data .mapping-grid,#tab-data .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #tab-v1 .v1-toolbar-actions{margin-left:0}
 #tab-notifications .message{align-items:flex-start;flex-direction:column;gap:4px}
}
@media(max-width:650px){
 #tab-data .mapping-grid,#tab-data .form-grid,#tab-account .security-layout{grid-template-columns:1fr}
 #tab-data .upload-file-label{flex-direction:column;align-items:flex-start;width:100%}
 #tab-v1 .v1-toolbar{flex-direction:row}
 #tab-v1 .v1-toolbar label,#tab-v1 .v1-toolbar .staff-search-field,#tab-v1 .v1-toolbar .staff-department-field{width:100%;flex-basis:100%;min-width:0}
 #tab-properties .pm-stats>div{padding:9px;flex-direction:column;align-items:flex-start;gap:4px}
 #tab-properties .pm-filter label{flex-basis:100%}
 #tab-properties .pm-table{min-width:860px}
}

#tab-v1 .api-section-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
#tab-v1 .api-section-tabs button{background:#fff;border:1px solid #dae4f3;color:#587294;padding:6px 14px}
#tab-v1 .api-section-tabs button.active{background:#edf3ff;border-color:#9dbdff;color:#245edf;font-weight:600}
#tab-v1 [data-api-pane]>.v1-panel>label{padding:12px 14px;width:320px;max-width:100%}
#tab-v1 [data-api-pane] .v1-table-wrap{max-height:calc(100vh - 315px)}
#tab-v1 [data-api-pane] .v1-empty{min-height:56px;padding:18px 14px}
@media(max-width:650px){#tab-data label.upload-file-label{flex-direction:column;align-items:flex-start}}

.customer-source-form{grid-column:1/-1}
@media(min-width:1500px){.origins-enabled #tab-leads #filters{grid-template-columns:repeat(7,minmax(0,1fr)) 54px}.origins-enabled #tab-leads #filters .filter-actions{grid-column:8;grid-row:1/3}}

/* Keep the frequent phone filter beside the desktop query controls. */
@media(min-width:901px){
 #tab-leads #filters label:nth-of-type(n){grid-column:auto}
 #tab-leads #filters label:has(>input[name="phone"]){grid-row:1;grid-column:-3/-2}
}
