:root{font-family:system-ui,"Microsoft YaHei",sans-serif;color:#17231e;background:#f3f6f4;letter-spacing:0}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;display:grid;grid-template-columns:220px 1fr;min-height:100vh}body.login-mode{display:block;grid-template-columns:none}body.login-mode aside,body.login-mode main{display:none!important}body.login-mode #loginView{display:grid!important}button,input,select{font:inherit}button{cursor:pointer;border:0}button:disabled{cursor:not-allowed;opacity:.46}aside{display:flex;flex-direction:column;padding:24px 16px;background:#17231e;color:#fff}.brand{display:flex;align-items:center;gap:12px;padding:0 8px 26px}.brand>span{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#4fc47b;font-size:20px;font-weight:800}.brand strong,.brand small{display:block}.brand small{margin-top:3px;color:#aebbb5;font-size:12px}nav{display:grid;gap:6px}nav button{padding:11px 14px;border-radius:7px;background:transparent;color:#afbbb5;text-align:left}nav button.active{background:#26372f;color:#fff;font-weight:700}.company{margin-top:auto;padding:16px 8px 0;border-top:1px solid #304038;color:#91a098;font-size:12px;line-height:1.6}main{min-width:0;padding:28px 32px}header{display:flex;align-items:center;justify-content:space-between}h1{margin:0;font-size:26px}p{margin:6px 0 0;color:#586860;font-size:14px}.primary{border-radius:7px;background:#16724d!important;color:#fff!important;font-weight:700}.primary:hover{background:#105f3f!important}.primary:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8fd4ae;outline-offset:2px}header button{padding:11px 18px}.summary{display:flex;gap:0;margin-top:24px;border-bottom:1px solid #d9e0dc;background:#fff}.summary div{min-width:170px;padding:18px 22px;border-right:1px solid #e2e7e4}.summary b,.summary span{display:block}.summary b{font-size:24px}.summary span{margin-top:4px;color:#617068;font-size:12px}#notice{min-height:36px;padding:10px 0;color:#176b4d;font-size:13px}.workspace{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(520px,1.25fr);gap:18px}.list-panel,.editor{background:#fff}.panel-title,.editor-title{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #e0e6e3}.panel-title input{width:150px}.tenant-list{max-height:650px;overflow:auto}.tenant-row{width:100%;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid #edf0ee;background:#fff;text-align:left}.tenant-row:hover,.tenant-row.selected{background:#eef7f2}.mark{display:grid;place-items:center;width:36px;height:36px;border-radius:7px;color:#fff;font-weight:800}.tenant-row strong,.tenant-row small{display:block}.tenant-row small,.editor-title small{margin-top:4px;color:#67766e}.tag{padding:4px 8px;border-radius:999px;background:#e6f4eb;color:#176b4d;font-size:12px}.editor-title>div>*{display:block}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px}.fields label{display:grid;gap:7px;color:#3e4c45;font-size:13px}.fields .wide{grid-column:1/-1}input,select{width:100%;height:40px;padding:0 11px;border:1px solid #c8d2cd;border-radius:6px;background:#fff;color:#17231e}input[type=color]{padding:4px}.actions{display:flex;gap:10px;padding:0 20px 20px}.actions button{padding:10px 16px;border-radius:7px;background:#edf1ef;color:#26362e}.batch-tools{display:grid;grid-template-columns:1fr 120px 130px auto;align-items:end;gap:12px;margin:0 20px 16px;padding:16px;border-top:1px solid #e0e6e3;background:#f6f8f7}.batch-tools>div strong,.batch-tools>div small{display:block}.batch-tools>div small{margin-top:4px;color:#67766e}.batch-tools label{display:grid;gap:6px;color:#3e4c45;font-size:12px}.batch-tools button{height:40px;padding:0 16px;border-radius:7px;background:#26372f;color:#fff;font-weight:700}.code-result{margin:0 20px 20px;padding:14px;border-radius:7px;background:#edf7f1;color:#155c40}.code-result strong{font-size:18px;letter-spacing:1px}.code-result a{display:inline-block;margin-top:8px;color:#0e6743;font-weight:700}@media(max-width:1100px){.batch-tools{grid-template-columns:1fr 1fr}.batch-tools>div{grid-column:1/-1}}@media(max-width:900px){body:not(.login-mode){grid-template-columns:1fr}body:not(.login-mode) aside{display:none}main{padding:20px}.workspace{grid-template-columns:1fr}.summary{overflow:auto}.editor{order:-1}}@media(max-width:600px){.batch-tools{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Mobile admin adaptation */
@media(max-width:900px){
  body{display:block;min-height:100vh;background:#f3f6f4}
  aside{position:sticky;top:0;z-index:10;display:block;padding:12px 14px;background:#17231e;box-shadow:0 2px 8px rgba(18,31,25,.12)}
  .brand{padding:0;gap:10px}
  .brand>span{width:34px;height:34px;border-radius:8px;font-size:17px}
  .brand strong{font-size:15px}.brand small{font-size:11px}
  nav{display:flex;gap:8px;margin-top:12px;overflow-x:auto;padding-bottom:2px}
  nav button{flex:0 0 auto;min-height:42px;padding:0 14px;border-radius:7px;background:#22332b;color:#d6e0db;text-align:center;white-space:nowrap}
  nav button.active{background:#45b873;color:#fff}
  .company{margin-top:10px;padding:10px 0 0;font-size:11px}
  main{padding:14px 12px 28px}
  header{align-items:flex-start;gap:12px}
  h1{font-size:22px;line-height:1.25}p{font-size:13px;line-height:1.5}
  header button{min-height:42px;padding:0 13px;white-space:nowrap}
  .summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:14px;border:1px solid #dce4df;border-radius:8px;overflow:hidden}
  .summary div{min-width:0;padding:12px 10px;border-right:1px solid #e2e7e4}.summary div:last-child{border-right:0}
  .summary b{font-size:20px}.summary span{font-size:11px}
  #notice,#studentNotice{min-height:30px;padding:8px 2px}
  .workspace,.student-workspace{display:block}
  .list-panel,.editor,.student-editor,.student-list-panel{border:1px solid #dde5e0;border-radius:8px;overflow:hidden;background:#fff}
  .editor,.student-list-panel{margin-top:12px}
  .panel-title,.editor-title{display:block;padding:14px 14px}.panel-title input{width:100%;margin-top:10px}
  .tenant-list{max-height:none}.tenant-row{grid-template-columns:38px 1fr;gap:10px;padding:14px}.tenant-row .tag{grid-column:2;justify-self:start}
  .fields,.student-fields{grid-template-columns:1fr;padding:14px;gap:12px}.fields .wide,.student-fields .wide{grid-column:auto}
  input,select{height:44px;font-size:16px}textarea{font-size:16px;min-height:180px}
  .actions{padding:0 14px 14px}.actions button{min-height:44px;flex:1}
  .privacy-tip{padding:0 14px 14px}
}

.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:18px;margin-top:18px}
.dashboard-panel{padding:20px;border:1px solid #e5ebf2;border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(24,39,58,.04)}
.dashboard-list{display:grid;gap:10px;margin-top:16px}
.dashboard-task{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 14px;align-items:center;padding:13px 14px;border:1px solid #e7edf4;border-radius:12px;background:#fbfcfe;text-align:left}
.dashboard-task span{overflow:hidden;color:#1d2939;font-weight:750;text-overflow:ellipsis;white-space:nowrap}
.dashboard-task small{overflow:hidden;color:#667085;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.dashboard-task b{grid-column:2;grid-row:1/3;color:#176b4d;font-size:12px}
.dashboard-actions{display:grid;gap:10px;margin-top:16px}
.dashboard-actions button{display:grid;grid-template-columns:46px 1fr;align-items:center;gap:12px;min-height:68px;padding:10px 14px;border:1px solid #e5ebf2;border-radius:12px;background:#fbfcfe;text-align:left}
.dashboard-actions strong{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#edf5ff;color:#176b4d;font-size:18px}
.dashboard-actions span{color:#344054;font-size:14px;font-weight:700}
.dashboard-empty{display:grid;gap:5px;padding:28px 12px;color:#667085;text-align:center}.dashboard-empty strong{color:#1d2939}
.tenant-seat-risk{display:inline-block;margin-top:4px;font-size:12px;font-style:normal;color:#667085}.tenant-seat-risk.warning{color:#b54708}.tenant-seat-risk.danger{color:#b42318;font-weight:750}
@media(max-width:900px){.dashboard-grid{grid-template-columns:1fr}.dashboard-summary{grid-template-columns:repeat(2,1fr)}}

@media(max-width:700px){
  .student-toolbar{display:grid;grid-template-columns:1fr;gap:10px;padding:12px}
  .student-toolbar button{min-height:42px}
  .table-wrap{overflow:visible}
  table,thead,tbody,tr,th,td{display:block;width:100%}
  thead{display:none}
  .student-list-panel table{min-width:0;border-collapse:separate;border-spacing:0 10px;padding:10px;background:#f3f6f4}
  #studentRows tr{padding:13px 14px;border:1px solid #dce4df;border-radius:8px;background:#fff}
  #studentRows td{display:grid;grid-template-columns:86px 1fr;gap:10px;padding:7px 0;border:0;font-size:14px}
  #studentRows td::before{color:#617068;font-size:12px;font-weight:700}
  #studentRows td:nth-child(1)::before{content:"学员"}
  #studentRows td:nth-child(2)::before{content:"手机号"}
  #studentRows td:nth-child(3)::before{content:"机构"}
  #studentRows td:nth-child(4)::before{content:"有效期"}
  #studentRows td:nth-child(5)::before{content:"微信"}
  #studentRows td:nth-child(6)::before{content:"操作"}
  .text-action{min-height:36px;padding:0 10px;border-radius:6px;background:#fff1f1;color:#b42318}
  .empty-cell{display:block!important;text-align:center!important;padding:18px!important}
}

/* In-page login for WeChat browser */
.login-view{min-height:100vh;display:grid;place-items:center;padding:28px 16px;background:#eef4f0}
.login-card{width:min(420px,100%);display:grid;gap:14px;padding:28px;border:1px solid #d9e5df;border-radius:10px;background:#fff;box-shadow:0 8px 24px rgba(25,43,34,.08)}
.login-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:10px;background:#16724d;color:#fff;font-size:22px;font-weight:800}
.login-card h1{font-size:24px;margin:4px 0 0}.login-card p{margin:0 0 6px}.login-card label{display:grid;gap:7px;color:#3e4c45;font-size:13px}.login-card input{height:46px;font-size:16px}.login-card button{height:46px}.login-card #loginNotice{min-height:22px;color:#b42318;font-size:13px}.company button{display:block;margin-top:10px;padding:7px 10px;border-radius:6px;background:#26372f;color:#d6e0db;font-size:12px}
@media(max-width:900px){.login-view{place-items:start center;padding-top:56px}.login-card{padding:22px;border-radius:8px;box-shadow:none}.company button{width:100%;height:36px}}

/* Taste pass: calmer product shell, stronger contrast, cleaner mobile management */
body{background:#eef2ef;color:#14231d}
aside{background:#12231b}
.brand>span,.login-mark{background:#0f744d}
nav button{transition:background-color .18s ease,color .18s ease,transform .18s ease}
nav button:hover{background:#21372c;color:#fff}
nav button:active,.primary:active,.actions button:active,.student-toolbar button:active{transform:translateY(1px)}
main{max-width:1440px;margin:0 auto}
header{min-height:58px}
header p{max-width:760px;color:#4d6258;line-height:1.55}
.summary{border:1px solid #dbe5df;border-radius:8px;box-shadow:0 6px 18px rgba(18,35,27,.04);overflow:hidden}
.summary div{border-right:1px solid #e4ebe7}
.list-panel,.editor,.student-editor,.student-list-panel{border:1px solid #dbe5df;border-radius:8px;box-shadow:0 6px 18px rgba(18,35,27,.04);overflow:hidden}
.tenant-row{transition:background-color .16s ease}
.tenant-row.selected{box-shadow:inset 3px 0 0 #16724d}
.tag{background:#e5f4ec;color:#0f6544;font-weight:700}
input,select,textarea{border-color:#bccbc4}
input:focus,select:focus,textarea:focus{border-color:#16724d;box-shadow:0 0 0 3px rgba(22,114,77,.13);outline:0}
.primary{box-shadow:0 3px 8px rgba(15,116,77,.16)}
.login-view{background:linear-gradient(180deg,#e9f2ed 0%,#f5f7f6 100%)}
.login-card{border-color:#d9e5df;border-radius:12px;box-shadow:0 16px 40px rgba(18,35,27,.1)}
.login-card h1{letter-spacing:0}
.login-card p{line-height:1.55;color:#4d6258}
.code-result{border:1px solid #d5eadf;background:#f0faf4}

@media(max-width:900px){
  aside{border-bottom:1px solid rgba(255,255,255,.08)}
  nav button{border:1px solid rgba(255,255,255,.08)}
  .summary{box-shadow:none}
  .list-panel,.editor,.student-editor,.student-list-panel{box-shadow:none}
  .panel-title,.editor-title{border-bottom-color:#e4ebe7}
}

@media(max-width:700px){
  #studentRows td:nth-child(1)::before{content:"\5b66\5458"}
  #studentRows td:nth-child(2)::before{content:"\624b\673a\53f7"}
  #studentRows td:nth-child(3)::before{content:"\673a\6784"}
  #studentRows td:nth-child(4)::before{content:"\6709\6548\671f"}
  #studentRows td:nth-child(5)::before{content:"\5fae\4fe1"}
  #studentRows td:nth-child(6)::before{content:"\64cd\4f5c"}
  #studentRows tr{box-shadow:0 4px 12px rgba(18,35,27,.04)}
  #studentRows td{grid-template-columns:76px 1fr}
  #studentRows td::before{align-self:start;color:#52665c}
  .text-action{justify-self:start}
}

/* Impeccable admin polish: restrained, task-first console */
:root{
  --ink:#14231d;
  --ink-2:#2d3d35;
  --muted:#5d7066;
  --line:#d8e2dc;
  --line-soft:#e8efeb;
  --bg:#f4f7f5;
  --surface:#ffffff;
  --surface-2:#eef4f0;
  --sidebar:#102118;
  --sidebar-2:#1b3025;
  --brand:#116b49;
  --brand-2:#0d5b3d;
  --brand-soft:#e7f5ee;
  --danger:#b42318;
  --danger-soft:#fff1f0;
  --info:#2454a6;
  --info-soft:#eef4ff;
  --warning:#9a5b00;
  --warning-soft:#fff7e8;
  --radius:8px;
  --radius-sm:6px;
  --shadow:0 2px 8px rgba(16,33,24,.06);
}

html{background:var(--bg);text-rendering:optimizeLegibility}
body{
  grid-template-columns:248px minmax(0,1fr);
  background:var(--bg);
  color:var(--ink);
  font-size:14px;
  line-height:1.5;
}
body.login-mode{background:var(--bg)}

button,input,select,textarea{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
button{transition:background-color .16s ease,color .16s ease,border-color .16s ease,transform .12s ease}
button:hover{filter:none}
button:disabled{opacity:.52}

aside{
  position:sticky;
  top:0;
  height:100vh;
  padding:22px 14px;
  background:var(--sidebar);
  color:#f3f8f5;
}
.brand{
  padding:2px 8px 22px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand>span{
  width:38px;
  height:38px;
  border-radius:9px;
  background:#1d8b61;
  box-shadow:none;
}
.brand strong{font-size:15px;letter-spacing:0}
.brand small{color:#b8c6bf}
nav{
  gap:4px;
  margin-top:18px;
}
nav button{
  min-height:42px;
  padding:0 13px;
  border-radius:var(--radius-sm);
  color:#c3d0c9;
  font-weight:600;
}
nav button:hover{background:var(--sidebar-2);color:#fff}
nav button.active{
  background:#e9f5ef;
  color:#0c5f40;
  font-weight:800;
}
.company{
  border-top-color:rgba(255,255,255,.1);
  color:#b9c8c0;
}
.company button{
  border:1px solid rgba(255,255,255,.12);
  background:transparent;
  color:#e9f3ee;
}
.company button:hover{background:rgba(255,255,255,.08)}

main{
  width:100%;
  max-width:1500px;
  padding:26px 34px 40px;
}
header{
  min-height:52px;
  align-items:flex-start;
  gap:18px;
  margin-bottom:18px;
}
h1{
  color:var(--ink);
  font-size:24px;
  line-height:1.24;
  font-weight:800;
  text-wrap:balance;
}
p{color:var(--muted);line-height:1.65}
header p{max-width:820px}

.summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(142px,1fr));
  gap:0;
  margin-top:0;
  margin-bottom:14px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.summary div{
  min-width:0;
  padding:14px 16px;
  border-right:1px solid var(--line-soft);
}
.summary div:last-child{border-right:0}
.summary b{
  color:var(--ink);
  font-size:23px;
  line-height:1.1;
  font-weight:850;
}
.summary span{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

#notice,#studentNotice,#leadNotice,#staffNotice{
  min-height:34px;
  padding:8px 2px;
  font-weight:700;
}

.lead-identity-hint{display:block;margin-top:5px;color:#64766d;font-size:12px;line-height:1.45}.lead-identity-hint .text-action{min-height:auto;margin-left:6px;padding:0;border:0;background:transparent;color:#1769e0;font:inherit;font-weight:800;cursor:pointer;text-decoration:underline}.lead-transferred-badge{display:inline-flex;align-items:center;min-height:34px;padding:0 10px;border-radius:999px;background:#f2f4f7;color:#667085;font-size:12px;font-weight:800}.lead-readonly-notice{display:grid;gap:5px;margin:0 0 12px;padding:12px;border:1px solid #d9e2ec;border-radius:10px;background:#f8fafc;color:#475467}.lead-readonly-notice strong{color:#344054}.lead-readonly-notice span{font-size:13px;line-height:1.55}

.workspace,.student-workspace,.crm-workspace,.staff-workspace{
  gap:16px;
  align-items:start;
}
.list-panel,.editor,.student-editor,.student-list-panel,.crm-editor,.crm-list-panel{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.panel-title,.editor-title{
  min-height:58px;
  padding:16px 18px;
  border-bottom:1px solid var(--line-soft);
  background:#fbfcfb;
}
.panel-title strong,.editor-title strong{
  color:var(--ink);
  font-size:15px;
}
.panel-title small,.editor-title small{
  max-width:62ch;
  color:var(--muted);
  font-size:12px;
}

input,select,textarea{
  min-height:40px;
  border:1px solid #b9c8c0;
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--ink);
  font-size:14px;
}
input::placeholder,textarea::placeholder{color:#64766d}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(17,107,73,.14);
  outline:0;
}
label{
  color:var(--ink-2)!important;
  font-weight:700;
}
.fields,.student-fields,.crm-fields{
  gap:14px;
  padding:18px;
}
textarea{line-height:1.62}

.primary{
  min-height:40px;
  border:1px solid var(--brand)!important;
  border-radius:var(--radius-sm);
  background:var(--brand)!important;
  color:#fff!important;
  box-shadow:none;
}
.primary:hover{
  border-color:var(--brand-2)!important;
  background:var(--brand-2)!important;
}
.actions{
  gap:9px;
  padding:0 18px 18px;
}
.actions button,.student-toolbar button,.lead-actions button,.text-action{
  min-height:38px;
  border:1px solid #cfdad4;
  border-radius:var(--radius-sm);
  background:#f5f8f6;
  color:var(--ink-2);
  font-weight:750;
}
.actions button:hover,.student-toolbar button:hover,.lead-actions button:hover{
  border-color:#b7c8bf;
  background:#eef4f0;
}

.tenant-list{background:#fbfcfb}
.tenant-row{
  grid-template-columns:40px minmax(0,1fr) auto;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line-soft);
}
.tenant-row strong{font-size:14px;color:var(--ink)}
.tenant-row small{color:var(--muted);font-size:12px;line-height:1.55}
.tenant-row:hover,.tenant-row.selected{background:#edf6f1}
.tenant-row.selected{box-shadow:inset 0 0 0 1px #b9ddcb}
.mark{border-radius:var(--radius-sm)}
.tag,.lead-stage{
  border-radius:999px;
  background:var(--brand-soft);
  color:#0f6544;
  font-size:12px;
  font-weight:800;
}

.student-toolbar{
  grid-template-columns:minmax(150px,190px) minmax(180px,1fr) auto;
  gap:9px;
  padding:13px;
  border-bottom:1px solid var(--line-soft);
  background:#fbfcfb;
}
.table-wrap{
  background:#fff;
}
table{
  width:100%;
  border-collapse:collapse;
}
thead th{
  padding:11px 14px;
  border-bottom:1px solid var(--line-soft);
  background:#f7faf8;
  color:#53675d;
  font-size:12px;
  text-align:left;
}
tbody td{
  padding:13px 14px;
  border-bottom:1px solid var(--line-soft);
  color:var(--ink-2);
  vertical-align:middle;
}
tbody tr:hover td{background:#fbfdfc}
.student-name{color:var(--ink)}
.student-phone,.lead-meta{color:var(--muted)}
.bind-state{color:#0f6544}
.bind-state.unbound{color:#64766d}
.text-action.danger,.lead-actions .danger{
  border-color:#f3c7c2;
  background:var(--danger-soft);
  color:var(--danger);
}

.crm-workspace,.staff-workspace{
  grid-template-columns:minmax(360px,420px) minmax(640px,1fr);
}
.lead-list{
  gap:10px;
  padding:12px;
  background:#f7faf8;
}
.lead-card{
  gap:11px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#fff;
  box-shadow:none;
}
.lead-card:hover{
  border-color:#bed2c8;
  background:#fdfefe;
}
.lead-head strong{
  color:var(--ink);
  font-size:16px;
  line-height:1.3;
}
.lead-note{
  padding:9px 10px;
  border-radius:var(--radius-sm);
  background:#f5f8f6;
  color:var(--ink-2);
}
.lead-stage.invalid{background:var(--danger-soft);color:var(--danger)}
.lead-stage.converted{background:var(--info-soft);color:var(--info)}
.lead-actions{
  gap:7px;
  padding-top:2px;
}
.lead-actions .primary:disabled{
  border-color:#d8e2dc!important;
  background:#eef2ef!important;
  color:#5d7066!important;
}

.modal-mask{
  z-index:40;
  background:rgba(13,28,20,.46);
}
.modal-panel{
  border:0;
  border-radius:10px;
  box-shadow:0 8px 28px rgba(13,28,20,.18);
}
.modal-panel .panel-title{
  background:#f7faf8;
}

.login-view{
  background:
    radial-gradient(circle at top left,rgba(17,107,73,.12),transparent 34%),
    linear-gradient(180deg,#eef5f1 0%,#f8faf9 100%);
}
.login-card{
  gap:13px;
  padding:30px;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 6px 24px rgba(16,33,24,.1);
}
.login-mark{
  width:44px;
  height:44px;
  border-radius:10px;
  background:var(--brand);
}
.login-card h1{font-size:24px}
.login-card label{font-weight:800}
.login-card input,.login-card button{min-height:44px}

@media(max-width:1180px){
  main{padding:22px}
  .workspace,.student-workspace,.crm-workspace,.staff-workspace{grid-template-columns:1fr}
  .editor,.student-editor,.crm-editor{order:-1}
}

@media(max-width:900px){
  body:not(.login-mode){display:block}
  body:not(.login-mode) aside{
    position:sticky;
    height:auto;
    padding:12px;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .brand{padding:0 2px 10px}
  nav{
    display:flex;
    gap:7px;
    margin-top:10px;
    overflow-x:auto;
  }
  nav button{
    flex:0 0 auto;
    min-height:38px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.09);
    white-space:nowrap;
  }
  .company{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:10px}
  .company button{width:auto;margin-top:0}
  main{padding:14px 12px 28px}
  header{margin-bottom:12px}
  h1{font-size:21px}
  .summary{grid-template-columns:repeat(2,minmax(0,1fr));box-shadow:none}
  .summary div{padding:12px}
  .list-panel,.editor,.student-editor,.student-list-panel,.crm-editor,.crm-list-panel{box-shadow:none}
  .fields,.student-fields,.crm-fields{grid-template-columns:1fr}
  .fields .wide,.student-fields .wide,.crm-fields .wide{grid-column:auto}
  input,select,textarea{font-size:16px}
  .student-toolbar{grid-template-columns:1fr}
}

@media(max-width:700px){
  .summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lead-card{padding:13px}
  .lead-head{align-items:flex-start}
  .lead-actions{display:grid;grid-template-columns:1fr 1fr}
  .lead-actions button{width:100%}
  .actions{display:grid;grid-template-columns:1fr 1fr}
  .actions .primary{grid-column:auto}
  table,thead,tbody,tr,th,td{display:block;width:100%}
  thead{display:none}
  .student-list-panel table{
    min-width:0;
    padding:10px;
    border-spacing:0 10px;
    background:#f4f7f5;
  }
  tbody tr{
    margin-bottom:10px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:#fff;
  }
  tbody td{
    display:grid;
    grid-template-columns:76px 1fr;
    gap:10px;
    padding:8px 12px;
    border-bottom:0;
  }
  tbody td::before{
    color:var(--muted);
    font-size:12px;
    font-weight:800;
  }
}

@media(prefers-reduced-motion:reduce){
  button,nav button,.tenant-row{transition:none!important}
}

/* 21st.dev-inspired admin template pass */
:root{
  --brand-ring:rgba(17,107,73,.16);
  --surface-raised:#ffffff;
  --panel-bg:#f8fbf9;
  --nav-active:#ecf8f1;
  --shadow-template:0 1px 2px rgba(16,33,24,.05),0 10px 28px rgba(16,33,24,.06);
}

body{
  background:
    radial-gradient(circle at 80% -10%, rgba(17,107,73,.08), transparent 320px),
    var(--bg);
}
aside{
  width:248px;
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:inset -1px 0 0 rgba(0,0,0,.14);
}
.brand{
  min-height:68px;
}
.brand>span{
  background:linear-gradient(135deg,#119363,#0d5b3d);
}
nav button{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
}
nav button.active{
  box-shadow:0 1px 0 rgba(255,255,255,.08),0 8px 18px rgba(0,0,0,.14);
}
main{
  padding-top:30px;
}
header{
  padding:0 2px;
}
header h1{
  font-size:25px;
}
header .primary,
header button.primary{
  padding:0 18px;
  min-height:42px;
}
.summary{
  border-color:#e2ebe6;
  box-shadow:var(--shadow-template);
}
.summary div{
  position:relative;
  background:linear-gradient(180deg,#fff 0%,#fbfdfc 100%);
}
.summary div::after{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:transparent;
}
.summary div:hover::after{background:var(--brand)}

.list-panel,.editor,.student-editor,.student-list-panel,.crm-editor,.crm-list-panel{
  border-color:#e2ebe6;
  box-shadow:var(--shadow-template);
}
.panel-title,.editor-title{
  background:linear-gradient(180deg,#fff 0%,#fbfdfc 100%);
}
.panel-title input,
.student-toolbar input,
.student-toolbar select{
  background:#fff;
}

input,select,textarea{
  border-color:#c9d7d0;
  box-shadow:inset 0 1px 0 rgba(20,35,29,.02);
}
input:hover,select:hover,textarea:hover{
  border-color:#aebfb7;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 4px var(--brand-ring);
}

.primary{
  letter-spacing:0;
}
.actions button,
.student-toolbar button,
.lead-actions button,
.text-action{
  box-shadow:none;
}

.tenant-row{
  border-bottom-color:#edf3ef;
}
.tenant-row:hover{
  background:#f2faf6;
}
.tenant-row.selected{
  background:#eef8f3;
}
.mark{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
}

.student-toolbar{
  background:var(--panel-bg);
}
thead th{
  background:#f3f7f5;
  color:#4d6258;
  font-weight:800;
}
tbody tr{
  transition:background-color .16s ease;
}

.lead-list{
  background:var(--panel-bg);
}
.lead-card{
  position:relative;
  overflow:hidden;
  border-color:#e0eae5;
  transition:border-color .16s ease,background-color .16s ease,transform .16s ease;
}
.lead-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#dbe5df;
}
.lead-card:hover{
  transform:translateY(-1px);
  border-color:#b8d8c8;
}
.lead-card:has(.lead-stage.converted)::before{background:#6f95da}
.lead-card:has(.lead-stage.invalid)::before{background:#e07a71}
.lead-head{
  padding-left:2px;
}
.lead-stage{
  border:1px solid #d2e8dc;
}
.lead-stage.converted{border-color:#ccdafa}
.lead-stage.invalid{border-color:#f3c7c2}
.lead-note{
  border:1px solid #edf3ef;
}
.lead-actions .primary{
  min-height:36px;
}

.modal-mask{
  backdrop-filter:blur(4px);
}
.modal-panel{
  width:min(600px,calc(100vw - 32px));
  box-shadow:0 20px 60px rgba(16,33,24,.2);
}
.login-card{
  box-shadow:0 1px 2px rgba(16,33,24,.06),0 24px 70px rgba(16,33,24,.12);
}
.login-card .primary{
  min-height:46px;
}

@media(max-width:900px){
  body{
    background:#f4f7f5;
  }
  aside{
    width:auto;
    box-shadow:0 6px 18px rgba(16,33,24,.14);
  }
  nav button.active{
    box-shadow:none;
  }
  main{
    padding-top:16px;
  }
  .summary{
    border-radius:10px;
  }
}

@media(max-width:700px){
  .lead-card:hover{
    transform:none;
  }
  .modal-mask{
    backdrop-filter:none;
  }
}

/* Round 3: daily-use CRM/admin refinement */
main[id="leadsView"] .summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.crm-list-panel .student-toolbar,
.student-list-panel .student-toolbar{
  position:sticky;
  top:0;
  z-index:4;
}
.crm-list-panel .student-toolbar{
  grid-template-columns:150px 140px 140px 150px minmax(180px,1fr) auto;
  align-items:center;
}
.student-toolbar select,
.student-toolbar input{
  height:38px;
}
.student-toolbar button{
  height:38px;
}
.crm-editor{
  position:sticky;
  top:18px;
}
.crm-fields label,
.student-fields label,
.fields label{
  gap:6px;
}
.crm-fields input,
.crm-fields select,
.crm-fields textarea{
  background:#fff;
}
.lead-card{
  grid-template-columns:1fr;
  padding:16px 16px 15px 18px;
}
.lead-head{
  align-items:center;
}
.lead-head strong{
  display:block;
  max-width:420px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.lead-meta{
  font-size:12px;
  line-height:1.7;
}
.lead-note{
  min-height:38px;
  display:flex;
  align-items:center;
}
.lead-actions{
  justify-content:flex-end;
  border-top:1px solid #edf3ef;
  padding-top:10px;
}
.lead-actions button{
  min-width:72px;
}
.lead-actions .primary{
  min-width:92px;
}
.staff-workspace .lead-actions{
  justify-content:flex-start;
}
.staff-workspace .lead-card::before{
  background:#b9ddcb;
}
.student-list-panel{
  overflow:hidden;
}
.student-list-panel .table-wrap{
  max-height:calc(100vh - 250px);
  overflow:auto;
}
.student-list-panel thead{
  position:sticky;
  top:0;
  z-index:2;
}
.empty-cell{
  min-height:120px;
  display:grid;
  place-items:center;
  color:#63766d;
  font-weight:700;
}
.login-card{
  position:relative;
  overflow:hidden;
}
.login-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,#0d5b3d,#2f9468,#85c7a5);
}
.login-mark{
  margin-top:4px;
}
.modal-panel .crm-fields{
  grid-template-columns:1fr 1fr;
}

@media(max-width:1280px){
  main[id="leadsView"] .summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .crm-list-panel .student-toolbar{
    grid-template-columns:1fr 1fr 1fr;
  }
  .crm-list-panel .student-toolbar input,
  .crm-list-panel .student-toolbar button{
    grid-column:auto;
  }
}

@media(max-width:1180px){
  .crm-editor{
    position:static;
  }
}

@media(max-width:700px){
  main[id="leadsView"] .summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .crm-list-panel .student-toolbar{
    position:static;
    grid-template-columns:1fr;
  }
  .lead-head{
    align-items:flex-start;
  }
  .lead-head strong{
    max-width:100%;
    white-space:normal;
  }
  .lead-actions{
    justify-content:stretch;
  }
  .lead-actions button,
  .lead-actions .primary{
    min-width:0;
  }
  .student-list-panel .table-wrap{
    max-height:none;
    overflow:visible;
  }
  .student-list-panel thead{
    position:static;
  }
  .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}}
/* Tenant page: default to overview, edit only on intent. */
.tenant-preview{min-height:360px!important}.tenant-preview .editor-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important}.tenant-preview .editor-title button{height:36px!important;padding:0 14px!important;border:1px solid #d1d1d6!important;border-radius:9px!important;background:#fff!important;color:#007aff!important;font-weight:800!important}.tenant-preview .editor-title button:hover{background:#f2f2f7!important}.tenant-preview-body{padding:18px!important}.tenant-profile{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:14px;padding:18px;border:1px solid #e5e5ea;border-radius:12px;background:#f9f9fb}.tenant-preview-mark{display:grid;place-items:center;width:54px;height:54px;border-radius:14px;color:#fff;font-weight:900}.tenant-profile strong,.tenant-profile small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tenant-profile strong{font-size:18px;color:#1d1d1f}.tenant-profile small{margin-top:5px;color:#6e6e73}.tenant-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.tenant-preview-grid span{display:block;min-width:0;padding:14px;border:1px solid #e5e5ea;border-radius:12px;background:#fff}.tenant-preview-grid b,.tenant-preview-grid small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tenant-preview-grid b{font-size:18px;color:#1d1d1f}.tenant-preview-grid small{margin-top:6px;color:#6e6e73;font-weight:700}.tenant-preview-meta{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:14px 0 0;border:1px solid #e5e5ea;border-radius:12px;background:#fff;overflow:hidden}.tenant-preview-meta div{min-width:0;padding:14px 16px;border-bottom:1px solid #e5e5ea}.tenant-preview-meta div:nth-child(odd){border-right:1px solid #e5e5ea}.tenant-preview-meta div:nth-last-child(-n+2){border-bottom:0}.tenant-preview-meta dt{margin:0 0 6px;color:#6e6e73;font-size:12px;font-weight:800}.tenant-preview-meta dd{margin:0;min-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1d1d1f;font-weight:700}.tenant-preview-empty{display:grid;place-items:center;align-content:center;gap:8px;min-height:260px;border:1px dashed #d1d1d6;border-radius:12px;background:#f9f9fb;text-align:center}.tenant-preview-empty strong{font-size:18px;color:#1d1d1f}.tenant-preview-empty span{max-width:30ch;color:#6e6e73;line-height:1.6}.workspace:has(#tenantPreview:not([hidden])){grid-template-columns:minmax(360px,530px) minmax(0,1fr)!important}@media(max-width:980px){.tenant-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tenant-preview-meta{grid-template-columns:1fr}.tenant-preview-meta div,.tenant-preview-meta div:nth-child(odd){border-right:0}.tenant-preview-meta div:nth-last-child(2){border-bottom:1px solid #e5e5ea}.workspace:has(#tenantPreview:not([hidden])){grid-template-columns:1fr!important}}@media(max-width:560px){.tenant-profile{grid-template-columns:44px minmax(0,1fr);align-items:start}.tenant-profile .tag{grid-column:1/-1;width:max-content}.tenant-preview-mark{width:44px;height:44px}.tenant-preview-grid{grid-template-columns:1fr}.tenant-preview .editor-title{align-items:flex-start!important;flex-direction:column!important}.tenant-preview .editor-title button{width:100%!important}}

/* Tenant overview v2: first screen is a calm overview, not an edit form. */
#tenantsView .workspace{align-items:start!important}
#tenantPreview:not([hidden]){display:block!important}
#tenantForm[hidden]{display:none!important}
#tenantForm:not([hidden]){animation:tenantFormIn .18s ease-out both}
.tenant-preview{min-height:420px!important;background:linear-gradient(180deg,#fff 0%,#fbfbfd 100%)!important}
.tenant-preview .editor-title{padding:20px 22px!important}
.tenant-preview .editor-title strong{font-size:17px!important}
.tenant-preview-body{padding:20px 22px 22px!important}
.tenant-profile{background:linear-gradient(135deg,#f9fbff 0%,#fff 62%,#fff8ef 100%)!important;border-color:#e5e5ea!important}
.tenant-profile .tag{background:#eef7ff!important;color:#0057c2!important}
.tenant-preview-grid span{background:#fff!important}
.tenant-preview-grid span:nth-child(1){background:#f4f9ff!important}
.tenant-preview-grid span:nth-child(2){background:#f3fbf6!important}
.tenant-preview-grid span:nth-child(3){background:#fff8ed!important}
.tenant-preview-grid span:nth-child(4){background:#f8f6ff!important}
.tenant-preview-meta{box-shadow:inset 0 0 0 1px #fff!important}
@keyframes tenantFormIn{from{opacity:.72;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* Tenant overview v3: title spacing, long values, and destructive action. */
.tenant-preview .editor-title{padding-left:64px!important}
.tenant-preview .editor-title::before{left:22px!important;top:22px!important}
.tenant-actions{display:flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important}
.tenant-actions button{height:36px!important;padding:0 14px!important;border-radius:9px!important;font-weight:800!important}
.tenant-actions .danger-outline{border:1px solid #ffb4ad!important;background:#fff!important;color:#d70015!important}
.tenant-actions .danger-outline:hover{background:#fff0ef!important}
.lead-actions .danger-outline{border-color:#ffb4ad!important;background:#fff!important;color:#d70015!important}
.lead-actions .danger-outline:hover{background:#fff0ef!important}
.tenant-preview-grid b,.tenant-preview-grid small,.tenant-preview-meta dd{white-space:normal!important;overflow-wrap:anywhere!important}
.tenant-preview-grid span{min-height:80px!important}
.tenant-preview-grid .expires-metric b{font-size:17px!important;letter-spacing:0!important;white-space:nowrap!important}
@media(max-width:560px){.tenant-preview .editor-title{padding-left:46px!important}.tenant-actions{width:100%!important}.tenant-actions button{flex:1!important}}

/* Delivery polish: remove decorative side stripes and let status tags carry state. */
.lead-card::before,
.lead-card-pro::before{display:none!important}
.lead-card,
.lead-card-pro{border-left:1px solid #d8d8de!important}
.lead-card:has(.lead-stage.converted),
.lead-card-pro:has(.lead-stage.converted){border-color:#bfd0ff!important;background:linear-gradient(180deg,#fff,#f8fbff)!important}
.lead-card:has(.lead-stage.invalid),
.lead-card-pro:has(.lead-stage.invalid){border-color:#ffc6c2!important;background:linear-gradient(180deg,#fff,#fff8f7)!important}

/* CRM 2.0-A: one worklist first, details only on intent. */
.crm-focus-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:14px 0;padding:16px 18px;border:1px solid #d8d8de;border-radius:12px;background:linear-gradient(120deg,#fff 0%,#f7fbff 100%)}
.crm-focus-panel>div:first-child{display:grid;gap:4px;min-width:0}
.eyebrow{display:block;color:#007aff;font-size:12px;font-weight:800;letter-spacing:.04em}
.crm-focus-panel strong{font-size:17px;color:#1d1d1f}
.crm-focus-panel small{color:#6e6e73;line-height:1.5}
.crm-focus-actions{display:flex;gap:8px;flex:0 0 auto}
.crm-focus-actions button{min-height:38px;padding:0 12px;border:1px solid #d1d1d6;border-radius:9px;background:#fff;color:#1d1d1f;font-weight:750;white-space:nowrap}
.crm-focus-actions button:hover{border-color:#8bbaf0;background:#eaf3ff}
.crm-focus-actions b{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:4px;border-radius:999px;background:#eaf3ff;color:#0057c2;font-size:12px}
.lead-work-row{padding:17px 18px!important}
.lead-work-row .lead-head{align-items:flex-start}
.lead-work-meta{display:grid;grid-template-columns:1fr 1.2fr 1.6fr 1fr;gap:8px;margin:14px 0 12px}
.lead-work-meta span{min-width:0;padding:8px 10px;border:1px solid #e5e5ea;border-radius:9px;background:#f9f9fb}
.lead-work-meta small,.lead-work-meta b{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lead-work-meta small{margin-bottom:4px;color:#6e6e73;font-size:12px;font-weight:700}
.lead-work-meta b{color:#1d1d1f;font-size:13px}
.lead-work-meta .money b{color:#007aff}
.lead-work-meta .next-follow.overdue b{color:#d70015}
.lead-work-meta .next-follow.today b{color:#0057c2}
.lead-work-row .lead-actions{justify-content:flex-end;align-items:center;padding-top:0;border-top:0}
.lead-quota-blocked{padding:8px 10px;border-radius:8px;background:#fff8e8;color:#9a6700;font-size:12px;font-weight:800}
.crm-pager{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 16px;border-top:1px solid #e5e5ea;background:#fff}
.crm-pager span{margin-right:auto;color:#6e6e73;font-size:13px;font-weight:700}
.crm-pager label{display:flex;align-items:center;gap:6px;color:#3a3a3c;font-size:13px;font-weight:700}
.crm-pager select{width:68px;min-height:36px;padding:0 8px}
.crm-pager button{min-height:36px;padding:0 12px;border:1px solid #d1d1d6;border-radius:8px;background:#fff;color:#1d1d1f;font-weight:750}
.crm-pager button:disabled{opacity:.42;cursor:not-allowed}
.drawer-mask{position:fixed;z-index:30;inset:0;display:flex;justify-content:flex-end;background:rgba(29,29,31,.32);backdrop-filter:blur(3px)}
.lead-detail-drawer{display:flex;flex-direction:column;width:min(680px,100%);height:100%;overflow:hidden;padding:0!important;border-left:1px solid #d8d8de!important;border-radius:0!important;background:#fff!important;box-shadow:-16px 0 32px rgba(0,0,0,.12)!important;color:#1d1d1f!important}
.drawer-header{position:relative;z-index:2;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e5e5ea;background:#fff}
.drawer-header>div{min-width:0;display:grid;gap:5px}.drawer-header strong{font-size:22px;line-height:1.2}.drawer-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6e6e73}
.lead-detail-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:18px 24px 28px}.drawer-loading{display:grid;gap:8px;padding:56px 0;text-align:center;color:#6e6e73}.drawer-loading strong{color:#1d1d1f;font-size:16px}.drawer-loading span{font-size:13px}
.detail-state-row{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.detail-access-badge{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border-radius:999px;background:#f2f2f7;color:#6e6e73;font-size:12px;font-weight:800}.detail-access-badge.success{background:#eaf8ef;color:#248a3d}.detail-access-badge.danger{background:#fff0ef;color:#d70015}
.detail-next-best{margin-bottom:14px;padding:16px 18px;border-left:4px solid #8e8e93;border-radius:0 10px 10px 0;background:#f7f7f9}.detail-next-best small,.detail-next-best strong{display:block}.detail-next-best small{margin-bottom:4px;color:#6e6e73;font-size:11px;font-weight:850;letter-spacing:.06em}.detail-next-best strong{font-size:17px;line-height:1.35}.detail-next-best p{margin:6px 0 0;color:#52525a;line-height:1.55}.detail-next-best.success{border-color:#30a46c;background:#f0faf4}.detail-next-best.warning{border-color:#ff9f0a;background:#fff8e8}.detail-next-best.danger{border-color:#ff3b30;background:#fff4f2}.detail-next-best.muted{border-color:#a1a1aa;background:#f5f5f7}
.detail-money-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:14px;border:1px solid #e5e5ea;border-radius:10px;background:#fff}.detail-money-strip span{min-width:0;padding:13px 14px;border-left:1px solid #e5e5ea}.detail-money-strip span:first-child{border-left:0}.detail-money-strip small,.detail-money-strip b,.detail-money-strip em{display:block}.detail-money-strip small{color:#6e6e73;font-size:11px;font-weight:750}.detail-money-strip b{margin-top:4px;font-size:18px}.detail-money-strip em{margin-top:2px;color:#6e6e73;font-size:10px;font-style:normal}.detail-money-strip .outstanding b{color:#d70015}
.detail-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.detail-facts span{min-width:0;padding:11px 12px;border:1px solid #e5e5ea;border-radius:9px;background:#f9f9fb}.detail-facts small,.detail-facts b{display:block;min-width:0}.detail-facts small{margin-bottom:5px;color:#6e6e73;font-size:11px;font-weight:700}.detail-facts b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1d1d1f;font-size:13px}.detail-facts b.overdue{color:#d70015}.detail-facts b.today{color:#0057c2}
.detail-access{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;align-items:center;margin-top:14px;padding:14px 16px;border:1px solid #cfe7d8;border-radius:10px;background:#f5fbf7}.detail-access>div small,.detail-access>div strong,.detail-access>div b{display:block}.detail-access>div small{margin-bottom:4px;color:#547060;font-size:11px;font-weight:750}.detail-access>div strong,.detail-access>div b{color:#176b4d;font-size:13px}.detail-access p{grid-column:1/-1;margin:0;color:#547060;line-height:1.55}
.detail-note{margin-top:14px;padding:14px;border:1px solid #e5e5ea;border-radius:10px;background:#fff}.detail-note small{color:#6e6e73;font-size:12px;font-weight:800}.detail-note p{margin:7px 0 0;color:#3a3a3c;line-height:1.6}
.detail-history{margin-top:22px}.detail-history>div{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.detail-history>div strong{font-size:16px}.detail-history>div small{color:#6e6e73}.detail-history article{position:relative;margin-left:6px;padding:14px 0 14px 18px;border-left:2px solid #e5e5ea}.detail-history article::before{position:absolute;top:20px;left:-5px;width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:#30a46c;content:""}.detail-history article>div{display:flex;justify-content:space-between;gap:10px}.detail-history article b{font-size:13px}.detail-history article span,.detail-history article small{color:#6e6e73;font-size:12px}.detail-history article p{margin:7px 0;color:#3a3a3c;line-height:1.6}.drawer-actions{position:relative;z-index:2;display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px;padding:14px 24px;border-top:1px solid #e5e5ea;background:rgba(255,255,255,.98);backdrop-filter:blur(10px)}
.drawer-actions button{min-height:40px;padding:0 13px;border:1px solid #d1d1d6;border-radius:9px;background:#fff;color:#1d1d1f;font-weight:800}.drawer-actions .primary{border-color:#007aff;background:#007aff;color:#fff}.drawer-actions .danger-outline{color:#d70015;border-color:#ffb4ad}.drawer-actions .lead-converted{display:inline-flex;align-items:center;padding:0 10px;border-radius:8px;background:#eaf8ef;color:#248a3d;font-size:13px;font-weight:800}.drawer-actions .lead-converted.warning{border:1px solid #ffd28a;background:#fff8e8;color:#a15c00}.drawer-actions .lead-converted.danger{border:1px solid #f3c7c2;background:#fff0ef;color:#d70015}
.history-empty.detail-error button{margin-top:12px;min-height:38px;padding:0 14px;border:1px solid #007aff;border-radius:8px;background:#fff;color:#007aff;font-weight:800}
@media(max-width:900px){.crm-focus-panel{align-items:flex-start;flex-direction:column}.lead-work-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-work-row .lead-actions{justify-content:flex-start}.crm-pager{flex-wrap:wrap}.crm-pager span{width:100%;margin-right:0}.lead-detail-drawer{width:min(620px,100%)}}
@media(max-width:560px){.crm-focus-panel{padding:14px}.crm-focus-actions{width:100%}.crm-focus-actions button{flex:1;padding:0 8px;font-size:12px}.lead-work-row{padding:14px!important}.lead-work-meta{gap:6px}.lead-work-meta span{padding:8px}.crm-pager{justify-content:flex-start}.detail-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-money-strip{grid-template-columns:1fr}.detail-money-strip span{border-top:1px solid #e5e5ea;border-left:0}.detail-money-strip span:first-child{border-top:0}.detail-access{grid-template-columns:1fr 1fr}.detail-access>div:first-child{grid-column:1/-1}.drawer-header,.lead-detail-body,.drawer-actions{padding-left:16px;padding-right:16px}.drawer-actions button{flex:1 1 calc(50% - 8px)}.drawer-actions .danger-outline{order:4}.drawer-actions .lead-converted{width:100%;min-height:36px;justify-content:center}.timeline-head{align-items:flex-start;flex-direction:column;gap:3px!important}}

/* CRM 2.0-B: structured follow-up closure, with one conditional field instead of a wider form. */
.lead-stage.lost{background:#fff0ef!important;color:#d70015!important;border-color:#f3c7c2!important}
.followup-closure-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.followup-closure-meta span{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border:1px solid #e5e5ea;border-radius:999px;background:#f9f9fb;color:#52525a;font-size:12px;line-height:1.35}.followup-closure-meta .followup-result{border-color:#cdebd8;background:#eaf8ef;color:#248a3d;font-weight:800}.followup-closure-meta .followup-result.legacy{border-color:#d8d8de;background:#f2f2f7;color:#6e6e73}.followup-closure-meta .followup-result.lost,.followup-closure-meta .lost-reason{border-color:#f3c7c2;background:#fff0ef;color:#d70015}.modal-panel #followLostReasonField[hidden],.modal-panel #followNextActionField[hidden],.modal-panel #followNextAtField[hidden]{display:none!important}

/* CRM toolbar: wrap by its actual panel width so the last action never escapes the card. */
.crm-list-panel .student-toolbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:10px!important;min-width:0!important}
.crm-list-panel .student-toolbar select{flex:1 1 140px!important;min-width:0!important}
.crm-list-panel .student-toolbar #leadSearch{flex:2 1 220px!important;min-width:160px!important}
.crm-list-panel .student-toolbar #refreshLeads{flex:0 0 auto!important;min-width:76px!important;white-space:nowrap!important}
@media(max-width:760px){.crm-list-panel .student-toolbar #leadSearch,.crm-list-panel .student-toolbar #refreshLeads{flex:1 1 100%!important}}

/* CRM qualification fulfillment: one operational surface for access, activity and renewals. */
.detail-access{display:block;background:#f7fbff;border-color:#cfe2fa}.fulfillment-head{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.fulfillment-head span small,.fulfillment-head span strong{display:block}.fulfillment-head .text-action{min-height:34px;padding:0 10px;border:1px solid #b8d6f5;border-radius:8px;background:#fff;color:#0057c2;font-weight:800}.fulfillment-core{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.fulfillment-core>div{padding:10px 12px;border:1px solid #dce8f5;border-radius:8px;background:#fff}.fulfillment-metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.fulfillment-metrics span{min-width:0;padding:10px 12px;border-radius:8px;background:#edf5ff}.fulfillment-metrics small,.fulfillment-metrics b{display:block}.fulfillment-metrics b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#17324d!important}.fulfillment-empty{display:flex!important;align-items:flex-start;flex-direction:column;margin-top:10px;padding:12px;border:1px dashed #b8d6f5;border-radius:8px;background:#fff}.fulfillment-empty b{color:#17324d!important}.fulfillment-empty span{margin-top:3px;color:#60758a;font-size:12px}.fulfillment-renewals{display:block!important;margin-top:12px;padding-top:12px;border-top:1px solid #dce8f5}.fulfillment-renewals>strong{display:block;margin-bottom:6px;color:#17324d!important;font-size:12px}.fulfillment-renewals>div{display:flex!important;justify-content:space-between;gap:12px;padding:6px 0}.fulfillment-renewals>div span{color:#17324d;font-size:12px}.fulfillment-renewals>div small{text-align:right}.fulfillment-renewals.empty>span{color:#60758a;font-size:12px}
@media(max-width:560px){.fulfillment-core,.fulfillment-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.fulfillment-core>div:first-child{grid-column:auto}.fulfillment-renewals>div{align-items:flex-start;flex-direction:column;gap:2px}.fulfillment-renewals>div small{text-align:left}}

/* CRM business view: quiet operational metrics with explicit formulas. */
.dashboard-business-grid{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(520px,1.2fr);gap:18px;margin-top:18px}.business-rate{color:#0057c2;font-size:22px}.crm-funnel{display:grid;gap:12px;margin-top:18px}.funnel-step{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:12px}.funnel-step>span{display:flex;justify-content:space-between;gap:8px}.funnel-step>span b{font-size:13px}.funnel-step>span small{color:#6e6e73;font-size:12px}.funnel-step>div{height:12px;overflow:hidden;border-radius:3px;background:#edf0f4}.funnel-step i{display:block;height:100%;border-radius:3px;background:#8ab9f5}.funnel-step.intent i{background:#6b91df}.funnel-step.pendingPay i{background:#e6a23c}.funnel-step.converted i{background:#30a46c}.performance-table-wrap{overflow:auto;margin-top:14px}.performance-table{min-width:600px}.performance-table th,.performance-table td{padding:11px 10px}.performance-table td:first-child b{font-size:13px}.rate-chip{display:inline-flex;min-width:48px;justify-content:center;padding:3px 7px;border-radius:6px;background:#f2f2f7;color:#52525a;font-size:12px;font-weight:800}.rate-chip.good{background:#eaf8ef;color:#248a3d}.rate-chip.warning{background:#fff7e6;color:#a15c00}.rate-chip.danger{background:#fff0ef;color:#d70015}
.panel-link-button,.performance-page-actions button{min-height:34px;padding:0 11px;border:1px solid #a8c8ed;border-radius:8px;background:#f7fbff;color:#1665b7;font-size:12px;font-weight:800}.panel-link-button:hover,.performance-page-actions button:hover{background:#eaf4ff}.performance-page-actions{display:flex;gap:8px;flex-wrap:wrap}.performance-page-actions .primary{border-color:var(--brand);background:var(--brand);color:#fff}.performance-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.performance-detail-summary article{display:grid;gap:5px;padding:16px;border:1px solid #dce5f0;border-radius:12px;background:#fff}.performance-detail-summary small,.performance-detail-summary span{color:#667b91;font-size:12px}.performance-detail-summary strong{color:#17324d;font-size:23px}.performance-detail-panel{margin-top:18px}.performance-detail-list{display:grid;gap:10px;margin-top:15px}.performance-detail-row{display:grid;grid-template-columns:minmax(130px,1.2fr) repeat(6,minmax(78px,.7fr));gap:10px;align-items:center;padding:14px;border:1px solid #e0e8f1;border-radius:10px;background:#fff}.performance-person{display:grid;gap:4px}.performance-person b{color:#1e344c;font-size:14px}.performance-person small{color:#718399;font-size:12px}.performance-metric{display:grid;gap:3px}.performance-metric small{color:#74859a;font-size:11px}.performance-metric b{color:#294663;font-size:14px}.performance-metric b.danger{color:#c24640}.performance-detail-empty{padding:26px 0;color:#667b91;text-align:center;font-size:13px}
.business-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.business-kpi-grid article{display:grid;gap:5px;min-height:112px;padding:16px 17px;border:1px solid #dce5f0;border-radius:12px;background:linear-gradient(145deg,#fff,#f7fbff)}.business-kpi-grid small{color:#60758a;font-size:12px;font-weight:800}.business-kpi-grid strong{color:#17324d;font-size:22px;line-height:1.15}.business-kpi-grid span{color:#718399;font-size:12px;line-height:1.45}.business-kpi-grid .up{color:#168151}.business-kpi-grid .down{color:#c2443c}.collection-trend-panel{margin-top:18px}.collection-trend{display:grid;grid-template-columns:repeat(6,minmax(76px,1fr));gap:12px;align-items:end;height:210px;margin-top:16px}.collection-trend-item{display:grid;grid-template-rows:150px auto auto;gap:6px;min-width:0;text-align:center}.collection-trend-item>div{display:flex;align-items:flex-end;justify-content:center;height:150px;padding:0 12px;border-radius:8px 8px 3px 3px;background:#f0f5fb}.collection-trend-item i{display:block;width:100%;min-height:2px;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#5d9ee8,#2872c9)}.collection-trend-item b{color:#42566f;font-size:12px}.collection-trend-item small{overflow:hidden;color:#6c7b8d;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.data-quality-panel{margin-top:18px}.quality-total{padding:5px 9px;border-radius:999px;background:#fff3e9;color:#a85b12;font-size:12px}.quality-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.quality-summary button{display:grid;gap:3px;padding:12px;border:1px solid #e1e8f0;border-radius:9px;background:#fff;text-align:left}.quality-summary button:hover{border-color:#9dc2ed;background:#f7fbff}.quality-summary b{color:#194f88;font-size:20px}.quality-summary span{color:#60758a;font-size:12px;font-weight:800}.quality-list{display:grid;gap:7px;margin-top:13px}.quality-item{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(130px,1fr) minmax(0,2fr);gap:12px;align-items:center;width:100%;padding:10px 12px;border:1px solid #e2e9f1;border-left:4px solid #e4a34f;border-radius:9px;background:#fff;text-align:left}.quality-item.danger{border-left-color:#dc625c;background:#fffafa}.quality-item span{display:grid;gap:3px}.quality-item span b{color:#20354b;font-size:13px}.quality-item span small{color:#73849a;font-size:11px}.quality-item strong{color:#7d5a13;font-size:13px}.quality-item.danger strong{color:#b53a36}.quality-item em{color:#64758a;font-size:12px;font-style:normal;line-height:1.45}.quality-empty{padding:15px 0;color:#60758a;font-size:13px}
@media(max-width:1080px){.dashboard-business-grid{grid-template-columns:1fr}}@media(max-width:560px){.dashboard-business-grid{display:block}.dashboard-business-grid .dashboard-panel+.dashboard-panel{margin-top:14px}.funnel-step{grid-template-columns:84px minmax(0,1fr)}}
@media(max-width:900px){.performance-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-detail-row{grid-template-columns:repeat(3,minmax(0,1fr))}.performance-person{grid-column:1/-1}}@media(max-width:560px){.performance-detail-summary{grid-template-columns:1fr}.performance-detail-row{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-page-actions{width:100%}.performance-page-actions button{flex:1}.panel-link-button{width:100%;margin-top:8px}}
@media(max-width:900px){.business-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.business-kpi-grid{grid-template-columns:1fr}.collection-trend{grid-template-columns:repeat(3,minmax(0,1fr));height:auto}.collection-trend-item{grid-template-rows:110px auto auto}.collection-trend-item>div{height:110px;padding:0 7px}}
@media(max-width:760px){.quality-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.quality-item{grid-template-columns:1fr;gap:5px}.quality-item em{font-size:12px}}

/* Customer bulk management: keep low-frequency bulk work out of the default scan path. */
.lead-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.lead-header-actions>button{white-space:nowrap}
.lead-bulk-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 12px 12px;padding:10px 12px;border:1px solid #c6ddff;border-radius:10px;background:#f4f8ff;color:#174b91}.lead-bulk-bar>span{font-size:13px;font-weight:800}.lead-bulk-bar>div{display:flex;flex-wrap:wrap;gap:8px}.lead-bulk-bar button{min-height:34px;padding:0 10px;border:1px solid #c8d4e2;border-radius:8px;background:#fff;color:#27425c;font-weight:750}.lead-bulk-bar button.danger{border-color:#f3c7c2;color:#b42318;background:#fff7f6}
.lead-work-row{position:relative}.lead-select{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:5px;color:#6e6e73;font-size:12px;cursor:pointer}.lead-select input{width:16px;height:16px;accent-color:#007aff}.lead-work-row.is-selected{border-color:#7db5ff;background:#f8fbff}.lead-work-row .lead-head{padding-right:82px}
.lead-import-modal{width:min(780px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto}.lead-import-body{display:grid;gap:14px;padding:18px}.lead-import-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lead-import-targets label{display:grid;gap:7px;color:#3a3a3c;font-size:13px;font-weight:800}.lead-import-upload{display:grid;gap:10px;padding:16px;border:1px dashed #a8c8b5;border-radius:12px;background:#fbfefc}.lead-import-upload>div:first-child{display:grid;gap:4px}.lead-import-upload strong{font-size:16px;color:#1d1d1f}.lead-import-upload small,.lead-import-file{margin:0;color:#6e6e73;font-size:13px;line-height:1.55}.lead-import-upload .actions{justify-content:flex-start}.lead-import-upload>#previewLeadImport{justify-self:start}.lead-import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.lead-import-summary span{display:grid;gap:2px;padding:10px;border-radius:9px;background:#f2f2f7;color:#52525a;font-size:12px}.lead-import-summary b{font-size:18px;color:#1d1d1f}.lead-import-summary .ok{background:#eaf8ef;color:#18763a}.lead-import-summary .warn{background:#fff7e7;color:#9a6400}.lead-import-summary .error{background:#fff0ef;color:#b42318}.lead-import-mode{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e5e5ea;border-radius:9px;background:#fafafa}.lead-import-mode label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800}.lead-import-mode small{color:#6e6e73;font-size:12px}.lead-import-rows{max-height:300px;overflow:auto;border:1px solid #e5e5ea;border-radius:10px}.lead-import-row{display:grid;grid-template-columns:76px minmax(90px,1fr) minmax(180px,2fr) auto;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #f0f0f2;font-size:13px}.lead-import-row:last-child{border-bottom:0}.lead-import-row small{color:#6e6e73;overflow-wrap:anywhere}.lead-import-row em{font-style:normal;font-weight:800;color:#18763a}.lead-import-row.duplicate em{color:#9a6400}.lead-import-row.error em{color:#b42318}.lead-import-truncated,.empty-copy{margin:0;color:#6e6e73;font-size:12px}.lead-import-history{border-top:1px solid #e5e5ea;padding-top:12px}.lead-import-history summary{cursor:pointer;color:#52525a;font-size:13px;font-weight:800}.lead-import-history>div{display:grid;gap:7px;margin-top:10px}.lead-import-job{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:9px 10px;border-radius:8px;background:#f7f7f8;font-size:12px}.lead-import-job b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lead-import-job span,.lead-import-job small{color:#6e6e73}.lead-import-job small{grid-column:1/-1}
@media(max-width:760px){.lead-header-actions{width:100%}.lead-header-actions>button{flex:1}.lead-bulk-bar{align-items:flex-start;flex-direction:column}.lead-import-targets{grid-template-columns:1fr}.lead-import-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-import-row{grid-template-columns:1fr auto}.lead-import-row small{grid-column:1/-1}.lead-work-row .lead-head{padding-right:0;padding-top:24px}.lead-select{left:12px;right:auto}.lead-import-mode label{align-items:flex-start;flex-direction:column}}

/* CRM 3.0-A: list-first workbench. Customer creation is intentional, not permanent page chrome. */
.crm-workspace{grid-template-columns:minmax(0,1fr)!important}
.crm-workspace .crm-list-panel{width:100%;min-width:0}
body.crm-editor-open::before{position:fixed;z-index:44;inset:0;background:rgba(29,29,31,.36);content:"";backdrop-filter:blur(2px)}
.crm-editor:not([hidden]){position:fixed!important;z-index:45;top:50%!important;left:50%!important;width:min(760px,calc(100vw - 32px))!important;max-width:none!important;max-height:calc(100vh - 32px)!important;overflow:auto!important;transform:translate(-50%,-50%);border:1px solid #d8d8de!important;border-radius:14px!important;background:#fff!important;box-shadow:0 20px 64px rgba(0,0,0,.22)!important}
.crm-editor:not([hidden]) .panel-title{position:sticky;z-index:1;top:0;background:#fff}
.crm-editor:not([hidden]) .actions{position:sticky;z-index:1;bottom:0;background:#fff}
.crm-task-center{margin:14px 0;border:1px solid #d8d8de;border-radius:12px;background:#fff;overflow:hidden}
.crm-task-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid #e5e5ea;background:linear-gradient(120deg,#fff,#f8fbff)}
.crm-task-heading>div:first-child{display:grid;gap:4px;min-width:0}.crm-task-heading strong{font-size:17px;color:#1d1d1f}.crm-task-heading small{color:#6e6e73;line-height:1.5}
.crm-task-tabs{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.crm-task-tabs button{min-height:34px;padding:0 11px;border:1px solid #d1d1d6;border-radius:999px;background:#fff;color:#3a3a3c;font-size:12px;font-weight:800;white-space:nowrap}.crm-task-tabs button:hover{border-color:#8bbaf0;background:#eaf3ff}.crm-task-tabs button.active{border-color:#007aff;background:#eaf3ff;color:#0057c2}
.crm-task-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;background:#fafbfc}.crm-task-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;padding:14px;border:1px solid #e1e5e8;border-radius:10px;background:#fff}.crm-task-row.overdue{border-left:4px solid #ff3b30}.crm-task-row.today{border-left:4px solid #007aff}.crm-task-row.upcoming{border-left:4px solid #34c759}.crm-task-state{display:grid;align-content:start;gap:5px;min-width:52px}.crm-task-state span{display:inline-flex;justify-content:center;align-items:center;min-height:23px;padding:2px 6px;border-radius:999px;background:#f2f2f7;color:#6e6e73;font-size:11px;font-weight:850}.crm-task-row.overdue .crm-task-state span{background:#fff0ef;color:#d70015}.crm-task-row.today .crm-task-state span{background:#eaf3ff;color:#0057c2}.crm-task-row.upcoming .crm-task-state span{background:#eaf8ef;color:#248a3d}.crm-task-state small{color:#6e6e73;font-size:11px;line-height:1.35}.crm-task-main{min-width:0}.crm-task-main strong,.crm-task-main small,.crm-task-main p{display:block}.crm-task-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1d1d1f;font-size:15px}.crm-task-main small{margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6e6e73;font-size:12px}.crm-task-main p{display:-webkit-box;margin:8px 0 0;overflow:hidden;color:#3a3a3c;font-size:13px;line-height:1.45;-webkit-line-clamp:2;-webkit-box-orient:vertical}.crm-task-owner{grid-column:1/2;align-self:end}.crm-task-owner small,.crm-task-owner b{display:block}.crm-task-owner small{color:#6e6e73;font-size:11px}.crm-task-owner b{margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3a3a3c;font-size:12px}.crm-task-actions{grid-column:2/3;display:flex;justify-content:flex-end;align-items:end;gap:7px}.crm-task-actions button{min-height:34px;padding:0 10px;border:1px solid #d1d1d6;border-radius:8px;background:#fff;color:#1d1d1f;font-weight:800;font-size:12px}.crm-task-actions button:first-child{border-color:#007aff;background:#007aff;color:#fff}.crm-task-empty{display:grid;place-items:center;gap:10px;min-height:150px;padding:22px;color:#6e6e73;text-align:center}.crm-task-empty strong{max-width:42ch;color:#3a3a3c;line-height:1.55}.crm-task-empty button{min-height:36px;padding:0 13px;border:1px solid #007aff;border-radius:8px;background:#fff;color:#007aff;font-weight:800}
@media(max-width:980px){.crm-task-heading{flex-direction:column}.crm-task-tabs{justify-content:flex-start}.crm-task-list{grid-template-columns:1fr}}
@media(max-width:640px){.crm-editor:not([hidden]){width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important}.crm-task-heading{padding:14px}.crm-task-list{padding:9px}.crm-task-row{padding:12px}.crm-task-actions button{flex:1}.crm-task-actions{gap:6px}}

/* Admin icon system v2: real SVG symbols instead of decorative CSS blocks. */
.icon-sprite{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}
.admin-icon,
.metric-icon{
  display:block;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
nav button::before,
.summary div::before,
.summary div::after{
  display:none!important;
}
nav button{
  gap:10px!important;
  min-height:42px!important;
  padding:0 12px!important;
}
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;
}
.summary b{
  align-self:end;
}
.summary span{
  align-self:start;
}
.bank-upload-icon{
  width:44px!important;
  height:44px!important;
  padding:10px!important;
  border-radius:14px!important;
  fill:none!important;
  stroke:#007aff!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  background:#edf5ff!important;
  box-shadow:none!important;
}
.bank-upload-icon::before,
.bank-upload-icon::after{
  display:none!important;
}
.bank-status-dot{
  display:grid!important;
  place-items:center!important;
  background:#edf5ff!important;
}
.bank-status-dot::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background:#007aff;
}
@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;
  }
}

/* CRM hierarchy pass: make the daily work queue feel like one calm workspace. */
main#leadsView{
  --crm-ink:#1d1d1f;
  --crm-muted:#6e6e73;
  --crm-line:#d8d8de;
  --crm-subtle:#f7f7f9;
  --crm-blue:#007aff;
  --crm-blue-soft:#eaf3ff;
  --crm-green:#248a3d;
  --crm-danger:#d70015;
  padding-bottom:56px;
}
main#leadsView>header{
  align-items:center;
  min-height:76px;
  margin:0 0 16px;
  padding:2px 0;
}
main#leadsView>header h1{
  color:var(--crm-ink);
  font-size:28px;
  letter-spacing:-.025em;
  line-height:1.18;
  text-wrap:balance;
}
main#leadsView>header p{
  max-width:660px;
  margin-top:7px;
  color:var(--crm-muted);
  font-size:14px;
  line-height:1.55;
}
.lead-header-actions{
  flex:0 0 auto;
  gap:8px;
}
.lead-header-actions>button{
  min-height:40px;
  padding:0 15px;
  border:1px solid var(--crm-line);
  border-radius:9px;
  background:#fff;
  color:#3a3a3c;
  font-size:14px;
  font-weight:750;
}
.lead-header-actions>button:hover{
  border-color:#9ac5ff;
  background:#f7fbff;
  color:#0057c2;
}
.lead-header-actions>.primary{
  border-color:var(--crm-blue)!important;
  background:var(--crm-blue)!important;
  color:#fff!important;
}

main#leadsView .summary{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}
main#leadsView .summary div{
  min-height:82px!important;
  padding:14px!important;
  border-color:var(--crm-line)!important;
  border-radius:10px!important;
  background:#fff!important;
}
main#leadsView .summary b{font-size:22px!important;letter-spacing:-.02em}
main#leadsView .summary span{font-size:12px!important;color:#5b5b60!important}
main#leadsView .metric-icon{
  width:40px;
  height:40px;
  padding:9px;
  border-radius:11px;
}
main#leadsView #leadNotice{min-height:30px;padding:8px 2px 2px}

main#leadsView .crm-focus-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:8px 0 14px;
  padding:14px 16px;
  border:1px solid #cfe1ff;
  border-radius:10px;
  background:#f7fbff;
}
main#leadsView .crm-focus-panel .eyebrow,
main#leadsView .crm-task-heading .eyebrow{
  color:#0057c2;
  font-size:12px;
  font-weight:800;
  letter-spacing:0;
}
main#leadsView .crm-focus-panel strong{
  display:block;
  margin-top:2px;
  color:var(--crm-ink);
  font-size:16px;
  line-height:1.35;
}
main#leadsView .crm-focus-panel small{
  display:block;
  margin-top:3px;
  color:#5f6e83;
  font-size:13px;
  line-height:1.45;
}
main#leadsView .crm-focus-actions{display:flex;flex-wrap:wrap;gap:8px;flex:0 0 auto}
main#leadsView .crm-focus-actions button{
  min-height:36px;
  padding:0 12px;
  border:1px solid #bdd8ff;
  border-radius:8px;
  background:#fff;
  color:#174b91;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
main#leadsView .crm-focus-actions button:hover{background:#eaf3ff}
main#leadsView .crm-focus-actions b{
  display:inline-grid;
  min-width:20px;
  height:20px;
  margin-left:5px;
  place-items:center;
  border-radius:999px;
  background:#eaf3ff;
  color:#0057c2;
  font-size:12px;
}

main#leadsView .crm-task-center{
  margin:0 0 14px;
  border-color:var(--crm-line);
  border-radius:10px;
  background:#fff;
}
main#leadsView .crm-task-heading{
  padding:14px 16px;
  border-bottom-color:#e8e8ed;
  background:#fff;
}
main#leadsView .crm-task-heading strong{font-size:16px}
main#leadsView .crm-task-list{padding:10px;background:var(--crm-subtle)}
main#leadsView .crm-task-row{
  border-color:#e1e1e6;
  border-radius:9px;
  box-shadow:none;
}
main#leadsView .crm-task-row.overdue,
main#leadsView .crm-task-row.today,
main#leadsView .crm-task-row.upcoming{border-left-width:3px}
main#leadsView .crm-task-tabs button,
main#leadsView .quick-filters button{
  min-height:34px;
  border-radius:8px;
  font-size:13px;
}
main#leadsView .quick-filters{
  gap:7px;
  margin:0 0 12px;
  padding:2px 0;
}
main#leadsView .quick-filters button{border-color:var(--crm-line);background:#fff}
main#leadsView .quick-filters button.active{
  border-color:#8bbaf0;
  background:var(--crm-blue-soft);
  color:#0057c2;
}

main#leadsView .crm-list-panel{
  overflow:hidden;
  border-color:var(--crm-line)!important;
  border-radius:10px!important;
  background:#fff!important;
}
main#leadsView .crm-list-panel .student-toolbar{
  position:sticky;
  top:0;
  z-index:3;
  margin:0!important;
  padding:12px!important;
  border-bottom:1px solid #e5e5ea;
  background:#fff!important;
}
main#leadsView .crm-list-panel .student-toolbar select,
main#leadsView .crm-list-panel .student-toolbar input{
  min-height:38px;
  border-color:#d1d1d6!important;
  background:#fff!important;
}
main#leadsView .crm-list-panel .student-toolbar button{
  min-height:38px;
  border-color:#d1d1d6!important;
  background:#f7f7f9!important;
  color:#1d1d1f!important;
}
main#leadsView .crm-list-panel .student-toolbar button:hover{background:#ededf2!important}
main#leadsView .lead-bulk-bar{
  margin:10px 12px 0;
  border-color:#bdd8ff;
  background:#f4f8ff;
}
main#leadsView .lead-list{
  display:grid;
  gap:0;
  padding:0;
  background:#fff;
}
main#leadsView .lead-work-row,
main#leadsView .lead-card-pro{
  border:0!important;
  border-bottom:1px solid #e9e9ee!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
main#leadsView .lead-work-row:last-child,
main#leadsView .lead-card-pro:last-child{border-bottom:0!important}
main#leadsView .lead-work-row:hover,
main#leadsView .lead-card-pro:hover{
  transform:none!important;
  background:#fafcff!important;
}
main#leadsView .lead-work-row.is-selected{background:#f3f8ff!important;box-shadow:inset 3px 0 0 #007aff!important}
main#leadsView .lead-work-meta span,
main#leadsView .lead-kpis span{border-radius:7px;background:#f7f7f9!important}
main#leadsView .lead-actions{gap:7px}
main#leadsView .lead-actions button{
  min-height:34px;
  border-radius:8px!important;
  font-size:12px;
}
main#leadsView .lead-actions .primary{background:#007aff!important;border-color:#007aff!important}
main#leadsView .crm-pager{
  min-height:62px;
  padding:12px 14px;
  border-top:1px solid #e5e5ea;
  background:#fff;
}

.modal-mask{padding:16px}
.modal-panel.lead-import-modal,
#leadFollowForm.modal-panel{border-radius:12px!important}
.lead-import-upload{
  border-color:#aacdf6;
  border-style:solid;
  background:#f8fbff;
}
.lead-import-summary span{border:1px solid #e5e5ea;background:#f7f7f9}
.lead-import-mode{background:#fff}
.lead-import-row{background:#fff}

@media(max-width:1180px){
  main#leadsView .summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  main#leadsView{padding-bottom:28px}
  main#leadsView>header{align-items:flex-start;flex-direction:column;gap:12px}
  main#leadsView>header h1{font-size:24px}
  main#leadsView .lead-header-actions{width:100%}
  main#leadsView .lead-header-actions>button{flex:1}
  main#leadsView .summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  main#leadsView .crm-focus-panel{align-items:flex-start;flex-direction:column;gap:12px}
  main#leadsView .crm-focus-actions{width:100%}
  main#leadsView .crm-focus-actions button{flex:1;padding:0 8px}
  main#leadsView .crm-list-panel .student-toolbar{position:static}
  main#leadsView .lead-work-row,
  main#leadsView .lead-card-pro{padding-left:14px!important;padding-right:14px!important}
}
@media(max-width:420px){
  main#leadsView .summary{grid-template-columns:1fr!important}
  main#leadsView .crm-focus-actions{display:grid;grid-template-columns:1fr}
  main#leadsView .crm-task-tabs{display:grid;grid-template-columns:1fr 1fr;width:100%}
}
@media(prefers-reduced-motion:reduce){
  main#leadsView *,
  main#leadsView *::before,
  main#leadsView *::after{transition-duration:0.01ms!important;animation-duration:0.01ms!important}
}

/* 客户 360：统一动态与负责人交接。弹层本身不滚出视口，长内容仅在内容区滚动。 */
.lead-transfer-modal{
  width:min(560px,100%);
  max-height:calc(100vh - 32px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.lead-transfer-modal .modal-heading{flex:0 0 auto}
.lead-transfer-modal .crm-fields{
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
.lead-transfer-modal .actions{
  position:sticky;
  bottom:0;
  z-index:1;
  margin:0 -2px -2px;
  padding:14px 2px 2px;
  border-top:1px solid #e7edf5;
  background:#fff;
}
.lead-transfer-modal .privacy-tip{
  margin:2px 0 2px;
  color:#66758a;
  font-size:13px;
  line-height:1.55;
}
.owner-transfer-action{
  border-color:#c7b5ff!important;
  background:#f7f3ff!important;
  color:#6843c4!important;
}
.owner-transfer-action:hover{background:#eee7ff!important}
.detail-unified-timeline{margin-top:14px}
.detail-history-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.detail-history-title small{display:block;margin-top:4px}
.detail-history-title>span{
  flex:0 0 auto;
  padding:4px 8px;
  border-radius:999px;
  background:#edf5ff;
  color:#1665c1;
  font-size:12px;
  font-weight:800;
}
.timeline-filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:12px 0 10px;
}
.timeline-filter-bar button{
  min-height:30px;
  padding:0 10px;
  border:1px solid #dce5f0;
  border-radius:999px;
  background:#fff;
  color:#526175;
  font-size:12px;
  font-weight:800;
}
.timeline-filter-bar button.active{
  border-color:#8ebcff;
  background:#eef6ff;
  color:#1264c3;
}
.timeline-entry.activity-entry{
  border-left:3px solid #8e6ee8;
  background:linear-gradient(90deg,#faf8ff 0%,#fff 58%);
}
.timeline-entry.activity-entry .timeline-head span{color:#7652c6}
.timeline-entry p{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.timeline-arrow{color:#8a6dde;font-size:17px;font-weight:900}
.owner-transfer-reason{
  margin-top:9px;
  padding:8px 10px;
  border-radius:8px;
  background:#f3efff;
  color:#59478d;
  font-size:13px;
  line-height:1.5;
}
.detail-tags{margin:0 0 14px;padding:13px 14px;border:1px solid #dce8f5;border-radius:10px;background:#f8fbff}.detail-tags>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}.detail-tags small,.detail-tags strong{display:block}.detail-tags small{color:#60758a;font-size:11px;font-weight:800}.detail-tags strong{margin-top:3px;color:#17324d;font-size:13px}.detail-tags>div:first-child button{min-height:30px;padding:0 9px;border:1px solid #b8d6f5;border-radius:7px;background:#fff;color:#0057c2;font-size:12px;font-weight:800}.lead-tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.lead-tag{display:inline-flex;align-items:center;gap:5px;min-height:27px;padding:3px 8px;border:1px solid #cfe2fa;border-radius:999px;background:#fff;color:#245d94;font-size:12px;font-weight:800}.lead-tag b{font-size:15px;line-height:1;font-weight:500}.lead-tag-empty{color:#718399;font-size:12px}.lead-tag-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.lead-tag-suggestions button{min-height:26px;padding:0 7px;border:1px dashed #b8d6f5;border-radius:999px;background:transparent;color:#4c78a8;font-size:11px;font-weight:750}.timeline-entry.activity-entry:has(.timeline-head span){border-left-color:#8e6ee8}.timeline-entry.activity-entry .timeline-head span{color:#7652c6}.timeline-entry.activity-entry:has(.timeline-head span) p{color:#59478d}
@media(max-width:560px){
  .modal-mask{padding:10px}
  .lead-transfer-modal{max-height:calc(100vh - 20px)}
  .lead-transfer-modal .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .detail-history-title{flex-direction:column;gap:7px}
  .timeline-filter-bar{display:grid;grid-template-columns:1fr 1fr}
  .timeline-filter-bar button:first-child{grid-column:1/-1}
}

/* CRM pipeline: a focused, draggable sales view that reuses the existing customer data. */
.lead-view-toggle{display:flex;align-items:center;padding:3px;border:1px solid #d1d1d6;border-radius:10px;background:#f2f2f7}
.lead-view-toggle button{min-height:32px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:#6e6e73;font-size:13px;font-weight:800}
.lead-view-toggle button.active{background:#fff;color:#0057c2;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.lead-pipeline{display:flex;align-items:stretch;gap:12px;min-height:440px;margin:0 0 16px;padding:2px 0 10px;overflow-x:auto;scrollbar-color:#c7c7cc transparent}
.pipeline-insights{position:sticky;left:0;display:flex;gap:8px;align-items:center;min-width:max-content;padding:3px 0 8px}.pipeline-insights span{padding:7px 10px;border:1px solid #dce5f0;border-radius:8px;background:#fff;color:#526175;font-size:12px}.pipeline-insights b{margin-right:3px;color:#0057c2}.pipeline-insights span.alert{border-color:#f2c6c0;background:#fff7f6;color:#b42318}.pipeline-insights span.alert b{color:#b42318}
.pipeline-column{display:flex;flex:0 0 250px;flex-direction:column;min-height:420px;border:1px solid #d8d8de;border-radius:12px;background:#f7f8fa;overflow:hidden}
.pipeline-column>header{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;padding:14px;border-bottom:1px solid #e5e5ea;background:#fff}
.pipeline-column header div{display:grid;gap:4px;min-width:0}.pipeline-column header strong{font-size:14px;color:#1d1d1f}.pipeline-column header small{color:#6e6e73;font-size:12px;line-height:1.35}.pipeline-column header em{color:#0057c2;font-size:11px;font-style:normal;font-weight:800}.pipeline-column>header>b{display:grid;place-items:center;min-width:25px;height:25px;border-radius:999px;background:#eaf3ff;color:#0057c2;font-size:12px}
.pipeline-column>footer{padding:9px 10px;border-top:1px solid #f2d6d2;background:#fff7f6;color:#b42318;font-size:12px;font-weight:800}
.pipeline-dropzone{display:grid;align-content:start;gap:9px;flex:1;min-height:300px;padding:10px;transition:background .16s,box-shadow .16s}.pipeline-dropzone.is-drag-over{background:#eaf3ff;box-shadow:inset 0 0 0 2px #8bbaf0}
.pipeline-card{display:grid;gap:7px;padding:12px;border:1px solid #d8d8de;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04);cursor:grab}.pipeline-card.is-dragging{opacity:.45}.pipeline-card:active{cursor:grabbing}
.pipeline-card-head,.pipeline-card-foot,.pipeline-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.pipeline-card-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#1d1d1f}.pipeline-card-head span{flex:0 0 auto;padding:2px 6px;border-radius:999px;background:#fff7e7;color:#9a6400;font-size:11px;font-weight:800}.pipeline-card>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6e6e73;font-size:12px}.pipeline-card p{min-height:18px;margin:0;color:#3a3a3c;font-size:12px;line-height:1.5}.pipeline-card-foot{padding-top:7px;border-top:1px solid #f0f0f2;font-size:12px}.pipeline-card-foot b{font-weight:800}.pipeline-card-foot em{font-style:normal;color:#0057c2;font-weight:800}.pipeline-card-actions{justify-content:flex-start}.pipeline-card-actions button{min-height:28px;padding:0 8px;border:1px solid #d1d1d6;border-radius:7px;background:#fff;color:#3a3a3c;font-size:12px;font-weight:800}.pipeline-card-actions button:hover{border-color:#8bbaf0;background:#f7fbff;color:#0057c2}.pipeline-empty{padding:20px 8px;color:#8e8e93;font-size:12px;text-align:center}.pipeline-note{position:sticky;left:0;align-self:flex-end;min-width:100%;margin:0;padding:0 2px;color:#6e6e73;font-size:12px}
@media(max-width:760px){.lead-header-actions .lead-view-toggle{order:-1;width:100%}.lead-header-actions .lead-view-toggle button{flex:1}.lead-header-actions>button{flex:1}.lead-pipeline{margin-right:-2px}.pipeline-column{flex-basis:230px}}
.lead-saved-views{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:0;border:0;background:transparent}.lead-saved-views strong{flex:0 0 auto;color:#6e6e73;font-size:12px}.lead-view-presets{display:flex;flex:1;flex-wrap:wrap;gap:6px}.lead-view-presets button{min-height:30px;padding:0 10px;border:1px solid #d8d8de;border-radius:999px;background:#fff;color:#526175;font-size:12px;font-weight:800}.lead-view-presets button.active,.lead-view-presets button:hover{border-color:#8bbaf0;background:#eaf3ff;color:#0057c2}.lead-saved-view-actions{display:flex;align-items:center;gap:6px}.lead-saved-view-actions select{min-width:150px;height:30px;font-size:12px}.lead-saved-view-actions button{min-height:30px;padding:0 9px;border:1px solid #c7d5e5;border-radius:7px;background:#fff;color:#0057c2;font-size:12px;font-weight:800}.lead-saved-view-actions button:hover{background:#f2f8ff}.lead-saved-view-actions #deleteLeadView{color:#b42318;border-color:#efc4bf}@media(max-width:760px){.lead-saved-views{align-items:flex-start;flex-wrap:wrap}.lead-view-presets{order:2;flex-basis:100%}.lead-saved-view-actions{margin-left:auto}.lead-saved-view-actions select{max-width:145px}}
.automation-panel{margin-top:16px;padding:16px 18px;border:1px solid #d8d8de;border-radius:12px;background:#fff}.automation-panel .panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.automation-panel .panel-title small{display:block;margin-top:4px;color:#6e6e73;line-height:1.5}.automation-panel .panel-title button{min-height:34px;padding:0 11px;border:1px solid #9cc4f5;border-radius:8px;background:#f4f9ff;color:#0057c2;font-weight:800}.automation-log-list{display:grid;gap:8px;margin-top:13px}.automation-log{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(0,2fr) auto;gap:12px;align-items:center;width:100%;padding:11px 12px;border:1px solid #e3e8ef;border-left:4px solid #7ba9dc;border-radius:9px;background:#fff;text-align:left}.automation-log.warning{border-left-color:#e6a23c;background:#fffdfa}.automation-log.danger{border-left-color:#df625b;background:#fff8f7}.automation-log span{font-size:13px;font-weight:850;color:#1d1d1f}.automation-log small{overflow:hidden;color:#596779;font-size:12px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}.automation-log b{padding:4px 7px;border-radius:999px;background:#edf4fc;color:#27639f;font-size:11px}.automation-empty{display:grid;gap:4px;padding:16px 0;color:#6e6e73}.automation-empty strong{color:#3a3a3c;font-size:13px}.automation-empty span{font-size:12px}@media(max-width:760px){.automation-panel{padding:14px}.automation-log{grid-template-columns:1fr;gap:5px}.automation-log small{white-space:normal}.automation-log b{justify-self:start}.automation-panel .panel-title{flex-direction:column}.automation-panel .panel-title button{width:100%}}

/* Reliability pass: every asynchronous area explains what is happening and offers a safe retry. */
.async-state-cell{padding:0!important}.async-state{display:grid;place-items:center;align-content:center;gap:7px;min-height:168px;padding:24px 18px;color:#6e6e73;text-align:center}.async-state strong{color:#1d1d1f;font-size:15px}.async-state span{max-width:42ch;font-size:13px;line-height:1.55}.async-state.loading strong::before{content:"";display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:50%;background:#007aff;box-shadow:14px 0 0 -2px #72b7ff,28px 0 0 -4px #b9dcff;animation:crm-loading-pulse 1s ease-in-out infinite;vertical-align:1px}.async-state.error{border:1px dashed #f0b3ad;background:#fff9f8;color:#9f2f25}.async-state.error strong{color:#b42318}.async-state.empty{min-height:190px;border:1px dashed #d1d1d6;background:#fafafa}.async-state button{min-height:34px;margin-top:4px;padding:0 13px;border:1px solid #9cc4f5;border-radius:8px;background:#fff;color:#0057c2;font-weight:800}.async-state button:hover{background:#eef6ff}@keyframes crm-loading-pulse{50%{opacity:.35;transform:translateX(2px)}}
.table-wrap,.performance-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.performance-table{min-width:640px}.student-list-panel .table-wrap table{min-width:920px}
@media(max-width:900px){body:not(.login-mode){display:block!important}body:not(.login-mode) aside{position:sticky!important;top:0!important;display:block!important;width:100%!important;padding:10px 12px!important;z-index:30}body:not(.login-mode) aside .brand{padding:0 2px 9px!important}body:not(.login-mode) aside nav{display:flex!important;gap:7px!important;overflow-x:auto!important;scrollbar-width:none}body:not(.login-mode) aside nav::-webkit-scrollbar{display:none}body:not(.login-mode) aside nav button{flex:0 0 auto!important;min-height:40px!important;padding:0 12px!important;white-space:nowrap}body:not(.login-mode) aside .company{display:none!important}}
@media(max-width:700px){.async-state-cell{display:block!important;width:100%!important}.async-state{min-height:148px;padding:20px 14px}.async-state.empty{min-height:168px}.student-list-panel .table-wrap{overflow-x:auto!important}.student-list-panel .table-wrap table{min-width:680px!important}.performance-table-wrap{margin-left:0;margin-right:0}.performance-table{min-width:560px!important}}@media(prefers-reduced-motion:reduce){.async-state.loading strong::before{animation:none}}

/* Customer intake is a real top-layer modal. The form is moved to body while
   opened, avoiding stacking-context issues inside the CRM view. */
body.crm-editor-open::before{position:fixed!important;z-index:1000!important;inset:0;display:block!important;background:rgba(29,29,31,.36)!important;content:"";backdrop-filter:blur(2px)}
body > #leadForm.crm-editor:not([hidden]){
  position:fixed!important;
  z-index:1001!important;
  top:50%!important;
  left:50%!important;
  width:min(760px,calc(100vw - 32px))!important;
  max-width:none!important;
  max-height:calc(100vh - 32px)!important;
  margin:0!important;
  overflow:auto!important;
  transform:translate(-50%,-50%)!important;
  border:1px solid #d8d8de!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 20px 64px rgba(0,0,0,.22)!important;
}
body > #leadForm.crm-editor:not([hidden]) .panel-title{position:sticky;z-index:1;top:0;background:#fff}
body > #leadForm.crm-editor:not([hidden]) .actions{position:sticky;z-index:1;bottom:0;background:#fff}
@media(max-width:640px){body > #leadForm.crm-editor:not([hidden]){width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px)!important}}

/* Feishu-inspired CRM shell: bright workspace, quiet navigation and blue actions. */
:root{
  --brand:#3370ff;
  --brand-strong:#245bdb;
  --brand-soft:#eaf2ff;
  --ink:#1f2329;
  --ink-2:#2b2f36;
  --muted:#646a73;
  --line:#dee0e3;
  --line-soft:#ebecef;
  --bg:#fff;
  --surface:#fff;
  --surface-2:#f5f6f7;
}
body:not(.login-mode){grid-template-columns:240px minmax(0,1fr)!important;background:#fff!important;color:#1f2329!important}
body:not(.login-mode)>aside{
  position:sticky!important;
  top:0!important;
  height:100vh!important;
  padding:20px 14px!important;
  border-right:1px solid #e5e6e8!important;
  background:#f7f8fa!important;
  color:#1f2329!important;
  box-shadow:none!important;
}
.brand{padding:2px 10px 24px!important}
.brand>span{width:38px!important;height:38px!important;border-radius:9px!important;background:linear-gradient(135deg,#3370ff,#5b8cff)!important;color:#fff!important;box-shadow:none!important}
.brand strong{color:#1f2329!important;font-size:17px!important}
.brand small{color:#8f959e!important;font-size:11px!important}
nav{gap:4px!important}
nav button{
  min-height:43px!important;
  padding:0 12px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#4e5969!important;
  font-size:14px!important;
  font-weight:650!important;
}
nav button:hover{background:#eef0f3!important;color:#1f2329!important}
nav button.active{background:#e9ebee!important;color:#1f2329!important;font-weight:800!important}
nav button .admin-icon{width:20px!important;height:20px!important;color:#646a73!important}
nav button.active .admin-icon{color:#3370ff!important}
.company{border-top:1px solid #e1e3e6!important;color:#646a73!important}
.company button{border:1px solid #dee0e3!important;background:#fff!important;color:#4e5969!important}
body:not(.login-mode)>main{width:100%!important;max-width:none!important;margin:0!important;padding:28px 30px 42px!important;background:#fff!important}
main>header{min-height:88px!important;align-items:flex-start!important}
main>header h1{margin-top:5px!important;color:#1f2329!important;font-size:30px!important;line-height:1.2!important;letter-spacing:-.02em!important}
main>header p{margin-top:8px!important;color:#8f959e!important;font-size:14px!important}
.page-eyebrow{color:#3370ff;font-size:12px;font-weight:800;letter-spacing:.04em}
.primary{border:1px solid #3370ff!important;border-radius:8px!important;background:#3370ff!important;color:#fff!important;box-shadow:none!important}
.primary:hover{background:#245bdb!important}
.crm-launcher{
  display:grid;
  grid-template-columns:repeat(6,minmax(105px,1fr));
  gap:14px;
  margin:18px 0 26px;
  padding:0;
}
.crm-launcher button{display:grid;place-items:center;gap:10px;min-height:132px;padding:16px 10px;border:1px solid transparent;border-radius:16px;background:#f5f6f7;color:#4e5969;transition:.16s ease}
.crm-launcher button:hover{border-color:#c9d8ff;background:#eef4ff;transform:translateY(-1px)}
.crm-launcher button span{display:grid;place-items:center;width:66px;height:66px;border-radius:15px;background:#e7e8ea;color:#2b2f36}
.crm-launcher button:first-child,.crm-launcher button:nth-child(3){background:#eef4ff}
.crm-launcher button:first-child span,.crm-launcher button:nth-child(3) span{background:#dfeaff;color:#3370ff}
.crm-launcher .admin-icon{width:31px!important;height:31px!important}
.crm-launcher b{font-size:14px;font-weight:700}
.summary,.dashboard-summary{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;
  gap:14px!important;
  margin:0 0 18px!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.summary>div,.dashboard-summary>div{
  min-height:116px!important;
  padding:18px!important;
  border:1px solid #dee0e3!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.summary>div:hover,.dashboard-summary>div:hover{border-color:#b7caff!important;background:#fbfdff!important}
.summary b,.dashboard-summary b{color:#1f2329!important;font-size:26px!important}
.summary span,.dashboard-summary span{color:#8f959e!important;font-size:12px!important}
.metric-icon{color:#3370ff!important;background:#eef4ff!important}
.dashboard-grid,.dashboard-business-grid{gap:18px!important}
.dashboard-panel,.business-kpi-grid article,.performance-detail-summary article,.automation-panel{
  border:1px solid #dee0e3!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.panel-title,.editor-title{border-bottom-color:#ebecef!important;background:#fff!important}
.panel-title strong,.editor-title strong{color:#1f2329!important}
.dashboard-task,.dashboard-actions button,.quality-summary button{border-color:#e5e6e8!important;border-radius:10px!important;background:#fafbfc!important}
.dashboard-actions strong{background:#eef4ff!important;color:#3370ff!important}
.business-kpi-grid article strong,.business-rate,.quality-total{color:#3370ff!important}
.list-panel,.editor,.student-editor,.student-list-panel,.crm-editor,.crm-list-panel{border-color:#dee0e3!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important}
table{border-collapse:collapse!important}
th{color:#646a73!important;font-weight:650!important;background:#fafbfc!important}
td,th{border-bottom-color:#ebecef!important}
tbody tr:hover{background:#f7f9fc!important}
input,select,textarea{border-color:#d7d9dc!important;border-radius:8px!important;color:#1f2329!important}
input:focus,select:focus,textarea:focus{border-color:#3370ff!important;box-shadow:0 0 0 3px rgba(51,112,255,.13)!important}
.tag,.lead-stage{border:0!important;background:#f0f1f3!important;color:#4e5969!important}
.lead-stage.converted{background:#e8f8ef!important;color:#16865c!important}
.quick-filters button.active,.lead-view-presets button.active{border-color:#a9c0ff!important;background:#eef4ff!important;color:#245bdb!important}
@media(max-width:1200px){.crm-launcher{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:900px){
  body:not(.login-mode){display:block!important}
  body:not(.login-mode)>aside{position:sticky!important;height:auto!important;padding:10px 12px!important;border-right:0!important;border-bottom:1px solid #e5e6e8!important}
  body:not(.login-mode)>aside .brand{padding:0 2px 9px!important}
  body:not(.login-mode)>aside nav{display:flex!important;overflow-x:auto!important}
  body:not(.login-mode)>aside nav button{flex:0 0 auto!important}
  body:not(.login-mode)>main{padding:20px 16px 34px!important}
  .crm-launcher{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
  .crm-launcher button{min-height:106px;border-radius:12px}
  .crm-launcher button span{width:52px;height:52px}
}
@media(max-width:560px){.crm-launcher{grid-template-columns:repeat(2,minmax(0,1fr))}main>header h1{font-size:25px!important}}

/* Official Runcheng trademark lockup */
.brand>.brand-logo-mark{
  flex:0 0 auto;
  width:42px!important;
  height:42px!important;
  display:block;
  object-fit:contain;
}
.login-brand-logo{
  width:210px;
  height:auto;
  display:block;
  object-fit:contain;
}
@media(max-width:900px){
  .brand>.brand-logo-mark{width:36px!important;height:36px!important}
  .login-brand-logo{width:190px}
}

/* 润成 CRM 2.0 / P0：先建立稳定的信息架构与销售工作台。
   这里只重排现有页面和数据，不改变任何业务接口。 */
body:not(.login-mode)>aside{overflow-y:auto!important}
aside nav{display:grid!important;gap:14px!important}
.nav-section{display:grid;gap:3px}
.nav-section:not(:has(button:not([hidden]))){display:none}
.nav-group-title{padding:0 12px 4px;color:#8f959e;font-size:11px;font-weight:750;letter-spacing:.08em}
.nav-section button{width:100%}
.nav-workbench{padding-bottom:7px;border-bottom:1px solid #e6e8eb}

.workbench-header{gap:20px}
.workbench-header-actions{display:flex;align-items:center;gap:9px}
.workbench-header-actions button{min-height:38px;padding:0 14px;border:1px solid #d7d9dc;border-radius:8px;background:#fff;color:#4e5969;font-weight:750}
.workbench-header-actions button:hover{border-color:#a9c0ff;background:#f7faff;color:#245bdb}

.workbench-kpis{grid-template-columns:repeat(5,minmax(132px,1fr))!important;margin-top:10px!important}
.workbench-kpis>div{display:grid!important;align-content:start!important;gap:7px!important;min-height:118px!important;padding:17px 18px!important}
.workbench-kpis span{order:0;color:#646a73!important;font-size:13px!important;font-weight:700}
.workbench-kpis b{order:1;color:#1f2329!important;font-size:28px!important;line-height:1.2}
.workbench-kpis small{order:2;color:#a0a5ad;font-size:11px;line-height:1.35}
.workbench-kpis .kpi-today b{color:#3370ff!important}
.workbench-kpis .kpi-overdue b{color:#d14343!important}

.workbench-focus-grid{display:grid;grid-template-columns:minmax(520px,1.55fr) minmax(330px,.85fr);gap:18px;margin-top:18px}
.workbench-focus-grid .dashboard-panel{min-width:0}
.workbench-focus-grid .panel-title>div>*{display:block}
.workbench-focus-grid .panel-title>div small{margin-top:5px}
.dashboard-task-head{display:grid;grid-template-columns:minmax(0,1fr) 92px 62px;gap:12px;margin-top:14px;padding:0 12px 8px;border-bottom:1px solid #ebecef;color:#8f959e;font-size:11px;font-weight:750}
.dashboard-task-head span:nth-child(2),.dashboard-task-head span:nth-child(3){text-align:center}
.priority-panel .dashboard-list{gap:0;margin-top:0}
.priority-panel .dashboard-task{grid-template-columns:minmax(0,1fr) 92px 62px!important;grid-template-rows:auto auto!important;gap:4px 12px!important;padding:13px 12px!important;border:0!important;border-bottom:1px solid #ebecef!important;border-radius:0!important;background:#fff!important}
.priority-panel .dashboard-task:hover{background:#f7faff!important}
.priority-panel .dashboard-task span{grid-column:1;grid-row:1;color:#1f2329;font-size:13px}
.priority-panel .dashboard-task small{grid-column:1;grid-row:2;color:#8f959e}
.priority-panel .dashboard-task b{grid-column:2!important;grid-row:1/3!important;justify-self:center;padding:4px 8px;border-radius:999px;background:#fff5e6;color:#9b6500!important;font-size:11px;font-weight:750}
.priority-panel .dashboard-task i{grid-column:3;grid-row:1/3;align-self:center;justify-self:center;color:#3370ff;font-size:12px;font-style:normal;font-weight:800}
.priority-panel .dashboard-empty{min-height:210px}
.workbench-focus-grid .funnel-panel{display:flex;flex-direction:column}
.workbench-focus-grid .crm-funnel{flex:1;margin-top:18px}
.funnel-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;padding-top:15px;border-top:1px solid #ebecef;color:#646a73;font-size:12px}
.funnel-summary strong{color:#1f2329;font-size:18px}

.workbench-quick-actions{display:flex!important;align-items:center;gap:8px!important;margin:18px 0 0!important;padding:12px 14px!important;border:1px solid #dee0e3;border-radius:12px;background:#fff}
.workbench-quick-actions>strong{margin-right:6px;color:#646a73;font-size:12px;white-space:nowrap}
.workbench-quick-actions button{display:flex!important;place-items:unset!important;align-items:center!important;gap:7px!important;min-height:34px!important;padding:0 11px!important;border:1px solid #e1e3e6!important;border-radius:8px!important;background:#fafbfc!important;color:#4e5969!important}
.workbench-quick-actions button:hover{border-color:#a9c0ff!important;background:#eef4ff!important;color:#245bdb!important;transform:none!important}
.workbench-quick-actions button .admin-icon{width:17px!important;height:17px!important;color:#3370ff}
.workbench-quick-actions button b{font-size:12px}
.workbench-secondary-grid{grid-template-columns:1fr!important;margin-top:18px}
.workbench-secondary-grid .dashboard-actions{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}
.workbench-secondary-grid .dashboard-actions button{grid-template-columns:40px 1fr;min-height:60px}
.workbench-secondary-grid .dashboard-actions strong{width:38px;height:38px}
.business-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.dashboard-business-grid{grid-template-columns:1fr!important}

@media(max-width:1100px){
  .workbench-kpis{grid-template-columns:repeat(3,minmax(150px,1fr))!important}
  .workbench-focus-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  aside nav{display:flex!important;gap:7px!important}
  .nav-section{display:contents}
  .nav-section button{width:auto}
  .nav-group-title{display:none}
  .nav-workbench{padding:0;border:0}
  .workbench-header-actions{width:auto}
  .workbench-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .workbench-quick-actions{overflow-x:auto}
  .workbench-quick-actions button{flex:0 0 auto!important}
  .business-kpi-grid{grid-template-columns:repeat(3,minmax(170px,1fr))!important;overflow-x:auto}
}
@media(max-width:620px){
  .workbench-header{display:grid!important}
  .workbench-header-actions{width:100%}
  .workbench-header-actions button{flex:1}
  .workbench-kpis{grid-template-columns:1fr 1fr!important}
  .workbench-kpis>div{min-height:104px!important}
  .workbench-kpis small{display:none}
  .workbench-kpis>div:last-child{grid-column:1/-1}
  .dashboard-task-head{display:none}
  .priority-panel .dashboard-task{grid-template-columns:minmax(0,1fr) 58px!important}
  .priority-panel .dashboard-task span,.priority-panel .dashboard-task small{grid-column:1!important}
  .priority-panel .dashboard-task b{grid-column:1!important;grid-row:3!important;justify-self:start!important}
  .priority-panel .dashboard-task i{grid-column:2!important;grid-row:1/4!important}
  .workbench-quick-actions>strong{display:none}
  .business-kpi-grid{grid-template-columns:1fr!important;overflow:visible}
}

/* Enterprise sign-in — one application login, no competing browser prompt. */
body.login-mode{
  display:block!important;
  min-width:320px;
  min-height:100vh;
  background:#f5f7fa!important;
}
body.login-mode #loginView.login-view{
  display:block!important;
  width:100%;
  min-height:100vh;
  padding:0!important;
  overflow:hidden;
  background:#f5f7fa!important;
}
body.login-mode #loginView.login-view::before{display:none!important}
.login-shell{
  display:grid;
  grid-template-columns:minmax(520px,1.12fr) minmax(460px,.88fr);
  width:100%;
  min-height:100vh;
}
.login-hero{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:46px clamp(48px,6vw,92px) 38px;
  overflow:hidden;
  color:#fff;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),
    radial-gradient(circle at 78% 24%,rgba(74,114,255,.34),transparent 30%),
    linear-gradient(145deg,#0f172a 0%,#172554 48%,#1e3a8a 100%);
  background-size:40px 40px,40px 40px,auto,auto;
}
.login-hero::before{
  content:"";
  position:absolute;
  z-index:-1;
  right:-8%;
  bottom:-16%;
  width:64%;
  aspect-ratio:1;
  border:1px solid rgba(255,255,255,.16);
  border-radius:50%;
  box-shadow:0 0 0 70px rgba(99,102,241,.055),0 0 0 145px rgba(99,102,241,.035);
}
.login-hero::after{
  content:"";
  position:absolute;
  z-index:-1;
  inset:auto 8% 10% auto;
  width:180px;
  height:180px;
  border:1px solid rgba(255,255,255,.12);
  transform:rotate(35deg);
}
.login-hero-content{display:flex;flex-direction:column;align-items:center;width:min(650px,100%);margin:auto}
.login-characters{position:relative;width:min(550px,100%);height:clamp(280px,44vh,400px);margin:0 auto;transform-origin:center bottom;--face-x:0px;--face-y:0px;--pupil-x:0px;--pupil-y:0px}
.login-character{position:absolute;bottom:0;transform-origin:center bottom;transition:transform .35s cubic-bezier(.2,.8,.2,1),height .35s cubic-bezier(.2,.8,.2,1);will-change:transform}
.character-purple{z-index:1;left:12.7%;width:32.7%;height:100%;border-radius:12px 12px 0 0;background:#6c3ff5}
.character-black{z-index:2;left:43.6%;width:21.8%;height:77.5%;border-radius:9px 9px 0 0;background:#27272a}
.character-orange{z-index:3;left:0;width:43.6%;height:50%;border-radius:999px 999px 0 0;background:#ff9b6b}
.character-yellow{z-index:4;left:56.4%;width:25.5%;height:57.5%;border-radius:999px 999px 0 0;background:#e8d754}
.character-face{position:absolute;display:flex;align-items:center;transform:translate(var(--face-x),var(--face-y));transition:transform .16s ease;will-change:transform}
.character-face-eyes{gap:32px}
.character-purple .character-face{top:10%;left:25%}
.character-black .character-face{top:10.5%;left:22%}
.character-face-eyes i{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#fff;overflow:hidden;transition:height .12s ease}
.login-characters.is-blinking .character-face-eyes i{height:2px}
.character-black .character-face-eyes i{width:16px;height:16px}
.character-face-eyes b{display:block;width:7px;height:7px;border-radius:50%;background:#27272a;transform:translate(var(--pupil-x),var(--pupil-y));transition:transform .12s ease}
.character-dot-eyes{gap:32px}
.character-orange .character-face{top:45%;left:34%}
.character-yellow .character-face{top:18%;left:37%;gap:24px}
.character-dot-eyes i{display:block;width:12px;height:12px;border-radius:50%;background:#27272a;transform:translate(var(--pupil-x),var(--pupil-y));transition:transform .12s ease}
.character-yellow em{position:absolute;top:48px;left:-12px;width:80px;height:4px;border-radius:999px;background:#27272a;transform:translate(var(--pupil-x),var(--pupil-y));transition:transform .12s ease}
.login-characters[data-state="typing"] .character-purple{height:108%;transform:translateX(9%) skewX(-7deg)}
.login-characters[data-state="typing"] .character-black{transform:translateX(4%) skewX(-4deg)}
.login-characters[data-state="password"] .character-purple{height:108%;transform:translateX(9%) skewX(-9deg)}
.login-characters[data-state="reveal"]{--face-x:-12px!important;--face-y:-5px!important;--pupil-x:-5px!important;--pupil-y:-4px!important}
.login-characters[data-state="reveal"] .login-character{transform:skewX(0deg)!important}
.login-hero-copy{width:100%;margin-top:22px;text-align:center}
.login-hero-eyebrow{display:block;margin-bottom:9px;color:#9db9ff;font-size:10px;font-weight:800;letter-spacing:.17em}
.login-hero h1{margin:0;color:#fff;font-size:clamp(25px,2.6vw,36px);line-height:1.2;letter-spacing:-.025em}
.login-hero-copy p{margin:10px 0 0;color:rgba(255,255,255,.6);font-size:13px;line-height:1.65}
.login-hero>small{color:rgba(255,255,255,.52);font-size:11px;letter-spacing:.03em}
.login-panel{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:48px clamp(34px,5vw,86px) 30px;
  background:#fff;
}
body.login-mode .login-card{
  position:relative;
  display:grid;
  gap:0;
  width:min(420px,100%);
  padding:0!important;
  overflow:visible;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
body.login-mode .login-card::before,body.login-mode .login-card::after{display:none!important}
.login-mobile-brand{display:none}
.login-welcome-mark{display:grid;place-items:center;width:46px;height:46px;margin-bottom:24px;border-radius:12px;background:#eef4ff;color:#3370ff;font-size:13px;font-weight:900;letter-spacing:.05em}
.login-heading h2{margin:0;color:#1f2329;font-size:31px;line-height:1.25;letter-spacing:-.025em}
.login-heading p{margin:10px 0 34px;color:#8f959e;font-size:14px;line-height:1.6}
body.login-mode .login-card>label{display:block;margin:0 0 9px;color:#4e5969;font-size:13px;font-weight:750}
body.login-mode .login-card>input,.login-password-field input{
  width:100%;
  height:48px;
  padding:0 14px;
  border:1px solid #d9dce1;
  border-radius:9px;
  background:#fff;
  color:#1f2329;
  font-size:15px;
  outline:0;
  transition:border-color .16s ease,box-shadow .16s ease;
}
body.login-mode .login-card>input{margin-bottom:22px}
body.login-mode .login-card>input:focus,.login-password-field input:focus{border-color:#3370ff;box-shadow:0 0 0 3px rgba(51,112,255,.12)}
body.login-mode .login-card input::placeholder{color:#c2c5ca}
.login-password-field{position:relative;margin-bottom:0}
.login-password-field input{padding-right:64px}
.login-password-field button{position:absolute;top:0;right:3px;width:56px;height:48px;background:transparent;color:#3370ff;font-size:12px;font-weight:750}
body.login-mode .login-card #loginNotice{min-height:38px;padding:10px 0 6px;color:#b42318;font-size:13px;line-height:1.45}
body.login-mode .login-card .login-submit{width:100%;height:48px;border-radius:9px!important;background:#3370ff!important;color:#fff;font-size:15px;font-weight:800;box-shadow:0 7px 18px rgba(51,112,255,.18)!important}
body.login-mode .login-card .login-submit:hover{background:#245bdb!important}
.login-help{margin:18px 0 0!important;color:#a0a5ad!important;font-size:12px!important;text-align:center}
.login-panel>footer{width:min(420px,100%);margin-top:clamp(48px,10vh,92px);color:#b5b8bd;font-size:11px;text-align:center}
@media(max-width:980px){
  .login-shell{grid-template-columns:minmax(380px,.9fr) minmax(430px,1.1fr)}
  .login-hero{padding:38px 38px 32px}
  .login-characters{transform:scale(.82);width:500px;margin-left:-35px;margin-right:-35px}
}
@media(max-width:760px){
  body.login-mode #loginView.login-view{overflow:auto}
  .login-shell{display:block;min-height:100vh;background:#fff}
  .login-hero{display:none}
  .login-panel{justify-content:flex-start;min-height:100vh;padding:40px 24px 24px}
  .login-mobile-brand{display:block;margin:0 0 54px}
  .login-mobile-brand img{display:block;width:156px;max-height:58px;object-fit:contain;object-position:left center}
  .login-welcome-mark{display:none}
  .login-heading h2{font-size:28px}
  .login-heading p{margin-bottom:30px}
  .login-panel>footer{margin-top:auto;padding-top:56px}
}
@media(max-width:390px){
  .login-panel{padding:30px 20px 20px}
  .login-mobile-brand{margin-bottom:42px}
}
@media(prefers-reduced-motion:reduce){
  .login-character,.character-face,.character-face-eyes b,.character-dot-eyes i,.character-yellow em{transition:none!important}
}

/* One role-aware workbench: the academic view is a focused task queue, not a sales dashboard. */
body[data-workbench-mode="academic"] #dashboardView .workbench-focus-grid.focused-workbench,
body[data-workbench-mode="sales"] #dashboardView .workbench-focus-grid.focused-workbench{grid-template-columns:minmax(0,1fr)!important}
body[data-workbench-mode="academic"] .workbench-kpis button:disabled{cursor:default;opacity:1}
#dashboardFunnelPanel[hidden],#dashboardMiddleGrid[hidden],#dashboardBusinessPanel[hidden],#dashboardPerformancePanel[hidden],#dashboardPriorityTabs[hidden],#dashboardViewAllTasks[hidden]{display:none!important}
body[data-workbench-mode="academic"] #dashboardFunnelPanel,
body[data-workbench-mode="academic"] #dashboardMiddleGrid,
body[data-workbench-mode="academic"] #dashboardBusinessPanel,
body[data-workbench-mode="academic"] #dashboardPerformancePanel,
body[data-workbench-mode="academic"] #dashboardPriorityTabs,
body[data-workbench-mode="academic"] #dashboardViewAllTasks{display:none!important}
body[data-workbench-mode="sales"] #dashboardFunnelPanel,
body[data-workbench-mode="sales"] #dashboardBusinessPanel,
body[data-workbench-mode="sales"] #dashboardPerformancePanel{display:none!important}

/* 学员学习报告：信息密度足够，但避免在后台表格中塞进另一套仪表盘。 */
.student-learning-report{width:min(760px,calc(100vw - 32px))!important}
.student-learning-report-body{display:grid;gap:16px;padding:18px}
.learning-report-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.learning-report-kpis span,.learning-exams span{display:grid;gap:5px;padding:12px;border:1px solid #e5e5ea;border-radius:10px;background:#fafbfc}
.learning-report-kpis small,.learning-report-section small{color:#6e6e73;font-size:12px;font-weight:700}
.learning-report-kpis b{font-size:21px;color:#1d1d1f}
.learning-report-section{display:grid;gap:12px;padding:14px;border:1px solid #e5e5ea;border-radius:12px}
.learning-report-section>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.learning-trend{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:6px;align-items:end;height:148px}
.learning-trend span{display:grid;grid-template-rows:1fr auto;gap:6px;align-items:end;min-width:0;height:100%}
.learning-trend i{display:block;width:100%;min-height:3px;border-radius:4px 4px 2px 2px;background:#007aff}
.learning-trend small{overflow:hidden;font-size:10px;text-align:center;white-space:nowrap}
.learning-exams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.learning-exams b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1d1d1f}
.learning-exams em{color:#6e6e73;font-size:12px;font-style:normal}
.learning-empty{margin:0;color:#6e6e73}
@media(max-width:640px){.learning-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.learning-exams{grid-template-columns:1fr}.learning-trend{gap:3px}.learning-trend small{font-size:9px}}

.enterprise-layout{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(460px,1.25fr);gap:18px;margin-top:20px}
.enterprise-form,.enterprise-list-panel{min-width:0;border:1px solid #d8d8de;background:#fff}
.enterprise-list-panel .panel-title{gap:16px}.enterprise-list-panel .panel-title input{max-width:220px}
.enterprise-rows{display:grid;gap:10px;padding:14px}
.enterprise-card{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px;border:1px solid #e5e5ea;border-radius:12px;background:#fff}
.enterprise-card-head{display:flex;align-items:center;gap:10px}.enterprise-card p{margin:5px 0 12px}
.enterprise-metrics{display:flex;flex-wrap:wrap;gap:8px}.enterprise-metrics span{display:grid;gap:3px;min-width:112px;padding:8px 10px;border-radius:8px;background:#f5f5f7}.enterprise-metrics small,.enterprise-contact{color:#6e6e73;font-size:12px}.enterprise-metrics b{color:#1d1d1f;font-size:13px}
.enterprise-contact{display:block;margin-top:10px}.enterprise-batch-modal{width:min(720px,calc(100vw - 32px))!important}
.enterprise-batch-history-modal{width:min(760px,calc(100vw - 32px))!important}.enterprise-batch-history-body{display:grid;gap:10px;padding:16px}.enterprise-batch-record{border:1px solid #e5e5ea;border-radius:10px;background:#fff}.enterprise-batch-record summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;cursor:pointer}.enterprise-batch-record summary span{display:grid;gap:3px}.enterprise-batch-record summary small,.enterprise-batch-record summary em,.enterprise-batch-members{color:#6e6e73;font-size:12px;font-style:normal}.enterprise-batch-members{padding:0 13px 13px}.enterprise-batch-members button{padding:7px 10px;border:1px solid #d1d1d6;border-radius:7px;background:#fff;color:#007aff}.enterprise-batch-members ul{display:grid;gap:7px;margin:10px 0 0;padding:0;list-style:none}.enterprise-batch-members li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid #f0f0f2}.enterprise-batch-members li span{text-align:right}
.lead-notifications-modal{width:min(620px,calc(100vw - 32px))!important}.lead-notifications-body{display:grid;gap:10px;padding:16px}.lead-notification{padding:13px;border:1px solid #e5e5ea;border-radius:10px;background:#fff}.lead-notification.unread{border-color:#9ec8ff;background:#f4f8ff}.lead-notification p{margin:6px 0;color:#3a3a3c}.lead-notification small{color:#6e6e73}.company #leadNotificationsButton{position:relative}.company #leadNotificationsCount{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:5px;padding:0 4px;border-radius:10px;background:#ff3b30;color:#fff;font-size:10px;line-height:1}
.crm-identity-hint{display:block;min-height:18px;margin-top:5px;color:#6e6e73;font-size:12px;line-height:1.45}.crm-identity-hint .crm-inline-action{margin-left:6px;color:#007aff;font-size:12px;font-weight:700}
@media(max-width:980px){.enterprise-layout{grid-template-columns:1fr}.enterprise-list-panel .panel-title{align-items:flex-start;flex-direction:column}.enterprise-list-panel .panel-title input{max-width:none}}
@media(max-width:560px){.enterprise-card{flex-direction:column}.enterprise-card .lead-actions{width:100%}.enterprise-card .lead-actions button{width:100%}}
