:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#18334b;background:#f4f7f8;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}
.topbar{height:72px;background:#fff;border-bottom:1px solid #e4ebef;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1240px)/2));position:sticky;top:0;z-index:2}
.brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:700}.brand b{color:#1c728b}.brand-mark{width:36px;height:36px;border-radius:12px;background:#123954;color:#fff;display:grid;place-items:center}.top-actions{display:flex;align-items:center;gap:16px;color:#6b7e8d;font-size:14px}
.preview-badge{font-size:11px;font-weight:700;letter-spacing:0;background:#e3f3ec;color:#287b56;border:1px solid #acd9c1;border-radius:999px;padding:7px 10px}
.preview-note{background:#e7f3ed;color:#2b7854;text-align:center;font-size:13px;font-weight:650;padding:9px 16px;border-bottom:1px solid #c8e4d2}
main{max-width:1240px;margin:0 auto;padding:38px 24px 80px}.auth-shell{min-height:calc(100vh - 190px);display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:7vw}.auth-intro small,.eyebrow{font-size:12px;letter-spacing:.14em;font-weight:800;color:#24819a}.auth-intro h1{font-size:clamp(36px,4vw,58px);line-height:1.16;letter-spacing:-.04em;margin:22px 0}.auth-intro p,.welcome p,.hint,.card p{color:#718393;line-height:1.65}.auth-card{max-width:430px;width:100%;justify-self:end}.card{background:#fff;border:1px solid #e2e9ed;border-radius:22px;padding:26px;box-shadow:0 12px 36px rgba(20,51,72,.05)}h1,h2{color:#163851}h2{font-size:22px;margin:10px 0 22px}label{display:block;font-size:13px;font-weight:650;color:#435d70;margin:14px 0}input,select{width:100%;height:43px;border:1px solid #d6e0e5;border-radius:10px;background:#fff;color:#18334b;padding:0 12px;margin-top:7px;outline:none}input:focus,select:focus{border-color:#24819a;box-shadow:0 0 0 3px #dceff1}.primary{width:100%;border:0;border-radius:11px;background:#123954;color:#fff;font-weight:700;padding:13px 18px;margin-top:12px}.primary:hover{background:#1b5b76}.quiet{border:1px solid #d6e0e5;border-radius:9px;background:#fff;color:#31586c;padding:8px 13px}.quiet:hover{background:#eff6f7}
.narrow{max-width:460px;margin:9vh auto}.welcome{margin:10px 0 30px}.welcome h1{font-size:34px;margin:10px 0}.welcome p{margin:0}.workspace-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);gap:22px;align-items:start}.stack{display:grid;gap:20px}.section-head{display:flex;justify-content:space-between;align-items:center}.section-head h2{margin-bottom:0}.lead-list{min-height:350px}.rows{margin-top:20px}.lead-row{padding:17px 0;border-top:1px solid #e8eef0;display:grid;grid-template-columns:1fr auto;gap:12px}.lead-row strong{display:block;font-size:16px}.lead-row small{display:block;color:#81919b;margin-top:6px;line-height:1.5}.lead-row .meta{font-size:12px;color:#4b7285;text-align:right}.lead-row button{margin-top:9px}.empty{padding:44px 10px;text-align:center;color:#81919b}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.credential{background:#fff7de;border:1px solid #f0d889;border-radius:10px;padding:13px;margin-top:14px;word-break:break-all;color:#624a16}.files a{display:block;margin-top:12px;color:#146887;text-decoration:none;font-weight:700}.files a:hover{text-decoration:underline}.notice{position:fixed;right:24px;bottom:24px;max-width:400px;padding:13px 18px;border-radius:12px;background:#123954;color:white;box-shadow:0 12px 30px #12395433;z-index:3}
.sales-team-row{grid-template-columns:minmax(0,1fr) auto auto}.team-remove-form{grid-column:1/-1;display:flex;gap:10px;align-items:end}.team-remove-form input{min-width:0}.team-remove-form button{white-space:nowrap}
.content-workspace{margin-top:32px}.content-workspace>.section-head{margin-bottom:16px}textarea{width:100%;border:1px solid #d6e0e5;border-radius:10px;background:#fff;color:#18334b;padding:12px;margin-top:7px;resize:vertical;font:inherit}textarea:focus{outline:none;border-color:#24819a;box-shadow:0 0 0 3px #dceff1}
[hidden]{display:none!important}@media(max-width:880px){.auth-shell,.workspace-grid{grid-template-columns:1fr}.auth-shell{gap:30px;align-content:center}.auth-card{justify-self:start;max-width:500px}}@media(max-width:560px){.topbar{padding:0 18px}main{padding:28px 16px 64px}.auth-intro h1{font-size:35px}.card{padding:20px}.two-col{grid-template-columns:1fr;gap:0}.workspace-grid{gap:16px}}
.work-layout{display:grid;grid-template-columns:214px minmax(0,1fr);gap:26px;align-items:start;scroll-margin-top:94px}
.module-sidebar{position:sticky;top:96px;background:#fff;border:1px solid #e2e9ed;border-radius:20px;padding:15px;box-shadow:0 10px 30px rgba(20,51,72,.04)}
.sidebar-caption{font-size:12px;font-weight:800;letter-spacing:.12em;color:#8395a1;padding:12px 13px 10px}
.module-nav{display:grid;gap:5px}.module-link{width:100%;border:0;border-radius:11px;background:transparent;color:#496476;text-align:left;font-weight:700;padding:13px 14px}
.module-link:hover{background:#edf4f5;color:#163851}.module-link.active{background:#123954;color:white;box-shadow:0 7px 18px rgba(18,57,84,.16)}
.sidebar-foot{border-top:1px solid #e9eff1;color:#98a7af;font-size:12px;margin:17px 8px 4px;padding:17px 5px 3px}
.module-main{min-width:0}.module-heading{padding:3px 2px 21px}.module-heading h2{font-size:28px;letter-spacing:-.025em;margin:8px 0}.module-heading p{color:#718393;line-height:1.55;margin:0}
.module-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(310px,.85fr);gap:20px;align-items:start}.module-grid.single{grid-template-columns:minmax(0,1fr)}
.module-column{display:grid;gap:20px;min-width:0}.module-column>.card{min-width:0}.module-view .content-workspace{margin-top:0}
.module-view .content-workspace>.section-head{display:none}.module-view .content-workspace .workspace-grid{grid-template-columns:minmax(0,1.1fr) minmax(310px,.85fr)}
.welcome{margin:4px 0 25px}.welcome h1{font-size:30px;margin:8px 0}.welcome p{font-size:14px}
@media(max-width:1050px){.work-layout{grid-template-columns:minmax(0,1fr);gap:18px}.module-sidebar{position:static;padding:10px}.sidebar-caption,.sidebar-foot{display:none}.module-nav{display:flex;overflow-x:auto;gap:7px}.module-link{width:auto;white-space:nowrap;padding:11px 15px}.module-grid,.module-view .content-workspace .workspace-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:560px){.work-layout{gap:13px}.module-heading h2{font-size:25px}.module-heading{padding-bottom:15px}.module-link{font-size:13px}.module-sidebar{border-radius:15px}.module-grid,.module-column{gap:14px}}
.home-intro{margin:3px 0 19px}.home-intro h3{font-size:17px;color:#163851;margin:0 0 5px}.home-intro p{margin:0;color:#718393;font-size:14px}
.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.home-grid:has(>.home-card:only-child){grid-template-columns:minmax(0,1fr);max-width:620px}.home-card{background:#fff;border:1px solid #e2e9ed;border-radius:19px;padding:23px;box-shadow:0 10px 27px rgba(20,51,72,.04);min-width:0}.home-card h3{font-size:20px;margin:12px 0 8px;color:#163851}.home-card p{font-size:13px;color:#718393;line-height:1.55;min-height:42px;margin:0 0 18px}.home-actions{display:flex;flex-wrap:wrap;gap:8px}.home-actions .quiet{font-size:13px;font-weight:650}
.home-status{color:#16617c;background:#edf6f7;border-radius:9px;padding:9px 11px;font-size:12px;font-weight:700;margin:0 0 17px;line-height:1.5}
.list-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,180px);gap:12px;align-items:end;margin-top:15px}.list-filters label{margin:0}.list-filters input,.list-filters select{margin-top:6px}.list-filters+.rows{margin-top:15px}
.load-more{display:block;width:100%;margin-top:15px;padding:11px}.load-more:disabled{opacity:.55;cursor:wait}
.commission-review-actions{gap:15px;align-items:end}.commission-review-actions label{flex:1;max-width:240px}.commission-review-actions button{margin-bottom:14px}.review-meta{display:grid;gap:5px;border-top:1px solid #e8eef0;padding-top:18px;margin-top:10px}.review-meta small{color:#718393;word-break:break-all;line-height:1.5}.review-overview{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.review-overview>div{background:#edf6f7;color:#16617c;border-radius:10px;padding:12px 14px;font-size:14px;font-weight:750}.review-stores{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.review-store{display:grid;gap:6px;border:1px solid #e2e9ed;border-radius:11px;padding:13px}.review-store span{font-weight:700;color:#163851}.review-store small,.review-blocked small{color:#718393;line-height:1.5}.review-blocked{display:grid;gap:5px;padding:12px 0;border-top:1px solid #e8eef0;word-break:break-word}.review-blocked strong{font-size:13px}.commission-review-actions+h3,#commission-review-results h3{font-size:17px;margin:22px 0 8px}
.rule-rate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:16px 0}.rule-rate-grid label{display:grid;gap:5px}.rule-revision-row{display:grid;gap:8px;padding:16px 0;border-top:1px solid #e8eef0}.rule-revision-row small{color:#718393}.rule-revision-row form{display:grid;gap:10px}
@media(max-width:560px){.list-filters{grid-template-columns:1fr 140px;gap:8px}.list-filters label{font-size:12px}}
@media(max-width:660px){.home-grid{grid-template-columns:1fr}.home-card{padding:20px}.home-card p{min-height:0}}
.recent-export{border-top:1px solid #e8eef0;padding:15px 0;display:grid;gap:5px}.recent-export strong{color:#163851}.recent-export small{color:#718393;line-height:1.6;overflow-wrap:anywhere}.recent-export .files{display:flex;flex-wrap:wrap;gap:6px 18px}.recent-export .files a{margin-top:3px}
#attendance-summary{overflow-wrap:anywhere;line-height:1.6;margin:14px 0}
.dynamic-rows{display:grid;gap:12px;margin:12px 0}.dynamic-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:end;padding:12px;border:1px solid #e2e9ed;border-radius:11px}.dynamic-row button{margin-bottom:2px}.receipt-project{grid-template-columns:1fr}.money-subrow{margin-left:18px}.money-share-row{margin-left:36px}.money-subrow strong,.money-share-row strong{font-size:14px}@media(max-width:700px){.dynamic-row{grid-template-columns:1fr 1fr}.dynamic-row button{justify-self:start}.receipt-project{grid-template-columns:1fr}.money-subrow{margin-left:10px}.money-share-row{margin-left:20px}}
.receipt-project>.section-head{margin-top:4px}.share-rows{display:grid;gap:8px}.share-input-row{display:grid;grid-template-columns:1.2fr 1fr auto;gap:10px;align-items:end;padding:10px;background:#f4f8f9;border-radius:9px}.share-input-row button{margin-bottom:2px}@media(max-width:700px){.share-input-row{grid-template-columns:1fr 1fr}.share-input-row button{grid-column:1/-1}}
.customer-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.customer-tag{display:inline-flex;align-items:center;min-height:23px;padding:2px 9px;border-radius:999px;background:#eaf1f5;color:#365b6d;font-size:12px;font-weight:700;line-height:1.3}.customer-tag.positive{background:#e4f3e9;color:#287247}.customer-tag.negative{background:#fff0ec;color:#a94737}.customer-tag.validity{background:#edf3e8;color:#596f32}.customer-tag.stage{background:#e5f1f5;color:#176b84}
.module-view>#customer-register-card{margin-top:20px;min-width:0}.register-scroll{max-width:100%;overflow-x:auto;border:1px solid #e1e9ed;border-radius:12px}.customer-register-table{border-collapse:collapse;width:100%;min-width:1460px;font-size:13px}.customer-register-table th{background:#f3f8f9;color:#3a596b;text-align:left;font-weight:750;white-space:nowrap}.customer-register-table th,.customer-register-table td{padding:12px 11px;border-bottom:1px solid #e8eef0;vertical-align:top}.customer-register-table tbody tr:last-child td{border-bottom:0}.customer-register-table td{color:#284657}.customer-register-table td:nth-child(3) .customer-tags{margin:0}.customer-register-table td:nth-child(4){font-weight:700}.customer-register-table td:nth-child(11){min-width:270px;width:310px}.customer-register-table td.empty{text-align:center;padding:32px}.register-followup{white-space:pre-wrap;overflow-wrap:anywhere}.register-followup small{display:block;color:#8295a1;margin-top:6px}.register-followup button{margin:8px 6px 0 0;padding:5px 9px;font-size:12px}.register-history{margin-top:18px;padding:18px;border:1px solid #e1e9ed;border-radius:12px;background:#f8fbfb}.register-history .section-head h3{margin:0;color:#163851;font-size:17px}.register-history-item{padding:13px 0;border-top:1px solid #e1e9ed}.register-history-item:first-of-type{margin-top:13px}.register-history-item strong{font-size:13px;color:#266780}.register-history-item p{margin:6px 0 0;white-space:pre-wrap;color:#40596a}
.register-toolbar{display:grid;grid-template-columns:minmax(170px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end;margin:14px 0}.register-toolbar label{margin:0}.register-toolbar button{height:43px}.register-filter-trigger{margin-left:4px;border:1px solid #c8d8df;background:#fff;border-radius:6px;color:#547488;font-size:14px;line-height:1;padding:3px 5px;vertical-align:middle}.register-filter-trigger:hover,.register-filter-trigger.active{background:#d9edf3;border-color:#4f9cb4;color:#11617a}.register-column-panel{position:fixed;z-index:9;width:min(300px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;background:#fff;border:1px solid #c9dce3;border-radius:12px;box-shadow:0 18px 42px #12395433;padding:16px}.register-column-panel>strong{display:block;color:#163851;font-size:15px;margin-bottom:8px}.register-column-panel label{margin:10px 0}.register-column-panel input,.register-column-panel select{margin-top:5px}.register-panel-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.register-panel-actions button{flex:1;white-space:nowrap;font-size:12px;padding:8px 6px}.register-panel-actions .primary{width:auto;margin:0}@media(max-width:700px){.register-toolbar{grid-template-columns:1fr 1fr}.register-toolbar button{grid-column:1/-1}.register-toolbar label{font-size:12px}}@media(max-width:480px){.register-toolbar{grid-template-columns:1fr}}
.register-followup .register-tag-select{max-width:145px;height:34px;margin-top:9px;padding:0 8px;font-size:12px}.customer-register-table td:nth-child(6) small{display:block;margin-top:6px;color:#547488;overflow-wrap:anywhere}.customer-register-table td:nth-child(6) button{margin-top:7px;padding:5px 8px;font-size:12px}
.register-mobile-actions{display:none}@media(max-width:700px){.customer-register-table{min-width:1460px}.customer-register-table td:first-child{min-width:210px}.register-mobile-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:7px}.register-mobile-actions strong{flex-basis:100%;color:#163851}.register-mobile-actions .register-tag-select{max-width:100%;height:34px;padding:0 7px;font-size:12px}.register-mobile-actions button{padding:5px 8px;font-size:12px}}
.sales-only #module-deals .module-grid{grid-template-columns:minmax(0,1fr)}.performance-filters{display:flex;gap:14px;flex-wrap:wrap}.performance-filters label{flex:1;min-width:185px;max-width:300px}.performance-scroll{max-width:100%;border:1px solid #e1e9ed;border-radius:12px}.performance-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}.performance-table th,.performance-table td{padding:11px 5px;text-align:left;border-bottom:1px solid #e8eef0;overflow-wrap:anywhere;vertical-align:top}.performance-table th{color:#3a596b;background:#f3f8f9;line-height:1.35}.performance-table td{color:#284657;line-height:1.4}.performance-table th:first-child,.performance-table td:first-child{width:12%;font-weight:700}.performance-table th:nth-child(9),.performance-table td:nth-child(9){width:13%}.performance-table th:last-child,.performance-table td:last-child{width:12%}.performance-table td small{display:block;color:#8295a1;font-weight:400;margin-top:5px}.performance-table tr:last-child td{border-bottom:0}.performance-total td{background:#edf6f7;font-weight:750}
.performance-help{margin:2px 0 16px;color:#718393;font-size:13px}.performance-help summary{cursor:pointer;color:#31586c;font-weight:650}.performance-help p{margin:9px 0 0}
@media(max-width:760px){.performance-table,.performance-table tbody{display:block}.performance-table thead{display:none}.performance-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid #e8eef0}.performance-table tbody tr:last-child{border-bottom:0}.performance-table td,.performance-table td:first-child,.performance-table td:nth-child(9),.performance-table td:last-child{display:block;width:auto;border-bottom:1px solid #edf1f3;padding:10px 12px;font-size:14px}.performance-table td:first-child{grid-column:1/-1;background:#f3f8f9}.performance-table td::before{content:attr(data-label);display:block;color:#718393;font-size:11px;font-weight:700;margin-bottom:4px}.performance-table td small{font-size:11px}.performance-total td:first-child{background:#dceff1}}
.promotion-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin:20px 0}.promotion-metric{background:#eff6f8;border:1px solid #dbe9ee;border-radius:12px;padding:14px}.promotion-metric small{display:block;color:#607b89;margin-bottom:8px}.promotion-metric strong{font-size:21px;color:#153b50;overflow-wrap:anywhere}.promotion-metrics+.rows{margin-top:10px}#promotion-overview-results .row{border-top:1px solid #e4ecef;padding:12px 0;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}#promotion-overview-results .row strong{color:#173e53}
.promotion-summary-table{width:100%;border-collapse:collapse;min-width:650px;margin:8px 0 22px}.promotion-summary-table th,.promotion-summary-table td{padding:10px 12px;border-bottom:1px solid #e4ecef;text-align:left;white-space:nowrap}.promotion-summary-table th{background:#eff6f8;color:#35596b}.promotion-summary-table tbody tr:hover{background:#f7fafb}
.daily-report-preview{white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f8f9;border:1px solid #dce8ed;border-radius:12px;padding:18px;color:#25485c;font:inherit;line-height:1.7;min-height:220px}.daily-report-preview+button:disabled{opacity:.55;cursor:not-allowed}
.daily-report-metrics{border:1px solid #dbe9ee;background:#f5fafb;border-radius:12px;padding:15px;margin:16px 0}.daily-report-metrics h3{margin:0;color:#183f54}.daily-report-metrics #personal-daily-metrics-content{white-space:pre-wrap;line-height:1.7;color:#36596b;font-size:14px;margin-top:10px}
.lead-list.task-only{min-height:0}.lead-list.task-only .empty{padding:8px 10px}.lead-list-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.lead-list.task-only .rows{margin-top:10px}
.content-overdue{color:#a14838!important;font-weight:700}

.nav-pending{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:12px;background:#fff0cb;color:#7c4700;font-size:12px;font-weight:700}.lead-row.pending-accept{border-left:4px solid #d79022;background:#fff9eb;padding-left:14px}.pending-accept-label{display:block;color:#855000;font-weight:700;margin-bottom:7px}

/* Closed customers keep rows compact; details live outside the table. */
#order-list-card .register-scroll{max-height:65vh;overflow:auto}
.closed-orders-table th{position:sticky;top:0;z-index:1}
.closed-orders-table td{vertical-align:middle!important;white-space:nowrap}
.closed-orders-table td:nth-child(4){min-width:240px;width:240px}
.closed-orders-table td:nth-child(11){min-width:110px;width:auto}
.closed-orders-table .register-followup{display:flex;gap:6px;margin-top:6px}
.closed-orders-table .register-followup button{margin:0;white-space:nowrap;font-size:12px;padding:5px 10px}
.closed-orders-table.compact{min-width:1060px;font-size:13px}
.closed-orders-table.compact :is(th,td):is(:nth-child(1),:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6),:nth-child(7),:nth-child(8),:nth-child(9),:nth-child(10),:nth-child(13)){display:none}
.closed-orders-table.compact :is(th,td):nth-child(4){position:sticky;left:0;background:#fff;z-index:1}
.closed-orders-table.compact th:nth-child(4){background:#f3f8f9;z-index:2}
.order-history-dialog{width:min(820px,calc(100vw - 40px));max-height:80vh;overflow:auto;border:1px solid #d5e2e8;border-radius:18px;padding:24px;color:#163851}
.order-history-dialog::backdrop{background:#16385166}
.order-history-entry{padding:14px 0;border-top:1px solid #e1e9ed;line-height:1.7;font-size:14px}

.closed-orders-table.compact td.order-empty{display:table-cell!important;position:static;white-space:normal}

.closed-orders-table td:nth-child(4){min-width:330px;width:330px}
.closed-orders-table td:nth-child(4) .register-followup{display:inline-flex;vertical-align:middle;margin:0 0 0 12px}

/* Match column widths to their content in the compact sales register. */
.closed-orders-table.compact{width:max-content;min-width:100%;table-layout:auto}
.closed-orders-table.compact th,.closed-orders-table.compact td{padding:10px 12px}
.closed-orders-table.compact th:nth-child(4),.closed-orders-table.compact td:nth-child(4){min-width:0;width:auto;padding-right:22px}
.closed-orders-table.compact td:nth-child(4) .register-followup{margin-left:10px;gap:6px}
.closed-orders-table.compact th:nth-child(11),.closed-orders-table.compact td:nth-child(11){min-width:0;width:auto}

#customer-register-card.operations-register .customer-register-table :is(th,td):nth-child(6){display:none}

.dispatch-reminders{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0;padding:14px;background:#f4f8fa;border-radius:12px}.dispatch-reminders[hidden]{display:none}.dispatch-reminders button{margin:0}.dispatch-reminders strong{margin-left:6px}.dispatch-reminders .has-reminder{background:#fff2d2;border-color:#ebce87;color:#8a5600}.dispatch-reminders small{flex-basis:100%;color:#7a8f9e}

#promotion-overview-card .performance-filters{gap:16px;margin:14px 0}
#promotion-overview-card .performance-filters label{margin:0}
.promotion-breakdown{margin-top:16px;border:1px solid #e0e9ee;border-radius:12px;padding:14px}
.promotion-breakdown>summary{cursor:pointer;font-weight:700;color:#305c72}
.promotion-breakdown .table-scroll,.promotion-breakdown .rows{margin-top:14px}
#promotion-spend-form{max-width:760px;margin:0 auto;width:100%}

#content-rows .lead-row{padding:16px 0;gap:20px}#content-rows .lead-row>div:first-child{min-width:0;flex:1}#content-rows .lead-row small{line-height:1.6}#content-rows .lead-row .meta{min-width:180px}#content-rows .content-promotion-summary{padding:10px;background:#edf6f8;border-radius:8px;color:#27647b;margin:10px 0}#content-rows a{display:inline-block;font-size:13px;margin:6px 0}#content-promotion-form{margin:0}#content-promotion-form .two-col{gap:12px}#content-promotion-form label{font-size:13px}

.content-brief{margin:8px 0;color:#577486;font-size:13px}.content-brief summary{cursor:pointer}.content-brief p{white-space:pre-wrap;line-height:1.7;margin:8px 0}

.shooting-input-row{display:grid;grid-template-columns:minmax(210px,2fr) minmax(100px,1fr);gap:12px;margin:12px 0;padding:16px;border:1px solid #dce7ed;border-radius:12px;background:#f7fafb}.shooting-input-row label{margin:0}.shooting-input-row>button{justify-self:start}.shooting-input-row label[hidden]{display:none}@media(max-width:560px){.shooting-input-row{grid-template-columns:1fr}}

.attendance-late,.personnel-due.urgent{background:#fff4ed;border-left:3px solid #df8759;padding:12px!important;border-radius:8px}.attendance-late-badge{display:inline-block;font-size:12px;color:#ad4a2d;background:#ffe4d7;padding:4px 8px;border-radius:20px}.personnel-due{gap:16px}.personnel-due>div{flex:1}.personnel-due.urgent small{color:#ad4a2d}#personnel-reminder-summary{margin:16px 0}

.leader-view-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:14px 0}.leader-view-toolbar label{margin:0;min-width:180px}.leader-view-toolbar button{margin:0;height:43px}.leader-compact-scroll{max-height:60vh;overflow:auto;margin-top:18px;border:1px solid #e1e9ed;border-radius:12px}.leader-compact-table{width:100%;font-size:13px;border-collapse:collapse}.leader-compact-table th{position:sticky;top:0;background:#eef6f8;white-space:nowrap}.leader-compact-table th,.leader-compact-table td{padding:11px 14px;text-align:right;white-space:nowrap}.leader-compact-table th:first-child,.leader-compact-table td:first-child{text-align:left}.leader-compact-table tbody tr:hover{background:#f3f9fb}.leader-compact-table .performance-total{background:#edf6f8;font-weight:700}

#account-list-card table{min-width:680px;width:100%}#account-list-card td,#account-list-card th{padding:12px;white-space:nowrap}#account-list-card td button{margin:0 6px 0 0;padding:6px 10px;font-size:12px}#account-action-body .card{border:0;padding:0;box-shadow:none}

#leader-access-form .two-col{gap:14px}#leader-access-form .two-col label{margin:0}#leader-access-form h3{margin-top:24px}#leader-access-current{padding:10px 12px;background:#edf6f8;border-radius:8px}

.import-action-panel{background:#eef7fa;border:1px solid #d4e5ec;border-radius:16px;padding:18px;margin:12px 0 20px}.import-action-panel .primary{width:100%;margin:8px 0}.import-action-panel p{margin:8px 0}
/* Customer review uses the existing scoped register and retains source history. */
.review-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:16px 0}
.review-toolbar label{flex:1;min-width:180px}
.review-dialog{width:min(620px,calc(100% - 32px));border:1px solid #d7e2e8;border-radius:18px;padding:24px;color:#173852}
.review-dialog::backdrop{background:rgba(15,40,55,.35)}
.review-dialog textarea{min-height:100px}

/* Desktop workspace: use the screen for registers; keep mobile and login layouts. */
@media(min-width:1051px){
  main:has(#work-view:not([hidden])){max-width:1880px;padding:24px 24px 48px}
  body:has(#work-view:not([hidden])) .topbar{padding-inline:max(24px,calc((100vw - 1832px)/2))}
  .work-layout{grid-template-columns:192px minmax(0,1fr);gap:20px}
  .module-sidebar{padding:12px;max-height:calc(100vh - 112px);overflow-y:auto}
  .module-link{padding:10px 12px;font-size:14px}
  .module-heading{padding-bottom:16px}
  .module-heading h2{font-size:26px}
  #customer-register-card,#order-list-card{padding:20px;border-radius:16px}
  #customer-register-card .section-head h2,#order-list-card .section-head h2{margin:5px 0 10px}
  #customer-register-card .review-toolbar{margin:10px 0;gap:10px}
  #customer-register-card .review-toolbar label{margin:0;max-width:280px}
  #customer-register-card .register-toolbar{margin:10px 0;grid-template-columns:minmax(160px,220px) minmax(240px,1fr) auto}
  #customer-register-card>label{max-width:280px;margin:10px 0}
  #customer-register-card>.hint,#order-list-card>.hint{margin:8px 0;font-size:13px}
  #customer-register-card .register-scroll{max-height:calc(100vh - 340px);min-height:240px;overflow:auto;scrollbar-gutter:stable}
  #customer-register-card .customer-register-table th{position:sticky;top:0;z-index:1}
  #customer-register-card .customer-register-table :is(th,td):nth-child(4){position:sticky;left:0;background:#fff;z-index:2;min-width:100px;box-shadow:2px 0 0 #e1e9ed}
  #customer-register-card .customer-register-table th:nth-child(4){background:#f3f8f9;z-index:3}
  #customer-register-card .customer-register-table :is(th,td){padding:9px 10px;line-height:1.45}
  #customer-register-card .register-followup{white-space:normal}
  #customer-register-card .register-followup>div:first-child{white-space:pre-wrap}
  #customer-register-card .register-followup .register-tag-select{display:inline-block;max-width:110px;margin:6px 4px 0 0}
  #customer-register-card .register-followup button{padding:5px 7px;margin:6px 4px 0 0}
  #customer-register-card .customer-register-table tbody tr:hover td{background:#f3f9fb}
  #module-closed-customers .module-grid{grid-template-columns:minmax(0,1fr)}
  #order-list-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}
  #order-list-card>label{margin:0}
  #order-list-card>label:has(:is(#order-search,#order-display-mode,#order-share-status)){grid-row:3}
  #order-list-card>#order-sales-field{grid-column:1/-1;grid-row:2;max-width:280px}
  #order-list-card>:not(label){grid-column:1/-1}
  #order-list-card>.section-head{grid-row:1}
  #order-list-card>#clear-order-filters{justify-self:start;grid-row:4}
  #order-list-card>#order-filter-summary{grid-row:5}
  #order-list-card>#order-review-reminder{grid-row:6}
  #order-list-card>#order-rows{grid-row:7}
  #order-list-card .rows{margin-top:4px}
  #order-list-card .register-scroll{max-height:calc(100vh - 330px);min-height:200px;scrollbar-gutter:stable}
  #module-closed-customers #receipt-form{scroll-margin-top:88px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 20px;border-radius:16px;padding:20px}
  #module-closed-customers #receipt-form>*{margin-block:4px}
  #module-closed-customers #receipt-form>:is(h2,.eyebrow,.hint,p,details,.dynamic-rows,button){grid-column:1/-1}
  #module-closed-customers #receipt-allocation-rows{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
}

/* Account actions stay visible on desktop, including 1366px notebooks. */
@media(min-width:1051px){
  #module-accounts .module-grid{grid-template-columns:minmax(760px,1.7fr) minmax(320px,.8fr)}
  #account-list-card table{min-width:0;table-layout:fixed}
  #account-list-card :is(th,td){padding:10px 8px;white-space:normal;overflow-wrap:anywhere}
  #account-list-card th:nth-child(1){width:18%}
  #account-list-card th:nth-child(2){width:22%}
  #account-list-card th:nth-child(3){width:14%}
  #account-list-card th:nth-child(4){width:18%}
  #account-list-card th:nth-child(5){width:28%}
  #account-list-card td button{display:inline-block;white-space:nowrap;margin:3px 5px 3px 0;padding:6px 8px}
}
@media(min-width:1051px) and (max-width:1599px){
  #module-accounts .module-grid{grid-template-columns:minmax(0,1fr)}
  #module-accounts #account-form{width:100%;max-width:760px}
}

/* Content task lists use the full desktop width while the form column is empty. */
@media(min-width:1051px){
  .module-view .content-workspace>.workspace-grid:not(:has(>.stack:nth-child(2)>.card:not([hidden]))){grid-template-columns:minmax(0,1fr)}
  .module-view .content-workspace>.workspace-grid:not(:has(>.stack:nth-child(2)>.card:not([hidden])))>.stack:nth-child(2){display:none}
}

/* Native disclosure preserves goal forms and makes publication an explicit step. */
.goals-disclosure>summary{cursor:pointer;color:#163851;scroll-margin-top:88px}
.goals-disclosure>summary h2{display:inline;margin:0 12px 0 0;font-size:20px}
.goals-disclosure>summary .eyebrow{display:block;margin:0 0 8px 18px}
.goals-toggle-hint{font-size:13px;color:#607b89}
.goals-disclosure>summary:focus-visible{outline:3px solid #24819a;outline-offset:6px;border-radius:4px}
.goals-disclosure[open]>summary{margin-bottom:16px}

/* Register view changes only column visibility; row data and actions remain intact. */
#customer-register-card .customer-register-table.register-compact{min-width:760px;table-layout:fixed}
#customer-register-card .register-compact :is(th,td):is(:nth-child(5),:nth-child(6),:nth-child(7),:nth-child(9),:nth-child(10)){display:none}
#customer-register-card .register-compact :is(th,td):nth-child(1){width:10%;min-width:0}
#customer-register-card .register-compact :is(th,td):nth-child(2){width:12%}
#customer-register-card .register-compact :is(th,td):nth-child(3){width:18%;overflow-wrap:anywhere}
#customer-register-card .register-compact :is(th,td):nth-child(4){width:16%;overflow-wrap:anywhere}
#customer-register-card .register-compact :is(th,td):nth-child(8){width:12%}
#customer-register-card .register-compact :is(th,td):nth-child(11){width:32%;min-width:0}
#customer-register-card .register-compact td.empty{display:table-cell}
@media(min-width:1051px){
 #customer-register-card .register-toolbar{grid-template-columns:minmax(160px,200px) minmax(220px,1fr) 180px auto}
}

.form-guidance{background:#f5f9fa;border:1px solid #e1e9ed;border-radius:10px;padding:9px 12px;margin:10px 0;font-size:13px;color:#435d70}
.form-guidance>summary{cursor:pointer;font-weight:650}
.form-guidance>summary:focus-visible{outline:3px solid #24819a;outline-offset:3px}
.form-guidance .hint{margin:8px 0;line-height:1.5}
@media(min-width:1051px){
 #receipt-form,#personnel-form,#personnel-card{scroll-margin-top:88px}
 #personnel-form label{margin:9px 0}
 #personnel-form h2{margin-bottom:14px}
 #receipt-form .hint{margin:6px 0;line-height:1.45;font-size:13px}
}

#quick-follow-up-dialog{max-height:calc(100dvh - 48px);overflow:auto}
#quick-follow-up-dialog form{margin:0}

#customer-edit-dialog{width:min(720px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto}#customer-edit-dialog form{margin:0}#customer-edit-dialog details{margin-top:18px}#customer-edit-dialog label{margin:10px 0}#customer-edit-dialog textarea{min-height:70px}#customer-source-requests{margin:14px 0;padding:12px;background:#f2f8fa;border-radius:12px}#customer-source-request-rows .register-history-item{padding:12px;border-bottom:1px solid #dbe6eb}
@media(min-width:900px){#customer-register-rows td:last-child{position:sticky;right:0;background:white;z-index:1;min-width:240px;max-width:340px}#customer-register-rows td:last-child button{margin:6px 6px 0 0}}

@media(min-width:900px){#customer-register-card thead th:last-child{right:0;z-index:4}}
#customer-edit-followup .two-col label{display:flex;align-items:center;gap:8px}#customer-edit-followup input[type="checkbox"]{display:inline-block;width:16px;height:16px;padding:0;margin:0;flex:0 0 16px}
/* Receipt entry uses a focused modal; financial fields and allocation rules are unchanged. */
.receipt-dialog{width:min(760px,calc(100vw - 32px));max-height:90vh;padding:0;border:1px solid #d7e3e9;border-radius:16px;overflow:auto;color:#173951}
.receipt-dialog::backdrop{background:rgba(15,35,50,.35)}
.receipt-dialog #receipt-form{margin:0;padding:24px;border:0;box-shadow:none;display:block}
.receipt-dialog #receipt-form[hidden]{display:none}
.receipt-dialog #receipt-form h2{margin:4px 0 12px}
.receipt-dialog #receipt-order-name{font-size:18px;font-weight:700;margin:8px 0}
.receipt-dialog #receipt-sales-name{font-size:13px;margin:6px 0}
.receipt-dialog #receipt-balance-summary{padding:12px;background:#eef6f8;border-radius:8px;font-weight:600;color:#173951}
.receipt-dialog .register-panel-actions{display:flex;gap:8px;margin:10px 0}
.receipt-dialog .register-panel-actions button{flex:0 0 auto;width:auto;padding:8px 12px}
.receipt-dialog .receipt-project{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;padding:12px}
.receipt-dialog .receipt-project>p,.receipt-dialog .receipt-project>.section-head,.receipt-dialog .receipt-project>.share-rows{grid-column:1/-1;margin:0}
.receipt-dialog .receipt-project.single-project>p{display:none}
.receipt-dialog .receipt-project>button{width:auto;padding:10px}
.receipt-dialog .receipt-footer{display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:-24px;background:white;padding:12px 0;margin-top:10px}
.receipt-dialog .receipt-footer button{width:auto;min-width:100px;margin:0}
.receipt-dialog #receipt-total{font-weight:600;color:#173951;margin:12px 0}
.closed-orders-table.compact{width:100%;min-width:0;table-layout:auto}
.closed-orders-table.compact :is(th,td):is(:nth-child(11),:nth-child(12)){display:none}
.closed-orders-table.compact :is(th,td){white-space:normal;padding:10px 8px}
.closed-orders-table .order-actions-cell{position:sticky;right:0;background:white;min-width:170px;z-index:1}
.closed-orders-table th:last-child{position:sticky;right:0;background:#f3f8f9;z-index:2}
.closed-orders-table .order-actions-cell .register-followup{margin:0;display:flex;flex-wrap:wrap}
.closed-orders-table .order-review-badge{display:block;font-size:11px;color:#885600;background:#fff2d7;border-radius:5px;padding:2px 5px;width:max-content}
@media(max-width:700px){.receipt-dialog #receipt-form{padding:16px}.receipt-dialog .receipt-project{grid-template-columns:1fr}.receipt-dialog .receipt-project>button{justify-self:start}.closed-orders-table.compact{min-width:800px}}
/* Compact operator intake: five groups, remaining customer details are filled by sales. */
#create-lead-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;align-content:start}
#create-lead-form>:is(.eyebrow,h2,p,button,datalist),#create-lead-form>.lead-intake-wide{grid-column:1/-1}
#create-lead-form h2{margin:2px 0 10px}
#create-lead-form label{margin:3px 0}
#create-lead-form .hint{font-size:12px;line-height:1.45;margin:4px 0}
#create-lead-form .primary{margin-top:6px}
#create-lead-form.pending-contact>.intake-contact-type{grid-column:1/-1}
@media(max-width:560px){#create-lead-form{grid-template-columns:1fr}#create-lead-form>label{grid-column:1/-1}}

#lead-rows{max-height:560px;overflow:auto;scrollbar-gutter:stable}
#lead-rows .lead-row{padding:12px 10px;gap:10px;border-left:3px solid transparent;background:white}
#lead-rows .lead-row.pending-accept{border-left-color:#d79022;background:#fffcf4}
#lead-rows .lead-row>div:first-child{min-width:0}
#lead-rows .lead-row strong{font-size:14px}
#lead-rows .lead-row small{font-size:12px;overflow-wrap:anywhere;margin-top:4px}
#lead-rows .lead-row .meta>span:first-child{display:inline-block;border-radius:5px;padding:3px 7px;background:#edf4f6;font-weight:600}
#lead-rows .lead-row .meta{min-width:100px}
#lead-rows .lead-row button{font-size:12px;padding:6px 9px;margin-top:6px}
.lead-row-details{font-size:11px;color:#718393;margin-top:6px}
.lead-row-details summary{cursor:pointer}

/* Operations drill-down only; no customer editing controls. */
.operations-count-link{border:0;background:none;box-shadow:none;color:#17677e;text-decoration:underline;text-underline-offset:3px;padding:2px 4px;font:inherit;font-weight:650;cursor:pointer;width:auto}
#operations-resource-dialog{width:min(1180px,calc(100% - 32px));max-height:85dvh;overflow:auto}
#operations-resource-dialog .table-scroll{max-height:58dvh;overflow:auto}
.operations-detail-table{min-width:900px;width:100%;font-size:12px;table-layout:fixed}
.operations-detail-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.operations-detail-table th:last-child{width:26%}
.operations-detail-table thead{position:sticky;top:0;background:#f3f8f9}

/* Exact-contact lookup, scoped to the read-only duplicate dialog. */
.contact-lookup-dialog {width:min(820px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:1px solid #d5e2e8;border-radius:16px;padding:24px;color:var(--ink);}
.contact-lookup-dialog::backdrop {background:rgb(20 52 70 / 35%);}
.contact-lookup-dialog .duplicate-result {border-top:1px solid #d5e2e8;padding:14px 0;overflow-wrap:anywhere;}
.contact-lookup-dialog .duplicate-result h4 {margin:0 0 8px;}
.contact-lookup-dialog .duplicate-result button {margin-right:8px;}

/* Register: one compact customer row with a dedicated, fixed action column. */
@media(min-width:701px){
 #customer-register-card .customer-register-table tbody td{vertical-align:middle;padding:9px 10px;white-space:nowrap;}
 #customer-register-card .customer-register-table td:nth-child(3){white-space:nowrap;}
 #customer-register-card .customer-register-table td:nth-child(3)>:is(div,button){display:inline-flex;vertical-align:middle;margin:0 5px 0 0;}
 #customer-register-card .customer-register-table .register-review-flag{padding:3px 6px;font-size:11px;}
 #customer-register-card .customer-register-table .register-followup{max-width:300px;overflow:hidden;text-overflow:ellipsis;}
 #customer-register-card .register-followup>div{display:inline;white-space:nowrap;}
 #customer-register-card .register-followup>small{display:none;}
 #customer-register-card .customer-register-table :is(th,td):nth-child(12){position:sticky;right:0;background:white;z-index:3;width:100px;min-width:100px;max-width:100px;text-align:center;}
 #customer-register-card .customer-register-table th:nth-child(12){top:0;background:#f3f8f9;z-index:4;}
 #customer-register-card .customer-register-table td:last-child button{margin:0;padding:5px 10px;white-space:nowrap;}
 #customer-register-card .register-compact :is(th,td):nth-child(3){width:16%;}
 #customer-register-card .register-compact :is(th,td):nth-child(11){width:24%;}
 #customer-register-card .register-compact :is(th,td):nth-child(12){width:100px;}
}
.register-import-info{width:min(680px,calc(100vw - 32px));max-height:80dvh;overflow:auto;}
#customer-edit-dialog{width:min(880px,calc(100vw - 32px));padding:0;}
#customer-edit-dialog>.section-head{position:sticky;top:0;background:#fff;z-index:4;padding:16px 22px;border-bottom:1px solid #e1e9ed;margin:0;}
#customer-edit-dialog>.section-head h2{font-size:20px;margin:0;}
#customer-edit-dialog .customer-edit-main{padding:8px 22px;}
#customer-edit-dialog .customer-edit-visit{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:16px;background:#f3f8fa;border-radius:10px;padding:4px 12px;margin-top:10px;}
#customer-edit-dialog .customer-edit-check{display:flex;align-items:center;gap:8px;}
#customer-edit-dialog .customer-edit-check input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:0;}
#customer-edit-dialog textarea{min-height:62px;}
#customer-edit-dialog .customer-edit-footer{position:sticky;bottom:0;z-index:3;display:flex;justify-content:flex-end;gap:12px;background:white;border-top:1px solid #e1e9ed;padding:12px 22px;}
#customer-edit-dialog .customer-edit-footer button{width:auto;min-width:140px;margin:0;}
#customer-edit-dialog>details{margin:0;padding:12px 22px;border-top:1px solid #e1e9ed;}
#customer-edit-dialog #customer-edit-profile{margin:8px 0;}
@media(max-width:600px){#customer-edit-dialog .customer-edit-visit{grid-template-columns:1fr;gap:0;}#customer-edit-dialog .customer-edit-footer button{min-width:0;flex:1;}}

.record-correction-dialog{width:min(780px,calc(100vw - 32px));max-height:85dvh;overflow:auto;}
.record-correction-dialog .correction-date-check{display:flex;gap:8px;align-items:center;}
.record-correction-dialog .correction-date-check input{width:16px;height:16px;}
.record-correction-row{padding:14px 0;border-top:1px solid #dbe6eb;overflow-wrap:anywhere;}
.record-correction-row button{margin:8px 8px 0 0;}
/* Keep the actual deal date visible in the concise order list as well. */
.closed-orders-table.compact :is(th,td):nth-child(11){display:table-cell!important;white-space:nowrap;}

/* Target amounts and pace difference stay together on desktop. */
@media(min-width:761px){.performance-target-columns th:first-child,.performance-target-columns td:first-child{width:8%}.performance-target-columns th:nth-child(9),.performance-target-columns td:nth-child(9){width:11%}.performance-target-columns th:nth-last-child(-n+3),.performance-target-columns td:nth-last-child(-n+3){width:12%;white-space:nowrap}}

/* Completion color follows the unrounded existing pace rate. */
.performance-table td.performance-pace-below{color:#b42318;font-weight:700}
.performance-table td.performance-pace-met{color:#16713b;font-weight:700}

.performance-filters .performance-below-filter{display:flex;align-items:center;gap:8px;align-self:end;min-height:43px}
.performance-below-filter input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:0}

/* Administrator-only navigation groups retain every authorized module. */
.admin-navigation{gap:4px}
.module-sidebar:has(.admin-navigation) .sidebar-caption{padding:8px 10px}
.module-sidebar:has(.admin-navigation) .sidebar-foot{margin:9px 6px 2px;padding:9px 4px 0;font-size:11px}
.admin-nav-group{border-top:1px solid #edf1f3;padding-top:5px}
.admin-nav-group>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;color:#718694;font-size:12px;font-weight:750;user-select:none}
.admin-nav-group>summary::-webkit-details-marker{display:none}
.admin-nav-group>summary::after{content:'›';font-size:17px;line-height:1;transition:transform .15s}
.admin-nav-group[open]>summary::after{transform:rotate(90deg)}
.admin-nav-group:has(.module-link.active)>summary{color:#18566b}
.admin-nav-group>summary:focus-visible{outline:2px solid #28798e;outline-offset:-2px;border-radius:8px}
.admin-nav-items{display:grid;gap:2px;padding-bottom:3px}
.admin-navigation .module-link{padding:7px 11px;font-size:13px}
@media(max-width:1050px){.module-nav.admin-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:6px}.admin-navigation>.module-link{grid-column:1/-1}.admin-navigation .module-link{white-space:normal;padding:10px 11px}.admin-nav-group{min-width:0}.admin-nav-group>summary{padding:9px 7px}.admin-nav-items{gap:2px}}

/* Sales customer editor: one task area and one atomic save. */
#customer-edit-dialog{width:min(780px,calc(100vw - 24px));max-height:90dvh}
#customer-edit-dialog>.section-head{min-height:68px}
#customer-edit-dialog>.section-head h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-edit-tabs{display:flex;gap:6px;background:#fff;padding:8px 22px;border-bottom:1px solid #e1e9ed}
.customer-edit-tabs button{flex:1;border:0;border-radius:8px;background:#f2f6f8;color:#536d7e;padding:10px 8px;font-size:14px;font-weight:700}
.customer-edit-tabs button[aria-selected=true]{background:#123954;color:#fff}
.customer-edit-tabs button:focus-visible{outline:2px solid #24819a;outline-offset:2px}
#customer-edit-dialog .customer-edit-main{padding:14px 22px 8px}
.customer-field-label{font-size:13px;font-weight:650;color:#435d70}
#customer-edit-tags{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 16px}
#customer-edit-tags button{border:1px solid #d6e0e5;border-radius:8px;background:#fff;color:#3c5d70;padding:9px 12px;font-size:13px}
#customer-edit-tags button[aria-pressed=true]{border-color:#1d7289;background:#e6f3f7;color:#14556d;font-weight:750}
#customer-edit-dialog .customer-edit-visit:has(#customer-edit-visit-field[hidden]){display:block;background:transparent;padding:0;margin-top:0}
#customer-edit-dialog .customer-source-heading{font-size:15px;margin:18px 0 6px;padding-top:14px;border-top:1px solid #e1e9ed}
#customer-edit-dialog #customer-source-current{margin:5px 0;font-size:12px}
#customer-panel-history p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
@media(max-width:600px){.customer-edit-tabs{padding-inline:14px;gap:4px}.customer-edit-tabs button{font-size:13px;padding:10px 4px}#customer-edit-dialog .customer-edit-main{padding:12px 14px 8px}#customer-edit-tags{gap:6px}#customer-edit-tags button{padding:9px 10px}}

/* Amount and date are the primary controls for receipt entry and correction. */
.receipt-dialog{width:min(680px,calc(100vw - 24px))}
.receipt-dialog .receipt-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.receipt-dialog #receipt-allocation-rows{margin:0;gap:10px}
.receipt-dialog .receipt-project.single-project{display:block;padding:0;border:0;background:transparent}
.receipt-dialog .receipt-project.single-project>button{padding:5px 9px;font-size:12px;margin:0}
.receipt-dialog .receipt-project.single-project .share-rows{margin-top:10px}
.receipt-dialog .receipt-short-help{font-size:12px;color:#7c909d;margin:8px 0}
.receipt-dialog .receipt-multi .receipt-entry-grid{grid-template-columns:1fr}
.receipt-dialog #receipt-balance-summary{margin:12px 0 4px;font-size:13px}
.receipt-dialog .register-panel-actions{margin:6px 0}
.receipt-dialog .register-panel-actions:has(>button[hidden]:first-child):has(>button[hidden]:last-child){display:none}
.receipt-dialog .register-panel-actions button{font-size:12px;padding:5px 9px}
.simple-correction-dialog{width:min(700px,calc(100vw - 24px));padding:0}
.simple-correction-dialog>.section-head{position:sticky;top:0;background:white;z-index:2;padding:16px 20px;border-bottom:1px solid #e1e9ed}
.simple-correction-dialog>.section-head h3{font-size:19px;margin:0}
.correction-tabs{display:flex;gap:8px;padding:12px 20px 4px}
.correction-tabs button{flex:1;background:#f0f5f7;border:0;border-radius:8px;padding:10px;font-weight:700;color:#526d7d}
.correction-tabs button[aria-selected=true]{background:#123954;color:white}
.correction-entry{margin:12px 20px;padding-bottom:12px;border-bottom:1px solid #e1e9ed}
.correction-fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.correction-save-row{display:flex;justify-content:flex-end;padding-top:4px}
.correction-save-row button{width:auto;min-width:140px;margin:0}
.correction-entry .hint{font-size:12px;margin:5px 0}
.correction-footnote{padding:0 20px 12px;font-size:12px;color:#7b909e;line-height:1.6}
.simple-correction-dialog>[data-panel]>.hint{padding:12px 20px}
@media(max-width:560px){.receipt-dialog .receipt-entry-grid,.correction-fields-grid{grid-template-columns:1fr}.simple-correction-dialog>.section-head{padding:14px}.correction-tabs{padding-inline:14px}.correction-entry{margin-inline:14px}.correction-save-row button{width:100%}}

/* Each cash fact keeps its own actual date and project allocations. */
.closed-orders-table .order-receipt-ledger-row>td{display:table-cell!important;position:static!important;padding:0 12px 10px!important;white-space:normal;}
.order-receipt-ledger{font-size:13px;color:#36586b;max-width:100%;}
.order-receipt-ledger>summary{cursor:pointer;padding:7px 0;font-weight:650;}
.receipt-ledger-table{width:100%;min-width:0!important;border-collapse:collapse;table-layout:auto;font-size:13px;}
.receipt-ledger-table :is(th,td){position:static!important;display:table-cell!important;min-width:0!important;width:auto!important;padding:8px 12px!important;white-space:normal!important;background:#f6fafb!important;font-weight:400;text-align:left;}
.receipt-ledger-table th{font-weight:700;}
.receipt-dialog #receipt-previous-payments{margin:4px 0 12px;max-height:180px;overflow:auto;}

#customer-register-card .inline-follow-tag{width:100%;min-width:90px;margin:0;padding:6px 8px;font-size:13px;}
#customer-register-card .inline-follow-editor{display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:5px;align-items:center;margin-top:7px;white-space:normal;}
#customer-register-card .inline-follow-editor textarea{width:100%;min-height:35px;margin:0;padding:7px 8px;resize:vertical;font-size:13px;}
#customer-register-card .inline-follow-editor label{grid-column:1/-1;font-size:12px;margin:0;}
#customer-register-card .inline-follow-editor label[hidden]{display:none;}
#customer-register-card .inline-follow-save{grid-column:2;grid-row:1;margin:0;white-space:nowrap;}
#customer-register-card .inline-follow-status{grid-column:1/-1;font-size:12px;color:#466978;overflow-wrap:anywhere;}
#customer-register-card .register-followup>.inline-follow-editor{display:grid;white-space:normal;}
#customer-register-card .customer-register-table .register-followup{overflow:visible;}
#customer-register-card .register-followup>.inline-follow-editor textarea{min-width:0;}
#customer-register-card .register-followup>div:first-child{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.follow-draft-dialog{max-width:520px;width:calc(100vw - 40px);padding:24px;border:1px solid #d9e5ea;border-radius:16px;}.follow-draft-dialog .actions{display:flex;gap:8px;flex-wrap:wrap;}.finance-workflow-result{padding:12px;background:#eef7f7;border:1px solid #d3e6e8;border-radius:9px;color:#234f61;}.register-actions{min-width:100px}.register-actions button{white-space:nowrap}.register-actions .register-trade-action{display:block;margin-bottom:6px;}

/* Keep routine customer follow-up and actions on a single line. */
#customer-register-card .customer-register-table{min-width:1740px}
#customer-register-card .customer-register-table.register-compact{min-width:1280px;table-layout:auto}
#customer-register-card .customer-register-table .register-followup{min-width:510px;width:510px;max-width:none;white-space:nowrap;vertical-align:middle}
#customer-register-card .register-followup>div:first-child{display:inline-block;width:150px;max-width:150px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#customer-register-card .register-followup>small{display:none}
#customer-register-card .register-followup>.inline-follow-editor{display:inline-grid;grid-template-columns:200px auto auto auto;gap:6px;align-items:center;vertical-align:middle;margin:0 0 0 8px;white-space:nowrap}
#customer-register-card .inline-follow-editor textarea{height:35px;min-height:35px;max-height:35px;resize:none;white-space:pre;overflow:auto}
#customer-register-card .inline-follow-editor label{grid-column:3;grid-row:1;display:flex;align-items:center;gap:5px;white-space:nowrap}
#customer-register-card .inline-follow-editor label input{width:145px;margin:0;padding:5px;font-size:12px}
#customer-register-card .inline-follow-editor .inline-follow-save{grid-column:2;grid-row:1;margin:0}
#customer-register-card .inline-follow-status{grid-column:4;grid-row:1;max-width:140px;white-space:normal}
#customer-register-card .inline-follow-status:empty{display:none}
#customer-register-card .customer-register-table :is(th,td):nth-child(12){width:190px;min-width:190px;max-width:none;white-space:nowrap;vertical-align:middle}
#customer-register-card .register-actions .register-trade-action{display:inline-block;margin:0 6px 0 0}
#customer-register-card .customer-register-table tbody td{vertical-align:middle}
#customer-register-card .register-followup:has(.inline-follow-status:not(:empty)){min-width:660px}
#customer-register-card .register-followup:has(.inline-follow-editor label:not([hidden])){min-width:830px}
#customer-register-card .register-mobile-actions{display:none}
#customer-register-card .customer-register-table tbody td{white-space:nowrap}
#customer-register-card .customer-register-table :is(th,td):nth-child(12){position:sticky;right:0;background:#fff;z-index:3}
#customer-register-card .customer-register-table th:nth-child(12){background:#f3f8f9;z-index:4}
#customer-register-card .customer-register-table.register-compact :is(th,td):nth-child(11){width:510px;min-width:510px}
#customer-register-card .customer-register-table.register-compact td.register-followup:has(.inline-follow-status:not(:empty)){width:660px;min-width:660px}
#customer-register-card .customer-register-table.register-compact td.register-followup:has(.inline-follow-editor label:not([hidden])){width:830px;min-width:830px}
#customer-register-card .customer-register-table :is(th,td):nth-child(12){position:static}
#customer-register-card .customer-register-table td.register-actions button+button{margin-left:6px}

/* Fit the compact view around daily customer work; the full view keeps all columns. */
#customer-register-card .customer-register-table.register-compact{min-width:0;width:100%;table-layout:fixed;font-size:12px}
#customer-register-card .register-compact :is(th,td){padding:7px 5px}
#customer-register-card .register-compact :is(th,td):nth-child(1){width:65px;min-width:0}
#customer-register-card .register-compact :is(th,td):nth-child(2){width:88px}
#customer-register-card .register-compact :is(th,td):nth-child(3){width:96px}
#customer-register-card .register-compact :is(th,td):nth-child(4){width:100px;min-width:0;position:static;overflow:hidden;text-overflow:ellipsis}
#customer-register-card .register-compact :is(th,td):nth-child(8){width:70px}
#customer-register-card .customer-register-table.register-compact :is(th,td):nth-child(11),
#customer-register-card .customer-register-table.register-compact td.register-followup:has(.inline-follow-status:not(:empty)),
#customer-register-card .customer-register-table.register-compact td.register-followup:has(.inline-follow-editor label:not([hidden])){width:auto;min-width:0}
#customer-register-card .register-compact .register-followup>div:first-child{display:block;width:100%;max-width:100%;font-size:11px;color:#607987;margin-bottom:3px}
#customer-register-card .register-compact .register-followup>.inline-follow-editor{display:grid;grid-template-columns:minmax(70px,1fr) auto;gap:4px;width:100%;margin:0}
#customer-register-card .register-compact .inline-follow-editor textarea{font-size:12px;padding:6px;height:32px;min-height:32px;max-height:32px}
#customer-register-card .register-compact .inline-follow-editor label{grid-column:1/-1;grid-row:auto;white-space:normal;flex-wrap:wrap;font-size:11px}
#customer-register-card .register-compact .inline-follow-status{grid-column:1/-1;grid-row:auto;max-width:100%}
#customer-register-card .register-compact .inline-follow-tag{font-size:12px;min-width:0;padding:6px 3px;height:32px}
#customer-register-card .customer-register-table.register-compact :is(th,td):nth-child(12){width:158px;min-width:0;text-align:left}
#customer-register-card .customer-register-table.register-compact td.register-actions button{font-size:12px;padding:5px 6px;margin:0}
#customer-register-card .customer-register-table.register-compact td.register-actions button+button{margin-left:4px}
#customer-register-card .register-compact th button{padding:2px;width:20px;min-width:20px}
@media(max-width:1250px){
 #customer-register-card .register-compact :is(th,td):is(:nth-child(1),:nth-child(2),:nth-child(8)){display:none}
 #customer-register-card .register-compact :is(th,td):nth-child(3){width:88px}
 #customer-register-card .register-compact :is(th,td):nth-child(4){width:86px}
}
@media(max-width:600px){
 #customer-register-card .customer-register-table.register-compact{min-width:470px}
 #customer-register-card .customer-register-table.register-compact :is(th,td):nth-child(12){width:138px}
 #customer-register-card .customer-register-table.register-compact td.register-actions button{font-size:11px;padding:5px 4px}
}

/* Full register: compact columns with actions always visible at the right edge. */
#customer-register-card .customer-register-table:not(.register-compact){min-width:1320px;table-layout:fixed;font-size:12px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td){padding:7px 5px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(1){width:64px;min-width:0}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(2){width:86px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(3){width:96px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(4){width:100px;min-width:0;overflow:hidden;text-overflow:ellipsis}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(5){width:58px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(6){width:110px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(7){width:82px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(8){width:84px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(9){width:76px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(10){width:90px;overflow:hidden;text-overflow:ellipsis}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(11){width:auto;min-width:0;max-width:none}
#customer-register-card .customer-register-table:not(.register-compact) .register-followup>div:first-child{display:block;width:100%;max-width:100%;font-size:11px;color:#607987;margin-bottom:3px}
#customer-register-card .customer-register-table:not(.register-compact) .register-followup>.inline-follow-editor{display:grid;grid-template-columns:minmax(85px,1fr) auto;gap:4px;width:100%;margin:0}
#customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor textarea{font-size:12px;padding:6px;height:32px;min-height:32px;max-height:32px;scroll-margin-right:185px}
#customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor label{grid-column:1/-1;grid-row:auto;flex-wrap:wrap;white-space:normal;font-size:11px}
#customer-register-card .customer-register-table:not(.register-compact) .inline-follow-status{grid-column:1/-1;grid-row:auto;max-width:100%}
#customer-register-card .customer-register-table:not(.register-compact) .inline-follow-tag{font-size:12px;min-width:0;padding:6px 3px;height:32px}
#customer-register-card .customer-register-table:not(.register-compact) th button{padding:2px;width:20px;min-width:20px}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(12){width:174px;min-width:174px;position:sticky;right:0;z-index:3;background:#fff;box-shadow:-3px 0 5px #16385112;text-align:center}
#customer-register-card .customer-register-table:not(.register-compact) th:nth-child(12){background:#f3f8f9;z-index:5}
#customer-register-card .customer-register-table:not(.register-compact) td.register-actions button{font-size:12px;padding:5px 6px;margin:0;white-space:nowrap}
#customer-register-card .customer-register-table:not(.register-compact) td.register-actions button+button{margin-left:4px}
#customer-register-card .register-scroll{scroll-padding-right:184px}

/* Pin follow-up alongside actions so horizontal scrolling never covers its controls. */
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(11){position:sticky;right:174px;z-index:3;background:#fff;box-shadow:-3px 0 5px #16385112}
#customer-register-card .customer-register-table:not(.register-compact) th:nth-child(11){background:#f3f8f9;z-index:5}
#customer-register-card .customer-register-table:not(.register-compact) td.register-followup:hover{background:#f3f9fb}

/* Keep customer identity separate from the pinned daily work controls. */
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(4){position:sticky;left:96px;z-index:4;background:#fff}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(3){position:sticky;left:0;z-index:4;background:#fff;box-shadow:3px 0 5px #16385112}
#customer-register-card .customer-register-table:not(.register-compact) th:is(:nth-child(3),:nth-child(4)){z-index:6;background:#f3f8f9}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(11){width:240px;min-width:240px;max-width:240px}
@media(max-width:1100px){
 #customer-register-card .customer-register-table:not(.register-compact){display:block;min-width:0;width:100%;table-layout:auto}
 #customer-register-card .customer-register-table:not(.register-compact) thead{display:none}
 #customer-register-card .customer-register-table:not(.register-compact) tbody{display:block}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 10px;padding:12px 8px;border-bottom:1px solid #dce6eb}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td{display:block;position:static!important;width:auto!important;min-width:0!important;max-width:none!important;padding:2px 0;border:0;box-shadow:none!important;white-space:normal;overflow-wrap:anywhere;background:transparent!important}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(4){grid-column:1;grid-row:1;font-size:14px;white-space:normal;overflow:visible}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(3){grid-column:2;grid-row:1}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(11){grid-column:1/-1;margin-top:5px}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(12){grid-column:1/-1;text-align:right;padding-top:6px}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(1)::before{content:'跟进人：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(2)::before{content:'资源日期：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(5)::before{content:'性别：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(6)::before{content:'联系方式：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(7)::before{content:'地区：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(8)::before{content:'渠道：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(9)::before{content:'分单员：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) tbody tr td:nth-child(10)::before{content:'分单账号：';color:#71899a}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(11),:nth-child(12)){position:static;left:auto;right:auto;box-shadow:none}
 #customer-register-card .register-scroll{scroll-padding-right:0}
}

/* Consumption labels help match receipts to the correct independent order. */
.closed-orders-table .order-purchase-label{display:inline-block;white-space:nowrap;font-size:12px;line-height:1.5;color:#607987;margin:0 0 0 8px;vertical-align:middle}
.receipt-dialog #receipt-order-name{white-space:nowrap;overflow-x:auto;font-size:14px;line-height:1.6}
.closed-orders-table td:nth-child(4){white-space:nowrap!important}

/* Daily order actions share one row; keep their widths intrinsic. */
.closed-orders-table .order-actions-cell .register-followup{flex-wrap:nowrap;align-items:center;width:max-content;gap:5px}
.closed-orders-table .order-actions-cell .register-followup button{flex:none;padding:5px 7px}

.closed-orders-table .order-receipt-ledger-cell{white-space:nowrap;padding:8px 10px}
.closed-orders-table .order-receipt-ledger-cell button{white-space:nowrap;font-size:12px;padding:5px 7px;margin:0}

.attendance-match-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,1fr);gap:6px 12px;padding:10px 0;border-bottom:1px solid #e1e9ed}.attendance-match-row small{grid-column:1/-1}.attendance-match-row select{margin:0}#attendance-bulk-panel{margin:15px 0}#attendance-bulk-panel summary{cursor:pointer;font-weight:700}

/* Content review stays usable with long delivery notes and narrow screens. */
#content-review-dialog{max-height:85dvh;overflow:auto}
#content-review-dialog form{margin:0}
#content-review-context,#content-review-delivery{white-space:pre-wrap;overflow-wrap:anywhere}
#content-quick-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
#content-quick-filters button{width:auto;margin:0}

/* Daily attendance: compact overview, preserve existing attendance rules. */
.attendance-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}
#attendance-counts button{padding:14px 20px;font-weight:700}
#attendance-counts button[aria-pressed="true"]{background:#153e53;color:white}
#attendance-sync-status{display:flex;flex-wrap:wrap;gap:6px 24px;margin:12px 0}
#attendance-sync-status p{margin:0;font-size:12px}
#attendance-rows table{min-width:900px}
#attendance-rows td{vertical-align:top;white-space:normal}
#attendance-settings>summary{cursor:pointer;font-weight:700}
#attendance-settings .card{box-shadow:none;border:0;margin-top:16px;padding:12px}

.attendance-query{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) auto;gap:12px;align-items:end;margin:16px 0}
.attendance-query label{margin:0}
@media(max-width:760px){.attendance-query{grid-template-columns:1fr 1fr}}

/* Compact attendance controls leave more room for employee rows. */
#attendance-card{padding:20px}
.attendance-heading,.attendance-toolbar,.attendance-review-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
.attendance-heading{justify-content:space-between;margin-bottom:12px}
.attendance-heading h2{margin:0}
#attendance-guide{font-size:13px;max-width:650px}
#attendance-guide summary{cursor:pointer;color:#537187}
#attendance-guide p{margin:6px 0}
#attendance-filter-form{display:flex;align-items:end;gap:8px;margin:0}
#attendance-filter-form label{margin:0;width:145px}
#attendance-filter-form label:has(input){width:175px}
#attendance-filter-form button{margin:0}
#attendance-card button{padding:8px 12px;margin:0;min-height:36px}
#attendance-card input,#attendance-card select{padding:8px 10px;min-height:36px}
#attendance-card .attendance-actions{gap:6px;margin:0;align-items:center}
.attendance-toolbar{align-items:end}
#attendance-card .attendance-query{margin:10px 0;gap:8px}
#attendance-card #attendance-counts button{padding:9px 13px}
.attendance-review-bar{justify-content:space-between;margin:8px 0}
#attendance-view-status{font-size:13px}
#attendance-card #attendance-summary{margin:8px 0 4px;font-size:12px}
#attendance-card #attendance-sync-status{margin:4px 0 10px;gap:4px 16px}
#attendance-view-help{font-size:12px;margin:6px 0}
#attendance-refresh-status:empty{display:none}
@media(max-width:600px){#attendance-card{padding:14px}#attendance-filter-form{flex-wrap:wrap;width:100%}#attendance-filter-form label{flex:1;min-width:110px}.attendance-review-bar{gap:8px}}

#attendance-detail-body .attendance-actions{gap:8px;margin:12px 0}
#attendance-detail-body button[aria-pressed="true"]{background:#153e53;color:white}
#attendance-detail-body .rows p{padding:10px 12px;margin:0;border-bottom:1px solid #e1e9ed;overflow-wrap:anywhere}
#attendance-detail-body .attendance-punch-marked{background:#fff3eb;border-left:3px solid #ce8657;color:#854a25}

/* Full sales registers keep each order on one line, with horizontal scrolling. */
.closed-orders-table{width:max-content;min-width:100%;table-layout:auto}
.closed-orders-table :is(th,td){white-space:nowrap!important;width:auto;max-width:none;padding:9px 11px}
.closed-orders-table td:nth-child(4){min-width:240px;width:auto}
.closed-orders-table :is(th,td):nth-child(11){min-width:112px}
.closed-orders-table .order-actions-cell{min-width:max-content}
.closed-orders-table.compact :is(th,td):nth-child(13){display:table-cell}
.closed-orders-table.compact :is(th,td):nth-child(14){display:none}
#customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(6){width:170px;min-width:170px;overflow:visible;text-overflow:clip}

.closed-orders-table.compact :is(th,td):nth-child(6){display:table-cell}
#customer-register-card .customer-register-table :is(th,td):nth-child(6){display:table-cell}
.closed-orders-table .order-actions-cell,.closed-orders-table th:last-child{position:static;right:auto;box-shadow:none}
.closed-orders-table.compact :is(th,td):nth-child(2){display:table-cell}

/* The merged location removes one column; project total stays visible in compact mode. */
.closed-orders-table.compact :is(th,td):nth-child(14){display:table-cell}

/* Dense desktop registers: one customer/order per line, with horizontal scrolling. */
.closed-orders-table :is(th,td){padding:6px 8px;font-size:12px;line-height:1.4}
.closed-orders-table .order-actions-cell .register-followup{margin:0;gap:4px}
.closed-orders-table .order-actions-cell button,.closed-orders-table .order-receipt-ledger-cell button{padding:4px 6px;min-height:28px;font-size:12px}
.closed-orders-table td:nth-child(4){min-width:190px}
@media(min-width:761px){
 #customer-register-card .customer-register-table:not(.register-compact){width:max-content;min-width:100%;table-layout:auto}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td){width:auto;min-width:0;max-width:none;padding:6px 8px;white-space:nowrap;vertical-align:middle;position:static;box-shadow:none}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(6){width:auto;min-width:140px}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(11){width:auto;min-width:0;max-width:none}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td):nth-child(12){width:auto;min-width:0;text-align:left}
 #customer-register-card .customer-register-table:not(.register-compact) .register-followup>div.register-latest-note{display:inline-block;width:auto;max-width:150px;overflow:hidden;text-overflow:ellipsis;margin:0 6px 0 0;vertical-align:middle;white-space:nowrap}
 #customer-register-card .customer-register-table:not(.register-compact) .register-followup>small{display:inline-block;margin:0 6px;vertical-align:middle;white-space:nowrap}
 #customer-register-card .customer-register-table:not(.register-compact) .register-followup>.inline-follow-editor{display:inline-flex;width:auto;gap:5px;align-items:center;flex-wrap:nowrap;margin:0 0 0 6px;vertical-align:middle}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor textarea{width:160px;min-width:160px;height:30px;min-height:30px;max-height:30px;padding:5px 6px;resize:none;scroll-margin-right:0}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor label{display:inline-flex;align-items:center;gap:4px;width:auto;white-space:nowrap;flex-wrap:nowrap;margin:0}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor label[hidden]{display:none}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-editor input[type=date]{width:135px;min-width:135px;height:30px;padding:4px}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-status:empty{display:none}
 #customer-register-card .customer-register-table:not(.register-compact) .inline-follow-tag{width:84px;height:30px;padding:4px}
 #customer-register-card .customer-register-table:not(.register-compact) td button{display:inline-block;margin:0;padding:4px 6px;min-height:28px;font-size:12px;vertical-align:middle}
 #customer-register-card .customer-register-table:not(.register-compact) :is(th,td):is(:nth-child(3),:nth-child(4),:nth-child(11),:nth-child(12)){position:static;left:auto;right:auto;box-shadow:none}
 #customer-register-card .register-scroll{scroll-padding-right:0}
}

/* Keep the existing row actions reachable from the left without changing their handlers. */
.row-action-dialog{width:min(430px,calc(100vw - 32px));max-height:80vh;overflow:auto;border:1px solid #d5e2e8;border-radius:14px;padding:20px;color:#163851}
.row-action-dialog::backdrop{background:#16385166}.row-action-dialog h3{font-size:16px;margin:0;overflow-wrap:anywhere}
.row-action-list{display:grid;gap:8px;margin-top:16px}.row-action-list button{text-align:left;padding:10px 12px}
.leading-row-action{margin:0 8px 0 0!important;padding:4px 7px!important;white-space:nowrap}
#customer-register-card:not(.operations-register) .register-actions.row-action-tail,.leading-actions-table .order-actions-cell,.leading-actions-table th:last-child{display:none!important}
#customer-register-card:not(.operations-register) .customer-register-table th:last-child{display:none!important}
#customer-register-card .customer-register-table .leading-actions-cell,.closed-orders-table .leading-actions-cell{position:sticky!important;left:0!important;right:auto!important;background:#fff!important;z-index:4;min-width:155px!important;width:auto!important;white-space:nowrap;box-shadow:3px 0 5px #16385112!important}
#customer-register-card:not(.operations-register) .customer-register-table th:first-child,.closed-orders-table .leading-actions-header{display:table-cell!important;position:sticky!important;left:0!important;background:#f3f8f9!important;z-index:6;min-width:155px!important;white-space:nowrap}
.closed-orders-table.compact .leading-actions-cell{display:table-cell!important}

.closed-orders-table .order-refund-status[data-refunded="true"]{color:#a34a22;font-weight:600}

.order-action-menu .order-action-payment-status{display:inline-block;margin:12px 0 0;padding:4px 9px;border-radius:6px;background:#edf6f2;color:#287052;font-size:13px}
.order-action-menu .row-action-caption{margin:0;font-size:12px;font-weight:500;color:#718491}
.order-action-menu .row-action-more{border-top:1px solid #e1e9ed;margin-top:4px;padding-top:12px}
.order-action-menu .row-action-more>summary{cursor:pointer;font-size:14px;color:#526c7b;padding:2px 0}
.order-action-menu .row-action-more .row-action-list{margin-top:10px}

/* Shared login and authenticated page footer. */
.site-filing-footer{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 14px;padding:16px 20px 24px;color:#637b89;font-size:12px;line-height:1.8;text-align:center}
.site-filing-footer a{color:inherit;text-decoration:none;overflow-wrap:anywhere}
.site-filing-footer a:hover,.site-filing-footer a:focus-visible{text-decoration:underline;color:#163851}

/* Lead intake review: compact filters, visible source identity and stable action grouping. */
#lead-list-card #lead-list-filters{grid-template-columns:minmax(0,1fr) 180px;gap:12px;margin-top:14px}
#lead-list-card [aria-label="客资核对筛选"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}
#lead-list-card .lead-filter-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
#lead-list-card .lead-filter-actions button{width:auto;margin:0}
#lead-list-card #lead-rows{max-height:min(65vh,720px);min-height:160px;margin-top:16px;overscroll-behavior:contain}
#lead-list-card #lead-rows .lead-row,#lead-list-card .lead-list-heading{display:grid;grid-template-columns:minmax(180px,1.5fr) 104px 64px 76px 76px 218px;min-width:820px;gap:10px;align-items:start;padding:12px 10px;border:0;border-left:3px solid transparent;border-bottom:1px solid #e4ebef;border-radius:0;margin:0}
#lead-list-card .lead-list-heading{position:sticky;top:0;z-index:2;background:#f1f6f8;color:#526d7c;font-size:12px;font-weight:600}
#lead-list-card #lead-rows .lead-row.pending-accept{border-left-color:#d79022}
#lead-list-card #lead-rows .lead-row strong{overflow-wrap:anywhere;font-size:14px}
#lead-list-card .lead-info-cell{font-size:12px;line-height:1.6;color:#526d7c;overflow-wrap:anywhere;padding-top:2px;font-variant-numeric:tabular-nums}
#lead-list-card #lead-rows .meta{display:flex;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:center;gap:6px;min-width:0;text-align:left}
#lead-list-card #lead-rows .meta>span:first-child{flex-basis:100%;background:transparent;padding:0;color:#41687d}
#lead-list-card #lead-rows .meta>br{display:none}
#lead-list-card #lead-rows .meta button{width:auto;margin:0;white-space:nowrap;min-height:30px;padding:6px 8px}
#lead-list-card #lead-rows .meta small,#lead-list-card #lead-rows .meta label{flex-basis:100%;min-width:0}
@media(max-width:760px){#lead-list-card [aria-label="客资核对筛选"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){#lead-list-card #lead-list-filters{grid-template-columns:minmax(0,1fr) 115px}#lead-list-card #lead-rows{max-height:65vh}}

#lead-list-card #lead-rows .lead-compact-summary{display:none}
@media(max-width:900px){
 #lead-list-card .lead-list-heading,#lead-list-card .lead-info-cell{display:none}
 #lead-list-card #lead-rows .lead-row{min-width:0;grid-template-columns:minmax(0,1fr) 218px}
 #lead-list-card #lead-rows .lead-compact-summary{display:flex;flex-wrap:wrap;gap:2px 10px;color:#526d7c}
}
@media(max-width:480px){#lead-list-card #lead-rows .lead-row{grid-template-columns:minmax(0,1fr) 150px}}

#lead-list-card .lead-compact-summary>span{display:inline-block;max-width:100%;overflow-wrap:anywhere}

/* Adapt to the list card width, including the administrator's two-column workspace. */
#lead-list-card{container-type:inline-size}
@container(max-width:820px){
 #lead-list-card .lead-list-heading,#lead-list-card .lead-info-cell{display:none}
 #lead-list-card #lead-rows .lead-row{min-width:0;grid-template-columns:minmax(0,1fr) 218px}
 #lead-list-card #lead-rows .lead-compact-summary{display:flex;flex-wrap:wrap;gap:2px 10px;color:#526d7c}
}
@container(max-width:400px){#lead-list-card #lead-rows .lead-row{grid-template-columns:minmax(0,1fr) 150px}}
