.student-workspace{display:grid;grid-template-columns:360px minmax(620px,1fr);gap:18px}.student-editor,.student-list-panel{background:#fff}.panel-title>div>*{display:block}.panel-title small{margin-top:4px;color:#5a6d63;line-height:1.5}.student-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px}.student-fields label{display:grid;gap:7px;color:#31443a;font-size:13px}.student-fields .wide{grid-column:1/-1}textarea{width:100%;min-height:190px;padding:12px;border:1px solid #bccbc4;border-radius:7px;background:#fff;color:#17231e;font:inherit;line-height:1.65;resize:vertical}.privacy-tip{margin:0;padding:0 20px 20px;color:#5a6d63;font-size:12px;line-height:1.55}#studentNotice{min-height:36px;padding:10px 0;color:#176b4d;font-size:13px}.student-toolbar{display:grid;grid-template-columns:190px 1fr auto;gap:10px;padding:16px;border-bottom:1px solid #e0e6e3;background:#fbfcfb}.student-toolbar button{padding:0 16px;border-radius:7px;background:#edf1ef;color:#26362e}.student-list-panel table{min-width:760px}.student-name,.student-phone{display:block}.student-name{font-weight:700}.student-phone{margin-top:3px;color:#67766e;font-size:12px}.bind-state{color:#176b4d;font-weight:700}.bind-state.unbound{color:#67766e;font-weight:400}@media(max-width:1100px){.student-workspace{grid-template-columns:1fr}.student-editor{max-width:none}.student-toolbar{grid-template-columns:1fr 1fr}.student-toolbar input{grid-column:1/-1}}@media(max-width:600px){.student-fields,.student-toolbar{grid-template-columns:1fr}.student-fields .wide,.student-toolbar input{grid-column:auto}}
.crm-workspace,.staff-workspace{display:grid;grid-template-columns:360px minmax(620px,1fr);gap:18px}.crm-editor,.crm-list-panel{border:1px solid #dbe5df;border-radius:8px;background:#fff;box-shadow:0 6px 18px rgba(18,35,27,.04);overflow:hidden}.crm-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px}.crm-fields label{display:grid;gap:7px;color:#31443a;font-size:13px}.crm-fields .wide{grid-column:1/-1}.lead-list{display:grid;gap:10px;min-height:320px;padding:14px;background:#f6f8f7}.lead-card{display:grid;gap:10px;padding:14px;border:1px solid #dce4df;border-radius:8px;background:#fff}.lead-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.lead-head strong,.lead-meta,.lead-note{display:block}.lead-head strong{font-size:16px}.lead-meta{color:#617068;font-size:12px;line-height:1.6}.lead-stage{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#e5f4ec;color:#0f6544;font-size:12px;font-weight:700}.lead-stage.invalid{background:#fff1f1;color:#b42318}.lead-stage.converted{background:#edf2ff;color:#2454a6}.lead-note{color:#3e4c45;font-size:13px;line-height:1.5}.lead-actions{display:flex;flex-wrap:wrap;gap:8px}.lead-actions button{min-height:34px;padding:0 10px;border-radius:6px;background:#edf1ef;color:#26362e}.lead-actions .danger{background:#fff1f1;color:#b42318}.lead-actions .primary{background:#16724d!important;color:#fff!important}#leadNotice,#staffNotice{min-height:36px;padding:10px 0;color:#176b4d;font-size:13px}@media(max-width:1100px){.crm-workspace,.staff-workspace{grid-template-columns:1fr}.crm-editor{max-width:none}.crm-fields{grid-template-columns:1fr}.crm-fields .wide{grid-column:auto}}@media(max-width:900px){.crm-editor,.crm-list-panel{box-shadow:none}.crm-list-panel{margin-top:12px}.lead-list{padding:10px;background:#f3f6f4}.lead-card{padding:13px 14px}.lead-head{gap:10px}.lead-actions button{min-height:38px}}
.modal-mask{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:rgba(18,35,27,.42)}.modal-panel{width:min(560px,100%);border:1px solid #dbe5df;border-radius:10px;background:#fff;box-shadow:0 18px 56px rgba(18,35,27,.18);overflow:hidden}.modal-panel .actions{padding-top:0}.modal-panel .privacy-tip{padding:0 20px 16px}@media(max-width:700px){.modal-mask{align-items:end;padding:0;background:rgba(18,35,27,.35)}.modal-panel{border-radius:10px 10px 0 0;border-width:1px 0 0}.modal-panel .crm-fields{grid-template-columns:1fr}}

/* CRM compact intake layout: short, scannable, and still safe at narrower widths. */
body{overflow-x:hidden!important}main{min-width:0!important}main[id=leadsView],main[id=staffView]{max-width:none!important}.crm-workspace,.staff-workspace{grid-template-columns:minmax(500px,540px) minmax(0,1fr)!important;align-items:start!important;gap:18px!important}.crm-editor{position:sticky!important;top:18px!important;width:100%!important;max-width:540px!important;border-radius:8px!important}.staff-workspace .crm-editor{max-width:520px!important}.crm-editor,.crm-list-panel{min-width:0!important}.crm-editor .panel-title{padding:16px 18px 14px!important}.crm-editor .panel-title strong{font-size:15px!important}.crm-editor .panel-title small{margin-top:3px!important;font-size:12px!important;line-height:1.45!important}.crm-editor .crm-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:16px 18px 14px!important}.crm-editor .crm-fields label{gap:5px!important;font-size:12px!important;line-height:1.35!important}.crm-editor .crm-fields input,.crm-editor .crm-fields select{height:38px!important;padding:0 10px!important;font-size:13px!important}.crm-editor .crm-fields textarea{min-height:86px!important;padding:9px 10px!important;font-size:13px!important}.crm-editor .crm-fields label:nth-child(7),.crm-editor .crm-fields .wide{grid-column:1/-1!important}.crm-more{grid-column:1/-1!important;border:1px solid #e1e9e4!important;border-radius:8px!important;background:#f8faf9!important;overflow:hidden!important}.crm-more summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:40px!important;padding:0 12px!important;cursor:pointer!important;color:#21362d!important;font-weight:800!important;list-style:none!important}.crm-more summary::-webkit-details-marker{display:none!important}.crm-more summary::after{content:"展开";flex:0 0 auto;color:#5d7066;font-size:12px;font-weight:700}.crm-more[open] summary{border-bottom:1px solid #e1e9e4!important;background:#fff!important}.crm-more[open] summary::after{content:"收起"}.crm-more summary small{color:#64766d!important;font-size:12px!important;font-weight:600!important}.crm-more-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:12px!important}.crm-more-fields .wide{grid-column:1/-1!important}.crm-editor .actions{justify-content:flex-end!important;padding:12px 18px 16px!important;border-top:1px solid #e8efeb!important;background:#fbfcfb!important}.crm-editor .actions button{min-height:36px!important;padding:0 14px!important}.crm-fields label,.crm-fields input,.crm-fields select,.crm-fields textarea{min-width:0!important;max-width:100%!important}.crm-list-panel{margin-top:0!important}.crm-list-panel .student-toolbar{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}.crm-list-panel .student-toolbar input,.crm-list-panel .student-toolbar button,.crm-list-panel .student-toolbar select{grid-column:auto!important}main[id=leadsView] .summary{grid-template-columns:repeat(auto-fit,minmax(128px,1fr))!important}@media(max-width:1240px){.crm-workspace,.staff-workspace{grid-template-columns:1fr!important}.crm-editor{position:static!important;max-width:760px!important}.crm-list-panel{margin-top:14px!important}}@media(max-width:760px){.crm-editor{max-width:none!important}.crm-editor .crm-fields,.crm-more-fields{grid-template-columns:1fr!important}.crm-editor .crm-fields label{grid-column:auto!important}.crm-list-panel .student-toolbar{grid-template-columns:1fr!important}.modal-panel .crm-fields{grid-template-columns:1fr!important}}
/* Admin polish pass: clearer CRM workflow, denser cards, stronger interaction states. */
.quick-filters{display:flex;flex-wrap:wrap;gap:8px;margin:-2px 0 14px}.quick-filters button{min-height:34px;padding:0 13px;border:1px solid #d5e0da;border-radius:999px;background:#fff;color:#33483e;font-weight:700}.quick-filters button:hover{border-color:#a8c9b8;background:#f2f8f5}.quick-filters button.active{border-color:#116b49;background:#e7f5ee;color:#0d5b3d}.lead-card-pro{gap:12px!important;padding:14px!important}.lead-title-block{min-width:0}.lead-title-block strong{max-width:none!important}.lead-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.lead-kpis span{min-width:0;padding:10px;border:1px solid #e3ebe6;border-radius:7px;background:#fbfcfb}.lead-kpis b,.lead-kpis small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lead-kpis b{color:#17231e;font-size:13px}.lead-kpis small{margin-top:3px;color:#64766d;font-size:11px}.lead-kpis .money b{color:#0d5b3d}.lead-note-line{padding:9px 10px;border-radius:7px;background:#f5f8f6;color:#31443a;font-size:13px;line-height:1.55}.lead-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;color:#64766d;font-size:12px}.next-follow.today{color:#0d5b3d;font-weight:800}.next-follow.overdue{color:#b42318;font-weight:800}.lead-actions{justify-content:flex-end!important}.lead-actions button{border:1px solid #d5e0da!important;background:#f7faf8!important;color:#21362d!important}.lead-actions button:hover{border-color:#a8c9b8!important;background:#eef6f2!important}.lead-actions .primary{border-color:#116b49!important;background:#116b49!important;color:#fff!important}.empty-state{display:grid;place-items:center;gap:6px;min-height:240px;padding:30px;border:1px dashed #cbd8d1;border-radius:8px;background:#fbfcfb;color:#5d7066;text-align:center}.empty-state strong{color:#21362d;font-size:15px}.empty-state span{max-width:34ch;line-height:1.6}.is-busy{cursor:wait!important}@media(max-width:980px){.lead-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-foot{display:grid}.quick-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.quick-filters button{flex:0 0 auto}}@media(max-width:640px){.lead-kpis{grid-template-columns:1fr}.lead-actions{display:grid!important;grid-template-columns:1fr 1fr}.lead-actions button{width:100%}}
/* Admin visual assets: generated, task-supporting imagery. */
.login-view{position:relative;isolation:isolate;background:#eef4f0 url("/assets/admin-login-bg.png") center/cover no-repeat!important}.login-view::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(244,247,245,.88) 0%,rgba(244,247,245,.68) 42%,rgba(244,247,245,.2) 100%)}.login-card{backdrop-filter:blur(8px);background:rgba(255,255,255,.92)!important}.empty-state::before{content:"";display:block;width:min(360px,78%);aspect-ratio:16/10;margin:0 auto 12px;background:url("/assets/crm-empty-state.png") center/contain no-repeat}.empty-state{min-height:300px!important}.empty-state strong,.empty-state span{position:relative}@media(max-width:760px){.login-view{background-position:62% center!important}.login-view::before{background:rgba(244,247,245,.82)}.empty-state::before{width:min(280px,90%)}}
/* Visual language pass: icons, scan anchors, and less text-only structure. */
nav button{display:flex!important;align-items:center!important;gap:10px!important}nav button::before{content:"";flex:0 0 auto;width:22px;height:22px;border-radius:7px;background:#264136;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}nav button[data-view="tenants"]::before{background:linear-gradient(135deg,#e9f5ef 0 38%,#1d8b61 39% 62%,#c8b064 63%)}nav button[data-view="students"]::before{background:radial-gradient(circle at 50% 34%,#e9f5ef 0 18%,transparent 19%),radial-gradient(circle at 50% 86%,#1d8b61 0 43%,transparent 44%),#27463a}nav button[data-view="leads"]::before{background:linear-gradient(90deg,#1d8b61 0 24%,transparent 25%),linear-gradient(#e9f5ef 0 0) 58% 28%/44% 3px no-repeat,linear-gradient(#c8b064 0 0) 58% 52%/34% 3px no-repeat,linear-gradient(#e9f5ef 0 0) 58% 74%/48% 3px no-repeat,#27463a}nav button[data-view="staff"]::before{background:radial-gradient(circle at 36% 34%,#e9f5ef 0 14%,transparent 15%),radial-gradient(circle at 66% 38%,#c8b064 0 12%,transparent 13%),linear-gradient(#1d8b61 0 0) center 75%/70% 7px no-repeat,#27463a}nav button.active::before{box-shadow:inset 0 0 0 1px rgba(17,107,73,.14)}.summary{background:transparent!important;border:0!important;box-shadow:none!important;gap:10px!important;overflow:visible!important}.summary div{position:relative;min-height:86px!important;display:grid!important;grid-template-columns:42px 1fr!important;grid-template-rows:auto auto!important;align-content:center!important;column-gap:12px!important;min-width:0!important;padding:16px!important;border:1px solid #dbe5df!important;border-radius:8px!important;background:#fff!important;box-shadow:0 2px 8px rgba(16,33,24,.05)!important}.summary div::before{content:"";grid-row:1/3;width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#e7f5ee,#f8faf9);box-shadow:inset 0 0 0 1px #d8e8df}.summary div::after{content:"";position:absolute;left:29px;top:31px;width:16px;height:16px;border-radius:5px;background:#116b49;box-shadow:9px 9px 0 -4px #c8b064}.summary b{font-size:23px!important;line-height:1.05!important}.summary span{margin-top:4px!important;color:#52665c!important;font-weight:700!important}.summary div:nth-child(2)::after{border-radius:999px;background:#c8b064;box-shadow:10px 0 0 -3px #116b49}.summary div:nth-child(3)::after{width:18px;height:4px;top:34px;border-radius:99px;box-shadow:0 8px 0 #116b49,0 16px 0 #c8b064}.summary div:nth-child(4)::after{border-radius:50%;background:#116b49;box-shadow:11px 8px 0 -3px #c8b064}.summary div:nth-child(5)::after{background:conic-gradient(#116b49 0 72%,#c8b064 73%);border-radius:50%;box-shadow:none}.summary div:nth-child(6)::after{background:#b42318;box-shadow:8px 0 0 -3px #f1c6c0}.summary div:nth-child(7)::after{background:#c8b064;box-shadow:0 10px 0 -4px #116b49}.summary div:nth-child(8)::after{background:linear-gradient(135deg,#116b49 0 48%,#c8b064 49%);box-shadow:none}.panel-title,.editor-title{position:relative}.crm-editor .panel-title,.student-editor .panel-title,.editor-title{padding-left:54px!important}.crm-editor .panel-title::before,.student-editor .panel-title::before,.editor-title::before{content:"";position:absolute;left:18px;top:18px;width:24px;height:24px;border-radius:8px;background:linear-gradient(135deg,#116b49,#83b79a);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}.crm-list-panel .student-toolbar{background:linear-gradient(180deg,#fff,#f8fbf9)!important}.quick-filters button{display:inline-flex;align-items:center;gap:8px}.quick-filters button::before{content:"";width:8px;height:8px;border-radius:999px;background:#9aaca2}.quick-filters button.active::before{background:#116b49;box-shadow:0 0 0 4px #dff0e8}.lead-card-pro{position:relative;background:linear-gradient(180deg,#fff,#fbfcfb)!important}.lead-card-pro .lead-head{padding-bottom:2px}.lead-card-pro .lead-stage{display:inline-flex;align-items:center;gap:6px}.lead-card-pro .lead-stage::before{content:"";width:7px;height:7px;border-radius:999px;background:currentColor}.lead-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px}.lead-actions button::before{content:"";width:12px;height:12px;border-radius:4px;background:#8ea296}.lead-actions button[data-edit-lead]::before{background:linear-gradient(135deg,#8ea296 0 40%,#21362d 41%)}.lead-actions button[data-follow-lead]::before{border-radius:50%;background:radial-gradient(circle at center,#fff 0 28%,transparent 29%),#8ea296}.lead-actions button[data-history-lead]::before{background:linear-gradient(#8ea296 0 0) 0 2px/100% 2px no-repeat,linear-gradient(#8ea296 0 0) 0 6px/80% 2px no-repeat,linear-gradient(#8ea296 0 0) 0 10px/60% 2px no-repeat}.lead-actions .primary::before{background:#fff;clip-path:polygon(14% 52%,38% 76%,86% 24%,76% 14%,38% 58%,24% 44%)}.empty-state{background:#fff!important}.empty-state::before{filter:drop-shadow(0 12px 22px rgba(16,33,24,.08))}.login-card::after{content:"";position:absolute;right:22px;top:22px;width:54px;height:54px;border-radius:16px;background:linear-gradient(135deg,#e7f5ee,#fff);box-shadow:inset 0 0 0 1px #dbe5df;z-index:0}.login-card>*{position:relative;z-index:1}@media(max-width:900px){.summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.summary div{grid-template-columns:36px 1fr!important;padding:13px!important}.summary div::before{width:36px;height:36px}.summary div::after{left:25px;top:28px}.crm-editor .panel-title,.student-editor .panel-title,.editor-title{padding-left:46px!important}.crm-editor .panel-title::before,.student-editor .panel-title::before,.editor-title::before{left:14px;top:15px}}@media(max-width:560px){.summary{grid-template-columns:1fr!important}.lead-actions button::before{display:none}}
/* iOS flat pass: neutral surfaces, lighter hierarchy, restrained color roles. */
:root{--bg:#f5f5f7!important;--surface:#ffffff!important;--surface-2:#f2f2f7!important;--ink:#1d1d1f!important;--ink-2:#3a3a3c!important;--muted:#6e6e73!important;--line:#d1d1d6!important;--line-soft:#e5e5ea!important;--brand:#007aff!important;--brand-2:#0066d6!important;--brand-soft:#eaf3ff!important;--sidebar:#f7f7f9!important;--sidebar-2:#ededf2!important;--radius:10px!important;--radius-sm:8px!important;--shadow:none!important}html,body{background:#f5f5f7!important;color:#1d1d1f!important}aside{background:#f7f7f9!important;color:#1d1d1f!important;border-right:1px solid #d8d8de!important;box-shadow:none!important}.brand{border-bottom-color:#e5e5ea!important}.brand>span{background:#1d1d1f!important;color:#fff!important;box-shadow:none!important}.brand small,.company{color:#6e6e73!important}.company{border-top-color:#e5e5ea!important}.company button{border-color:#d1d1d6!important;background:#fff!important;color:#1d1d1f!important}.company button:hover{background:#ededf2!important}nav button{color:#3a3a3c!important;border:0!important;background:transparent!important}nav button:hover{background:#ededf2!important;color:#1d1d1f!important}nav button.active{background:#e8f2ff!important;color:#0057c2!important}nav button::before{background:#e5e5ea!important;box-shadow:none!important}nav button[data-view="tenants"]::before{background:linear-gradient(135deg,#007aff 0 50%,#ff9500 51%)!important}nav button[data-view="students"]::before{background:radial-gradient(circle at 50% 35%,#fff 0 18%,transparent 19%),radial-gradient(circle at 50% 88%,#34c759 0 42%,transparent 43%),#d1d1d6!important}nav button[data-view="leads"]::before{background:linear-gradient(90deg,#007aff 0 24%,transparent 25%),linear-gradient(#fff 0 0) 58% 28%/44% 3px no-repeat,linear-gradient(#ff9500 0 0) 58% 52%/34% 3px no-repeat,linear-gradient(#fff 0 0) 58% 74%/48% 3px no-repeat,#d1d1d6!important}nav button[data-view="staff"]::before{background:radial-gradient(circle at 36% 34%,#fff 0 14%,transparent 15%),radial-gradient(circle at 66% 38%,#ff9500 0 12%,transparent 13%),linear-gradient(#af52de 0 0) center 75%/70% 7px no-repeat,#d1d1d6!important}main{background:#f5f5f7!important}.summary div,.list-panel,.editor,.student-editor,.student-list-panel,.crm-editor,.crm-list-panel,.lead-card,.modal-panel,.login-card{box-shadow:none!important;border-color:#d8d8de!important;background:#fff!important}.summary div{border-radius:12px!important}.summary div::before{background:#f2f2f7!important;box-shadow:inset 0 0 0 1px #e5e5ea!important}.summary div::after{background:#007aff!important;box-shadow:9px 9px 0 -4px #ff9500!important}.summary div:nth-child(2)::after{background:#ff9500!important;box-shadow:10px 0 0 -3px #007aff!important}.summary div:nth-child(3)::after{background:#34c759!important;box-shadow:0 8px 0 #007aff,0 16px 0 #ff9500!important}.summary div:nth-child(4)::after{background:#af52de!important;box-shadow:11px 8px 0 -3px #ff9500!important}.summary div:nth-child(5)::after{background:conic-gradient(#007aff 0 72%,#ff9500 73%)!important}.summary div:nth-child(6)::after{background:#ff3b30!important;box-shadow:8px 0 0 -3px #ffd3d0!important}.summary div:nth-child(7)::after{background:#ff9500!important;box-shadow:0 10px 0 -4px #34c759!important}.summary div:nth-child(8)::after{background:linear-gradient(135deg,#007aff 0 48%,#ff9500 49%)!important}.primary{border-color:#007aff!important;background:#007aff!important;color:#fff!important;box-shadow:none!important}.primary:hover{background:#0066d6!important}.tag,.lead-stage{background:#f2f2f7!important;color:#3a3a3c!important}.lead-stage.converted{background:#eaf8ef!important;color:#248a3d!important}.lead-stage.invalid{background:#fff0ef!important;color:#d70015!important}.bind-state{color:#248a3d!important}.quick-filters button{border-color:#d1d1d6!important;background:#fff!important;color:#3a3a3c!important}.quick-filters button:hover{background:#f2f2f7!important;border-color:#c7c7cc!important}.quick-filters button.active{border-color:#007aff!important;background:#eaf3ff!important;color:#0057c2!important}.quick-filters button::before{background:#8e8e93!important}.quick-filters button.active::before{background:#007aff!important;box-shadow:0 0 0 4px #dbeaff!important}.crm-editor .panel-title::before,.student-editor .panel-title::before,.editor-title::before{background:linear-gradient(135deg,#007aff,#5ac8fa)!important;box-shadow:none!important}.lead-kpis span{border-color:#e5e5ea!important;background:#f9f9fb!important}.lead-kpis .money b{color:#007aff!important}.lead-note-line{background:#f2f2f7!important;color:#3a3a3c!important}.lead-actions button{border-color:#d1d1d6!important;background:#fff!important;color:#1d1d1f!important}.lead-actions button:hover{background:#f2f2f7!important;border-color:#c7c7cc!important}.lead-actions .primary{border-color:#007aff!important;background:#007aff!important}.lead-actions button::before{background:#8e8e93!important}.next-follow.today{color:#007aff!important}.next-follow.overdue{color:#d70015!important}input,select,textarea{border-color:#c7c7cc!important;background:#fff!important;color:#1d1d1f!important;border-radius:9px!important;box-shadow:none!important}input:focus,select:focus,textarea:focus{border-color:#007aff!important;box-shadow:0 0 0 3px rgba(0,122,255,.16)!important}.crm-more{border-color:#e5e5ea!important;background:#f9f9fb!important}.crm-more[open] summary{border-bottom-color:#e5e5ea!important}.student-toolbar{background:#fff!important}.empty-state{background:#fff!important;border-color:#d8d8de!important}.login-view{background-color:#f5f5f7!important}.login-view::before{background:linear-gradient(90deg,rgba(245,245,247,.94) 0%,rgba(245,245,247,.78) 45%,rgba(245,245,247,.38) 100%)!important}.login-card{background:rgba(255,255,255,.88)!important;border-color:rgba(209,209,214,.85)!important;box-shadow:none!important}.login-mark{background:#1d1d1f!important}.login-card::before{background:#007aff!important}.login-card::after{background:#f2f2f7!important;border:1px solid #e5e5ea!important;box-shadow:none!important}@media(max-width:900px){aside{background:#f7f7f9!important}.summary div{border-radius:10px!important}}

/* CRM final pass: default to a clean list, reveal the editor only on intent. */
#leadsView header{align-items:center;gap:18px}
#leadCreateTop{height:42px;min-width:104px;padding:0 18px;border-radius:12px;box-shadow:0 10px 24px rgba(0,122,255,.18)}
#leadForm[hidden]{display:none!important}
#leadsView .crm-workspace{grid-template-columns:minmax(0,1fr)!important;align-items:start!important}
#leadsView .crm-workspace.is-editing{grid-template-columns:minmax(420px,520px) minmax(0,1fr)!important}
#leadsView .crm-workspace.is-editing .crm-editor{position:sticky!important;top:18px!important;max-height:calc(100vh - 48px);overflow:auto}
#leadsView .crm-editor{border-color:#e5e7eb!important;border-radius:16px!important;background:#fff!important;box-shadow:0 18px 46px rgba(15,23,42,.06)!important}
#leadsView .crm-editor .panel-title{background:#fff!important}
#leadsView .crm-list-panel{border-color:#e5e7eb!important;border-radius:16px!important;background:#fff!important;box-shadow:0 18px 46px rgba(15,23,42,.05)!important}
#leadsView .student-toolbar{gap:10px!important;padding:16px!important;border-bottom:1px solid #eef2f7!important;background:#fff!important}
#leadsView .student-toolbar select,#leadsView .student-toolbar input{height:40px!important;border-radius:10px!important;background:#f8fafc!important}
#leadsView #leadRows{padding:14px!important}
#leadsView .lead-card-pro{border:1px solid #e8edf3!important;border-radius:14px!important;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%)!important;box-shadow:none!important}
#leadsView .lead-card-pro+.lead-card-pro{margin-top:12px!important}
#leadsView .lead-actions{justify-content:flex-end!important;gap:8px!important}
#leadsView .lead-actions button{min-width:72px!important;height:36px!important;border-radius:10px!important}
#leadsView .lead-converted{display:inline-flex;align-items:center;height:36px;padding:0 12px;border:1px solid #b7e3c8;border-radius:10px;background:#edf9f2;color:#248a3d;font-size:13px;font-weight:750}#leadsView .lead-converted.warning{border-color:#ffd28a;background:#fff8e8;color:#a15c00}#leadsView .lead-converted.danger{border-color:#f3c7c2;background:#fff0ef;color:#d70015}
#leadsView .lead-more-actions{position:relative}
#leadsView .lead-more-actions summary{display:flex;align-items:center;justify-content:center;min-width:64px;height:36px;padding:0 12px;border:1px solid #d1d1d6;border-radius:10px;background:#fff;color:#3a3a3c;cursor:pointer;font-size:13px;font-weight:700;list-style:none}
#leadsView .lead-more-actions summary::-webkit-details-marker{display:none}
#leadsView .lead-more-actions[open] summary{border-color:#007aff;background:#eaf3ff;color:#0057c2}
#leadsView .lead-more-actions>div{position:absolute;right:0;z-index:5;display:grid;gap:6px;min-width:142px;margin-top:6px;padding:8px;border:1px solid #d8d8de;border-radius:12px;background:#fff;box-shadow:0 10px 28px rgba(29,29,31,.14)}
#leadsView .lead-more-actions>div button{width:100%;min-width:0!important;justify-content:flex-start;padding:0 10px;text-align:left}
@media (max-width:1100px){#leadsView .crm-workspace.is-editing{grid-template-columns:1fr!important}#leadsView .crm-workspace.is-editing .crm-editor{position:static!important;max-height:none}}

/* Student final pass: default list first, reveal entitlement form only on intent. */
#studentsView header{align-items:center;gap:18px}
#studentCreateTop{height:42px;min-width:104px;padding:0 18px;border-radius:12px;box-shadow:0 10px 24px rgba(0,122,255,.18)}
#studentForm[hidden]{display:none!important}
#studentsView .student-workspace{grid-template-columns:minmax(0,1fr)!important;align-items:start!important}
#studentsView .student-workspace.is-editing{grid-template-columns:minmax(380px,500px) minmax(0,1fr)!important}
#studentsView .student-workspace.is-editing .student-editor{position:sticky!important;top:18px!important;max-height:calc(100vh - 48px);overflow:auto}
#studentsView .student-editor{border:1px solid #e5e7eb!important;border-radius:16px!important;background:#fff!important;box-shadow:0 18px 46px rgba(15,23,42,.06)!important;overflow:hidden}
#studentsView .student-list-panel{border:1px solid #e5e7eb!important;border-radius:16px!important;background:#fff!important;box-shadow:0 18px 46px rgba(15,23,42,.05)!important}
#studentsView .student-fields textarea{min-height:160px!important}
#studentsView .student-toolbar{gap:10px!important;padding:16px!important;border-bottom:1px solid #eef2f7!important;background:#fff!important}
#studentsView .student-toolbar select,#studentsView .student-toolbar input{height:40px!important;border-radius:10px!important;background:#f8fafc!important}
#studentsView table{border-collapse:separate!important;border-spacing:0!important}
#studentsView tbody tr:hover{background:#f8fafc!important}
@media (max-width:1100px){#studentsView .student-workspace.is-editing{grid-template-columns:1fr!important}#studentsView .student-workspace.is-editing .student-editor{position:static!important;max-height:none}}


/* Staff admin: list-first workflow, edit only after intent. */
#staffView header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
#staffCreateTop{min-height:42px;padding:0 18px;border:0;border-radius:10px;background:#1677ff;color:#fff;font-weight:800;box-shadow:0 10px 22px rgba(22,119,255,.18)}
#staffForm[hidden]{display:none!important}
#staffView .staff-workspace{grid-template-columns:1fr!important}
#staffView .staff-workspace.is-editing{grid-template-columns:minmax(380px,500px) minmax(0,1fr)!important}
#staffView .crm-list-panel{min-height:360px}
#staffView .staff-card{border-left:3px solid #1677ff;background:linear-gradient(180deg,#fff,#fbfdff)}
#staffQuotaField small{color:#6e6e73;font-size:12px;line-height:1.45}
.crm-quota-hint{margin:0 0 14px;padding:10px 14px;border:1px solid #b9e5d0;border-radius:12px;background:#f0fbf5;color:#126b49;font-size:14px;font-weight:650;line-height:1.5}
.crm-quota-hint.is-exhausted{border-color:#ffd2cc;background:#fff5f3;color:#b42318}
@media(max-width:980px){#staffView header{display:grid}#staffCreateTop{width:100%}#staffView .staff-workspace.is-editing{grid-template-columns:1fr!important}}

/* Question bank readiness and import structure. */
#banksView header{align-items:center;gap:18px}
.bank-header-actions{display:flex;align-items:center;gap:10px}
.bank-header-actions button{min-height:42px;padding:0 16px;border:1px solid #d1d1d6;border-radius:10px;background:#fff;color:#1d1d1f;font-weight:800}
.bank-header-actions .primary{border-color:#007aff;background:#007aff;color:#fff}
.bank-workspace{display:grid;grid-template-columns:minmax(340px,430px) minmax(0,1fr);gap:18px;align-items:start}
.bank-readiness,.bank-schema{border:1px solid #d8d8de;border-radius:14px;background:#fff;overflow:hidden}
.bank-status-card{display:grid;grid-template-columns:28px 1fr;gap:14px;padding:20px;border-bottom:1px solid #e5e5ea;background:#fbfbfd}
.bank-status-dot{width:22px;height:22px;margin-top:1px;border-radius:8px;background:linear-gradient(135deg,#007aff,#5ac8fa);box-shadow:none}
.bank-status-card strong,.bank-checklist strong,.bank-upload-card strong{display:block;color:#1d1d1f;font-size:16px}
.bank-status-card p{margin:7px 0 0;color:#6e6e73;line-height:1.65}
.bank-upload-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;margin:16px;padding:16px;border:1px dashed #c7d7ee;border-radius:13px;background:#f7fbff}
.bank-upload-icon{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#eaf3ff,#fff);position:relative;box-shadow:inset 0 0 0 1px #dbeaff}
.bank-upload-icon::before{content:"";position:absolute;left:13px;top:12px;width:16px;height:18px;border:2px solid #007aff;border-radius:4px}
.bank-upload-icon::after{content:"";position:absolute;left:18px;top:18px;width:8px;height:8px;border-left:2px solid #007aff;border-top:2px solid #007aff;transform:rotate(45deg)}
.bank-upload-card small{display:block;margin-top:5px;color:#6e6e73;line-height:1.55}
.bank-upload-card button{height:36px;padding:0 13px;border:1px solid #d1d1d6;border-radius:9px;background:#fff;color:#007aff;font-weight:800}
.bank-checklist{padding:0 20px 20px}
.bank-checklist ul{display:grid;gap:9px;margin:12px 0 0;padding:0;list-style:none;color:#3a3a3c;line-height:1.55}
.bank-checklist li{position:relative;padding-left:20px}
.bank-checklist li::before{content:"";position:absolute;left:0;top:.62em;width:7px;height:7px;border-radius:999px;background:#34c759}
.bank-schema .panel-title{display:grid;grid-template-columns:160px 1fr;gap:12px;align-items:start;padding:18px 20px;border-bottom:1px solid #e5e5ea;background:#fbfbfd}
.bank-schema .panel-title small{max-width:none;line-height:1.55}
.bank-schema table{width:100%;border-collapse:collapse}
.bank-schema th,.bank-schema td{padding:13px 16px;border-bottom:1px solid #edf1f5;text-align:left;font-size:13px;vertical-align:top}
.bank-schema th{color:#5f6672;background:#f8f9fb;font-weight:800}
.bank-schema td:first-child{color:#007aff;font-weight:800;white-space:nowrap}
@media(max-width:980px){#banksView header{display:grid}.bank-header-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.bank-workspace{grid-template-columns:1fr}.bank-schema{overflow:auto}.bank-schema .panel-title{grid-template-columns:1fr}.bank-upload-card{grid-template-columns:42px 1fr}.bank-upload-card button{grid-column:1/-1}}

/* Backend delivery pass: CRM is now list-first, with safer destructive actions. */
#leadsView .summary{
  grid-template-columns:repeat(6,minmax(132px,1fr))!important;
}
#leadsView .summary .summary-secondary{
  opacity:.78;
}
#leadsView .summary .summary-secondary b{
  font-size:20px!important;
}
#leadsView .summary .summary-secondary::before{
  opacity:.72;
}
#leadsView .crm-list-panel{
  overflow:hidden!important;
}
#leadsView .student-toolbar{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(132px,180px)) minmax(220px,1fr) auto!important;
  align-items:center!important;
}
#leadsView .student-toolbar button{
  height:40px!important;
  border-radius:10px!important;
}
#leadsView .quick-filters{
  margin:0 0 12px!important;
}
#leadsView .quick-filters button{
  height:36px!important;
  padding:0 14px!important;
}
#leadsView .lead-card-pro{
  padding:16px!important;
}
#leadsView .lead-head{
  align-items:center!important;
}
#leadsView .lead-title-block strong{
  font-size:17px!important;
}
#leadsView .lead-meta{
  margin-top:4px!important;
}
#leadsView .lead-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
#leadsView .lead-kpis span{
  padding:9px 10px!important;
  border-radius:10px!important;
  background:#fafafa!important;
}
#leadsView .lead-note-line{
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
}
#leadsView .lead-actions .danger-outline{
  border-color:#ffd2cc!important;
  background:#fff!important;
  color:#d70015!important;
}
#leadsView .lead-actions .danger-outline:hover{
  background:#fff0ef!important;
  border-color:#ffb4ab!important;
}
#leadsView .lead-actions .danger-outline:disabled{
  border-color:#e5e5ea!important;
  background:#f8f8fa!important;
  color:#a1a1a6!important;
}
#leadsView .lead-actions .danger-outline::before{
  background:#d70015!important;
}

/* The CRM editor reduces the list panel width. Keep all filters and refresh
   action in that panel instead of letting the final grid column be clipped. */
#leadsView .crm-list-panel .student-toolbar{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}
#leadsView .crm-list-panel .student-toolbar select{
  flex:1 1 140px!important;
  min-width:0!important;
}
#leadsView .crm-list-panel .student-toolbar #leadSearch{
  flex:2 1 220px!important;
  min-width:160px!important;
}
#leadsView .crm-list-panel .student-toolbar #refreshLeads{
  flex:0 0 auto!important;
  min-width:76px!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  #leadsView .crm-list-panel .student-toolbar #leadSearch,
  #leadsView .crm-list-panel .student-toolbar #refreshLeads{flex:1 1 100%!important}
}

/* Keep CRM secondary actions inside the current customer card. The old popover
   opened below the action row and was clipped by the list panel on employee
   accounts, making "更多" appear to do nothing. */
#leadsView .lead-more-actions{
  flex:0 0 auto;
  min-width:0;
}
#leadsView .lead-more-actions[open]{
  flex:1 0 100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:10px;
  border:1px solid #dbe7f4;
  border-radius:12px;
  background:#f8fbff;
}
#leadsView .lead-more-actions[open] summary{
  grid-column:2;
  grid-row:1;
}
#leadsView .lead-more-actions[open]>div{
  position:static;
  grid-column:1/-1;
  grid-row:2;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
#leadsView .lead-more-actions[open]>div button{
  min-height:36px;
  white-space:nowrap;
}

@media(max-width:1280px){
  #leadsView .summary{grid-template-columns:repeat(4,minmax(132px,1fr))!important}
  #leadsView .student-toolbar{grid-template-columns:repeat(3,minmax(132px,1fr))!important}
  #leadsView .student-toolbar input{grid-column:1/-2!important}
}
@media(max-width:760px){
  #leadsView .summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #leadsView .student-toolbar{grid-template-columns:1fr!important}
  #leadsView .student-toolbar input{grid-column:auto!important}
  #leadsView .lead-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #leadsView .lead-actions{grid-template-columns:1fr 1fr!important}
  #leadsView .lead-more-actions[open]{grid-column:1/-1}
  #leadsView .lead-more-actions[open]>div{grid-template-columns:1fr}
}

/* CRM modal interactions: replace browser prompt/alert with first-class workflows. */
#leadFollowModal .modal-panel,
#leadHistoryModal .modal-panel{
  width:min(620px,calc(100vw - 32px))!important;
}
#leadFollowModal .crm-fields{
  grid-template-columns:1fr 1fr!important;
}
#leadFollowModal .crm-fields .wide{
  grid-column:1/-1!important;
}
#leadFollowModal textarea{
  min-height:132px!important;
  resize:vertical;
}
.quiet-close{
  height:34px;
  padding:0 12px;
  border:1px solid #d1d1d6;
  border-radius:9px;
  background:#fff;
  color:#3a3a3c;
  font-weight:800;
}
.quiet-close:hover{
  background:#f2f2f7;
}
.history-panel{
  max-height:min(720px,calc(100vh - 40px));
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}
.history-list{
  display:grid;
  gap:10px;
  max-height:calc(100vh - 160px);
  overflow:auto;
  padding:14px;
  background:#f8f8fa;
}
.history-item{
  display:grid;
  gap:8px;
  padding:14px;
  border:1px solid #e5e5ea;
  border-radius:12px;
  background:#fff;
}
.history-item div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.history-item strong{
  color:#1d1d1f;
  font-size:13px;
}
.history-item span,
.history-item small{
  color:#6e6e73;
  font-size:12px;
  font-weight:700;
}
.history-item p{
  margin:0;
  color:#2f3033;
  line-height:1.65;
  white-space:pre-wrap;
}
.history-empty{
  min-height:220px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:8px;
  border:1px dashed #d1d1d6;
  border-radius:12px;
  background:#fff;
  text-align:center;
}
.history-empty strong{
  color:#1d1d1f;
}
.history-empty span{
  color:#6e6e73;
}
@media(max-width:640px){
  #leadFollowModal .crm-fields{grid-template-columns:1fr!important}
  #leadHistoryModal .panel-title{display:grid!important;gap:12px!important}
  .quiet-close{width:100%}
}

/* Admin nav icon system v2: consistent line icons instead of decorative blocks. */
nav button{
  gap:11px!important;
}
nav button::before{
  content:""!important;
  width:21px!important;
  height:21px!important;
  flex:0 0 21px!important;
  border-radius:0!important;
  background:#8e8e93!important;
  box-shadow:none!important;
  -webkit-mask:var(--nav-icon) center/21px 21px no-repeat!important;
  mask:var(--nav-icon) center/21px 21px no-repeat!important;
}
nav button[data-view]::before{
  background:#8e8e93!important;
}
nav button:hover::before,
nav button.active::before,
nav button[data-view]:hover::before,
nav button[data-view].active::before{
  background:#007aff!important;
}
nav button[data-view="tenants"]{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-3'/%3E%3Cpath d='M9 9h.01M9 13h.01M9 17h.01M14 13h.01M14 17h.01'/%3E%3C/svg%3E");
}
nav button[data-view="students"]{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9.5' cy='7' r='4'/%3E%3Cpath d='m16 11 2 2 4-4'/%3E%3C/svg%3E");
}
nav button[data-view="banks"]{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5z'/%3E%3Cpath d='M8 7h8M8 11h6'/%3E%3C/svg%3E");
}
nav button[data-view="leads"]{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='17' rx='2'/%3E%3Cpath d='M9 2h6v4H9z'/%3E%3Cpath d='M8 11h8M8 15h5'/%3E%3C/svg%3E");
}
nav button[data-view="staff"]{
  --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* Admin SVG icon override: keep the final loaded stylesheet aligned with index.html symbols. */
nav button::before,
.summary div::before,
.summary div::after,
.bank-upload-icon::before,
.bank-upload-icon::after{
  display:none!important;
}
.admin-icon,
.metric-icon,
.bank-upload-icon{
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
nav button .admin-icon{
  width:24px;
  height:24px;
  padding:5px;
  border-radius:8px;
  background:#fff;
  color:#007aff;
}
nav button[data-view="students"] .admin-icon{color:#34c759}
nav button[data-view="banks"] .admin-icon{color:#00a9ce}
nav button[data-view="leads"] .admin-icon{color:#ff9500}
nav button[data-view="staff"] .admin-icon{color:#af52de}
nav button.active .admin-icon{
  background:#007aff;
  color:#fff;
}
nav button span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.summary div{
  grid-template-columns:44px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  column-gap:12px!important;
  min-height:88px!important;
}
.metric-icon{
  grid-row:1/3;
  width:44px;
  height:44px;
  padding:10px;
  border-radius:14px;
  color:#007aff;
  background:#edf5ff;
}
.metric-icon.tone-green{color:#1f9d5b;background:#edf9f2}
.metric-icon.tone-orange{color:#ff8a00;background:#fff6e8}
.metric-icon.tone-purple{color:#8e5cf7;background:#f4efff}
.metric-icon.tone-red{color:#ff3b30;background:#fff0ef}
.metric-icon.tone-blue{color:#007aff;background:#edf5ff}
.summary b,
.summary span{
  grid-column:2;
}
.bank-upload-icon{
  width:44px!important;
  height:44px!important;
  padding:10px!important;
  border-radius:14px!important;
  color:#007aff!important;
  background:#edf5ff!important;
  box-shadow:none!important;
}
@media(max-width:900px){
  nav button .admin-icon{
    width:22px;
    height:22px;
    padding:4px;
  }
  .summary div{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .metric-icon{
    width:40px;
    height:40px;
    padding:9px;
  }
}

/* 学员资格生命周期：状态、续期与分页 */
#studentsView .summary{
  grid-template-columns:repeat(5,minmax(132px,1fr))!important;
}
#studentsView .student-toolbar{
  display:grid!important;
  grid-template-columns:180px 160px minmax(220px,1fr) auto auto!important;
  gap:10px!important;
}
#studentsView .student-toolbar select,
#studentsView .student-toolbar input,
#studentsView .student-toolbar button{
  min-height:40px;
}
.entitlement-state{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.entitlement-state.active{color:#16884b;background:#e9f8ef}
.entitlement-state.expiring{color:#a85b00;background:#fff3df}
.entitlement-state.expired{color:#d84339;background:#ffebea}
.entitlement-state.disabled{color:#667085;background:#f1f3f5}
.entitlement-expiry{font-variant-numeric:tabular-nums}
.entitlement-expiry.muted{color:#667085}
.expiry-reminder{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid #f4d38f;
  border-radius:12px;
  background:#fffaf0;
  color:#6d4500;
}
.expiry-reminder-copy{display:flex;align-items:flex-start;gap:11px;min-width:0}
.expiry-reminder-copy svg{width:22px;height:22px;flex:0 0 22px;color:#c77700;fill:none;stroke:currentColor;stroke-width:2}
.expiry-reminder-copy strong{display:block;font-size:14px}
.expiry-reminder-copy span{display:block;margin-top:3px;font-size:13px;line-height:1.55;color:#7a5a20}
.expiry-reminder button{min-height:36px;flex:0 0 auto;background:#fff;color:#9a6100;border:1px solid #e5b655}
.student-select-cell{width:42px;text-align:center!important;padding-left:10px!important;padding-right:4px!important}
.student-select{width:16px;height:16px;accent-color:#176b4d;cursor:pointer}
.student-pagination{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-height:58px;
  padding:12px 2px 0;
  color:#667085;
  font-size:13px;
}
.student-pagination #studentPagerText{margin-right:auto}
.student-pagination label{display:flex;align-items:center;gap:5px;white-space:nowrap}
.student-pagination select{
  width:66px;
  min-height:34px;
  padding:0 7px;
}
.student-pagination button{
  min-width:68px;
  min-height:34px;
  padding:0 10px;
}
.student-pagination button:disabled{opacity:.45;cursor:not-allowed}
.compact-modal{width:min(520px,calc(100vw - 32px))!important}
#renewStudentModal .compact-modal,
#batchRenewalModal .compact-modal{
  max-height:calc(100vh - 40px);
  max-height:calc(100dvh - 40px);
  padding:24px;
  overflow:auto;
}
#renewStudentModal .modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
#renewStudentModal .modal-header strong{display:block;font-size:19px;color:#172b4d}
#renewStudentModal .modal-header small{display:block;margin-top:7px;color:#667085}
.quiet-close{background:#f3f5f7!important;color:#344054!important}
.renew-date-field{display:grid;gap:8px;color:#344054;font-weight:700}
.renew-date-field input{min-height:44px;padding:0 12px}
.renew-date-field small{font-weight:400;line-height:1.6;color:#667085}
#renewStudentModal .actions{margin-top:24px;justify-content:flex-end}
#batchRenewalModal .modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
#batchRenewalModal .modal-header strong{display:block;font-size:19px;color:#172b4d}
#batchRenewalModal .modal-header small{display:block;margin-top:7px;color:#667085;line-height:1.55}
#batchRenewalModal .actions{margin-top:24px;justify-content:flex-end}
@media(max-width:700px){
  #renewStudentModal .compact-modal,
  #batchRenewalModal .compact-modal{
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - 16px);
    padding:20px;
  }
}
@media(max-width:1180px){
  #studentsView .summary{grid-template-columns:repeat(3,minmax(160px,1fr))!important}
}
@media(max-width:900px){
  #studentsView .student-toolbar{grid-template-columns:1fr 1fr!important}
  #studentsView .student-toolbar input{grid-column:1/-1}
  #studentsView .student-toolbar button{grid-column:1/-1}
  .student-pagination{flex-wrap:wrap;justify-content:flex-start}
  .student-pagination #studentPagerText{width:100%;margin-right:0}
}

/* Operations overview: keep actionable populations scan-friendly as data grows. */
#dashboardView .dashboard-summary{
  grid-template-columns:repeat(auto-fit,minmax(156px,1fr))!important;
}
#dashboardView .dashboard-task{
  transition:border-color .16s ease,background-color .16s ease,transform .16s ease;
}
#dashboardView .dashboard-task:hover{
  border-color:#b8cce6;
  background:#f7fbff;
  transform:translateY(-1px);
}

/* Entitlement list: six controls fit on desktop and retain a clear hierarchy on narrow screens. */
#studentsView .student-toolbar{
  grid-template-columns:150px 145px 155px minmax(220px,1fr) auto auto!important;
}
.learning-state{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.learning-state.active{color:#176b4d;background:#e9f8ef}
.learning-state.unstarted{color:#536273;background:#eef2f6}
.learning-state.inactive{color:#a85b00;background:#fff3df}
.learning-state.unbound{color:#667085;background:#f1f3f5}

@media(max-width:1280px){
  #studentsView .student-toolbar{grid-template-columns:repeat(3,minmax(150px,1fr))!important}
  #studentsView .student-toolbar input{grid-column:1/-1!important}
}
@media(max-width:900px){
  #studentsView .student-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #studentsView .student-toolbar button{grid-column:auto!important}
}
@media(max-width:600px){
  #studentsView .student-toolbar{grid-template-columns:1fr!important}
  #studentsView .student-toolbar input,
  #studentsView .student-toolbar button{grid-column:auto!important}
  #studentRows td.student-select-cell{display:flex!important;justify-content:flex-end;padding:0 0 8px!important}
  #studentRows td.student-select-cell::before{display:none!important}
  #studentRows td:nth-child(2)::before{content:"学员"!important}
  #studentRows td:nth-child(3)::before{content:"手机号"!important}
  #studentRows td:nth-child(4)::before{content:"报考项目"!important}
  #studentRows td:nth-child(5)::before{content:"课程方向"!important}
  #studentRows td:nth-child(6)::before{content:"来源"!important}
  #studentRows td:nth-child(7)::before{content:"负责人"!important}
  #studentRows td:nth-child(8)::before{content:"所属机构"!important}
  #studentRows td:nth-child(9)::before{content:"有效期"!important}
  #studentRows td:nth-child(10)::before{content:"资格状态"!important}
  #studentRows td:nth-child(11)::before{content:"学习状态"!important}
  #studentRows td:nth-child(12)::before{content:"微信登录"!important}
  #studentRows td:nth-child(13)::before{content:"操作"!important}
}

/* CRM 2.1: sales is a personal action queue, not a reduced operations dashboard. */
#dashboardView .dashboard-summary [data-dashboard-sales-metric]{display:grid}
#dashboardView .dashboard-actions [data-dashboard-sales-action]{display:flex}
#dashboardView .dashboard-actions [data-dashboard-operations-action][hidden],
#dashboardView .dashboard-actions [data-dashboard-sales-action][hidden],
#dashboardView .dashboard-summary [data-dashboard-sales-metric][hidden]{display:none!important}
#dashboardView .dashboard-actions{grid-template-columns:repeat(auto-fit,minmax(132px,1fr))}
#dashboardView .dashboard-panel .panel-title small{max-width:430px;line-height:1.55}
@media(max-width:900px){
  #dashboardView .dashboard-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.entitlement-review-note{display:block;max-width:220px;margin-top:7px;color:#9f2d2d;font-size:11px;line-height:1.5;white-space:normal}
.entitlement-review-note b{font-weight:800}
.entitlement-review-note em{display:block;margin-top:2px;color:#8a6b6b;font-style:normal}
.entitlement-review-detail{margin-top:12px;padding:12px 14px;border:1px solid #f1c4c4;border-radius:10px;background:#fff7f7;color:#7d2929}
.entitlement-review-detail p{margin:5px 0;white-space:pre-wrap}
.entitlement-review-detail small{color:#956565}
.lead-qualification-rejection{display:grid;gap:4px;padding:11px 13px;border:1px solid #f1c4c4;border-radius:10px;background:#fff7f7;color:#7d2929}
.lead-qualification-rejection b{font-size:13px}
.lead-qualification-rejection span{line-height:1.55;white-space:pre-wrap}
.lead-qualification-rejection small{color:#956565}
