/* Dashboard layout only; all primary colors come from the shared CRM theme. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body:not(.module-mode){background:var(--crm-page)}
body:not(.module-mode) .sidebar{width:208px;padding:16px 12px;background:var(--crm-sidebar);border-right:1px solid var(--crm-border);box-shadow:none}
body:not(.module-mode) .brand{height:42px;padding:0 9px 14px;font-size:20px;letter-spacing:.2px;border-bottom:0;color:var(--crm-blue-dark)}
body:not(.module-mode) .brand-mark{width:28px;height:28px;border-radius:9px;background:var(--crm-blue);font-size:14px;box-shadow:0 3px 7px var(--crm-shadow)}
body:not(.module-mode) .workspace{padding:11px 10px;margin:7px 2px 12px;border:1px solid var(--crm-border);background:var(--crm-surface);border-radius:9px;font-size:11px;color:var(--crm-blue-dark)}
body:not(.module-mode) .nav-item{height:34px;font-size:12px;padding:0 11px;border-radius:7px;color:var(--crm-blue-dark);margin:2px 0}
body:not(.module-mode) .nav-item.active{background:var(--pale);color:var(--crm-blue-dark);font-weight:600}
body:not(.module-mode) .nav-item:hover{background:var(--pale);color:var(--crm-blue-dark)}
body:not(.module-mode) .nav-caption{margin:16px 10px 6px;font-size:10px;letter-spacing:.5px;color:var(--muted)}
body:not(.module-mode) .sidebar-bottom{padding-top:14px}
body:not(.module-mode) .main-area{margin-left:190px;padding:0;max-width:none}
body:not(.module-mode) .topbar{height:60px;min-height:60px;background:var(--crm-brand-band);border-bottom:1px solid var(--crm-border);padding:0 30px;margin:0}
body:not(.module-mode) .topbar h2{font-size:16px;color:var(--crm-on-brand)}
body:not(.module-mode) .user-menu{font-size:12px;color:var(--crm-on-brand)}
body:not(.module-mode) .avatar{width:30px;height:30px;border-radius:50%;background:var(--pale);color:var(--muted);font-size:12px}
#overviewView.home-view{padding:28px 30px 18px;background:var(--crm-page);font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;color:var(--crm-blue-dark);max-width:1480px;margin:auto}
.home-welcome{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}
.home-kicker{font-size:10px;letter-spacing:2px;color:var(--muted);margin-bottom:8px}
.home-welcome h1{font-size:25px;line-height:1.35;margin:0 0 8px;font-weight:650;letter-spacing:.2px;color:var(--crm-blue-dark)}
.home-welcome p{font-size:12px;color:var(--muted);margin:0;line-height:1.6}
.home-date{display:flex;flex-direction:column;align-items:flex-end;gap:8px;white-space:nowrap}
.home-date strong{font-size:12px;font-weight:500;color:var(--crm-blue-dark)}.home-date span{color:var(--muted);font-size:11px}
.home-search-panel{padding:19px 23px 21px;border:1px solid var(--crm-border);border-radius:14px;background:var(--crm-section-band);margin-bottom:24px}
.home-search-caption{display:flex;gap:14px;align-items:baseline;margin-bottom:12px}.home-search-caption strong{font-size:14px;font-weight:600;color:var(--crm-blue-dark)}.home-search-caption>span{font-size:11px;color:var(--muted)}
#homeSearchForm{display:flex;align-items:center;gap:12px;min-width:0;background:var(--crm-surface);border:1px solid var(--crm-border);border-radius:9px;box-shadow:0 4px 14px var(--crm-shadow);padding:6px 7px 6px 16px;transition:border-color .15s,box-shadow .15s}
#homeSearchForm:focus-within{border-color:var(--crm-border);box-shadow:0 0 0 3px var(--crm-shadow)}
#homeSearchForm>svg{width:20px;height:20px;flex-shrink:0;fill:none;stroke:var(--muted);stroke-width:1.7}
#homeSearch{border:0;outline:0;background:transparent;box-shadow:none;flex:1;min-width:0;font:13px "Microsoft YaHei",sans-serif;color:var(--crm-blue-dark);padding:8px 0;height:34px;width:auto;margin:0}
#homeSearch::placeholder{color:var(--muted);font-size:12px}#homeSearchForm>kbd{border:1px solid var(--crm-border);border-radius:4px;padding:3px 6px;background:var(--pale);font:10px sans-serif;color:var(--muted);white-space:nowrap}#homeSearchForm>button{height:36px;min-width:83px;padding:0 19px;border-radius:7px;background:var(--crm-blue);color:var(--crm-on-brand);border:1px solid var(--crm-blue);font-size:12px;font-weight:500;box-shadow:none}#homeSearchForm>button:hover{background:var(--crm-blue-dark)}
.home-summary-heading{display:flex;align-items:center;gap:12px;margin:0 0 12px}.home-summary-heading h2{font-size:14px;color:var(--crm-blue-dark);margin:0}.home-summary-heading>span{font-size:10px;color:var(--muted)}.home-summary-heading>button{margin-left:auto;border:0;background:transparent;color:var(--muted);font-size:11px;padding:4px 0}.home-summary-heading>button:disabled{opacity:.4}
.home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px}
#overviewView .home-metric{padding:17px 19px 15px;border:1px solid var(--crm-border);border-radius:12px;background:var(--crm-surface);text-align:left;display:flex;flex-direction:column;color:var(--crm-blue-dark);min-width:0;box-shadow:0 2px 4px var(--crm-shadow);cursor:pointer;transition:transform .15s,border-color .15s}
#overviewView .home-metric:hover:not(:disabled){transform:translateY(-2px);border-color:var(--crm-border)}#overviewView .home-metric:disabled{cursor:default}
.home-metric-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;gap:10px}.home-metric-icon{display:grid;place-items:center;width:30px;height:30px;background:var(--pale);border-radius:9px;color:var(--muted)}.home-metric-icon svg{width:19px;height:19px}
.home-metric>strong{font-size:31px;font-weight:650;line-height:1.2;margin:8px 0 10px;letter-spacing:-.6px;color:var(--crm-blue-dark);font-variant-numeric:tabular-nums}.home-metric-note{display:flex;justify-content:space-between;gap:6px;font-size:10px;color:var(--muted);line-height:1.5}.home-metric-note>span{margin-left:auto;color:var(--muted)}.home-metric.attention .home-metric-icon{color:var(--crm-warning);background:var(--crm-warning-surface)}.home-metric.attention>strong{color:var(--crm-warning)}
.home-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;margin-bottom:20px}
.home-card{min-width:0;background:var(--crm-surface);border:1px solid var(--crm-border);border-radius:12px;padding:20px;box-shadow:0 2px 4px var(--crm-shadow)}
.home-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.home-card-heading h2{font-size:14px;font-weight:600;margin:0;color:var(--crm-blue-dark);line-height:1.5}.home-card-heading h2>span{display:inline-block;min-width:20px;text-align:center;background:var(--pale);padding:0 5px;border-radius:5px;color:var(--muted);font-size:10px;vertical-align:2px;margin-left:5px}.home-card-heading p{font-size:10px;color:var(--muted);margin:6px 0 0;line-height:1.5}.home-unit{color:var(--muted);font-size:10px;padding-top:3px;white-space:nowrap}.home-text-button{border:0;color:var(--muted);background:transparent;padding:2px 0;font-size:11px;white-space:nowrap}.home-text-button:hover{color:var(--crm-blue-dark)}.home-text-button:disabled{color:var(--muted);cursor:default}
.home-plans{grid-row:span 2;padding-bottom:12px}.home-plans .home-card-heading{margin-bottom:8px}
.home-plan-row{display:flex;align-items:center;gap:11px;width:100%;padding:16px 0;text-align:left;border:0;border-bottom:1px solid var(--crm-border);background:transparent;min-width:0;min-height:73px}.home-plan-row:last-child{border-bottom:0}.home-plan-row:hover{background:var(--pale)}.home-plan-mark{display:grid;place-items:center;flex-shrink:0;width:33px;height:36px;border-radius:8px;color:var(--muted);background:var(--pale)}.home-plan-mark svg{width:19px;height:19px}.home-plan-text{min-width:0;display:flex;flex:1;flex-direction:column;gap:8px}.home-plan-text>strong{font-size:12px;font-weight:500;color:var(--crm-blue-dark);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-plan-text>span{font-size:10px;color:var(--muted)}.home-plan-text i{font-style:normal;padding:0 7px;color:var(--muted)}.home-status-pill{flex-shrink:0;font-size:10px;color:var(--muted);background:var(--pale);padding:4px 7px;border-radius:5px}.home-status-pill.overdue{background:var(--crm-warning-surface);color:var(--crm-warning)}.home-row-arrow{color:var(--muted);font-size:19px;font-weight:normal;margin-left:auto;flex-shrink:0}
.home-stages{padding-bottom:16px}.home-stage-content{display:flex;align-items:center;gap:20px;min-height:130px}.home-stage-content>svg{width:140px;max-width:40%;flex-shrink:0;height:140px}.home-donut-number{font-size:24px;font-weight:650;fill:var(--crm-blue-dark)}.home-donut-label{font-size:9px;fill:var(--muted)}.home-stage-legend{list-style:none;margin:0;padding:0;min-width:0;flex:1;display:flex;flex-direction:column;gap:10px}.home-stage-legend>li{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted)}.home-legend-dot{width:6px;height:6px;border-radius:2px;flex-shrink:0}.home-stage-legend li>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-stage-legend strong{margin-left:auto;color:var(--crm-blue-dark);font-weight:500;font-variant-numeric:tabular-nums}.home-stage-legend small{width:29px;text-align:right;font-size:10px;color:var(--muted)}
.home-priorities .home-card-heading{margin-bottom:12px}.home-priorities{padding-top:16px;padding-bottom:16px}.home-mini-quadrants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.home-mini-quadrant{display:flex;align-items:center;justify-content:space-between;gap:6px;border:1px solid var(--crm-border);background:var(--pale);padding:11px 10px;border-radius:7px;text-align:left;font-size:10px;color:var(--muted)}.home-mini-quadrant strong{font-size:17px;font-weight:600;color:var(--crm-blue-dark);white-space:nowrap}.home-mini-quadrant small{font-size:9px;font-weight:normal;color:var(--muted)}.home-mini-quadrant.q-0{background:var(--crm-warning-surface);border-color:var(--crm-warning-border);color:var(--crm-warning)}.home-mini-quadrant.q-0 strong{color:var(--crm-warning)}.home-mini-quadrant.q-1{background:var(--pale);border-color:var(--crm-border);color:var(--muted)}.home-mini-quadrant.q-1 strong{color:var(--muted)}.home-mini-quadrant:hover{border-color:var(--crm-border)}
.home-module-section{margin-bottom:20px}.home-module-section .home-card-heading{margin-bottom:16px}.home-module-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.home-module{display:flex;align-items:center;gap:9px;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-surface);padding:13px 10px;text-align:left;min-width:0;transition:background .15s,border-color .15s}.home-module:hover{background:var(--pale);border-color:var(--crm-border)}.home-module-icon{width:29px;height:31px;display:grid;place-items:center;border-radius:7px;background:var(--pale);color:var(--muted);flex-shrink:0}.home-module-icon svg{width:18px;height:18px}.home-module>span:nth-child(2){min-width:0}.home-module strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500;color:var(--crm-blue-dark)}.home-module small{display:block;margin-top:5px;font-size:9px;color:var(--muted)}.home-module .home-row-arrow{font-size:15px}
.home-customer-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:26px}.home-customer-list>button{display:flex;align-items:center;gap:10px;text-align:left;background:none;border:0;border-top:1px solid var(--crm-border);padding:14px 0;min-width:0}.home-customer-avatar{flex-shrink:0;width:32px;height:32px;border-radius:50%;background:var(--pale);color:var(--muted);display:grid;place-items:center;font-size:12px}.home-customer-list>button>span:nth-child(2){min-width:0;flex:1}.home-customer-list strong{display:block;font-size:11px;font-weight:500;color:var(--crm-blue-dark);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.home-customer-list small{display:block;font-size:9px;color:var(--muted);margin-top:6px}.home-customer-stage{font-size:10px;color:var(--muted);white-space:nowrap}.home-customer-list>button:hover{background:var(--pale)}
.home-status{font-size:10px;color:var(--muted);margin-top:16px;text-align:center;line-height:1.6}.home-empty{font-size:12px;color:var(--muted);padding:24px 12px;line-height:1.7;text-align:center;grid-column:1/-1}
.home-search-results{margin-top:13px;background:var(--crm-surface);border:1px solid var(--crm-border);border-radius:9px;max-height:480px;overflow:auto;box-shadow:0 6px 20px var(--crm-shadow)}.home-results-heading{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:var(--pale);border-bottom:1px solid var(--crm-border);padding:10px 14px;z-index:1}.home-results-heading strong{font-size:12px;color:var(--crm-blue-dark)}.home-results-heading>button{border:0;background:transparent;font-size:20px;color:var(--muted);padding:0 2px}.home-result-group{padding:10px 14px;border-bottom:1px solid var(--crm-border)}.home-result-group:last-child{border:0}.home-result-label{display:flex;align-items:center;gap:10px;font-size:11px;padding-bottom:6px;color:var(--muted)}.home-result-label>strong{font-size:12px;color:var(--crm-blue-dark)}.home-result-label .home-text-button{margin-left:auto}.home-search-hit{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;text-align:left;padding:10px 6px;color:var(--crm-blue-dark);border-radius:5px}.home-search-hit:hover{background:var(--pale)}.home-search-hit>span:first-child{color:var(--muted)}.home-search-hit svg{width:16px;height:16px;vertical-align:middle}.home-search-hit>strong{font-size:12px;font-weight:500;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.home-search-hit>small{font-size:10px;color:var(--muted)}.home-search-hit>.home-row-arrow{margin-left:4px}
#overviewView button:focus-visible{outline:2px solid var(--crm-border);outline-offset:3px}
.home-hit-text{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px}.home-hit-text>strong{font-size:12px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.home-hit-text>small{font-size:10px;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(min-width:1700px){#overviewView.home-view{padding-top:36px}.home-metrics{gap:22px}.home-grid{gap:22px}.home-card{padding:24px}.home-plan-row{padding:18px 0}.home-module{padding:16px 12px}}
@media(max-width:1100px){body:not(.module-mode) .sidebar{width:178px;padding:12px 9px}body:not(.module-mode) .main-area{margin-left:178px}#overviewView.home-view{padding:24px 20px}.home-card{padding:16px}.home-module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:13px}.home-stage-content{gap:6px}.home-stage-content>svg{width:115px;height:115px}.home-metrics{gap:10px}#overviewView .home-metric{padding:15px}.home-mini-quadrant{padding:10px 7px;font-size:9px}}
@media(max-width:850px){.home-grid{grid-template-columns:minmax(0,1fr)}.home-plans{grid-row:auto}.home-stage-content>svg{max-width:35%;width:140px;height:140px}.home-stage-content{gap:30px}.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.home-welcome h1{font-size:22px}.home-date strong{font-size:10px}.home-date span{font-size:10px}.home-summary-heading>span{display:none}.home-search-caption>span{display:none}.home-customer-list{grid-template-columns:minmax(0,1fr)}.home-mini-quadrant{font-size:11px;padding:12px}}
@media(max-width:600px){body:not(.module-mode) .sidebar{width:118px;padding:8px 5px}body:not(.module-mode) .main-area{margin-left:118px}body:not(.module-mode) .brand{font-size:15px;padding-left:5px;gap:6px}body:not(.module-mode) .brand-mark{width:21px;height:21px;font-size:11px}body:not(.module-mode) .nav-item{font-size:11px;padding:0 5px}body:not(.module-mode) .nav-icon{width:13px;font-size:12px}body:not(.module-mode) .workspace{padding:8px 5px;flex-wrap:wrap}body:not(.module-mode) .topbar{padding:0 14px;height:48px;min-height:48px}body:not(.module-mode) .topbar h2{font-size:14px}#overviewView.home-view{padding:18px 12px}.home-welcome{align-items:flex-start;margin-bottom:16px}.home-welcome h1{font-size:19px}.home-welcome p{font-size:10px}.home-kicker{font-size:9px}.home-date{display:none}.home-search-panel{padding:14px 12px;margin-bottom:18px}.home-search-caption strong{font-size:12px}#homeSearchForm{gap:6px;padding-left:8px}#homeSearchForm>svg{width:15px}#homeSearchForm>kbd{display:none}#homeSearchForm>button{min-width:49px;padding:0 10px;font-size:11px}#homeSearch{font-size:12px}#homeSearch::placeholder{font-size:10px}.home-metrics{gap:9px;margin-bottom:14px}#overviewView .home-metric{padding:12px 10px}.home-metric>strong{font-size:26px}.home-metric-note{font-size:9px}.home-metric-icon{width:25px;height:25px}.home-metric-top{font-size:11px}.home-metric-note>span{display:none}.home-card{padding:14px}.home-card-heading h2{font-size:13px}.home-card-heading p{font-size:9px}.home-unit{display:none}.home-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-module{padding:10px 8px;gap:7px}.home-module .home-row-arrow{display:none}.home-module-icon{width:23px;height:27px}.home-module strong{font-size:10px}.home-module small{font-size:9px}.home-plan-row{gap:8px}.home-plan-mark{display:none}.home-plan-text>strong{font-size:11px}.home-plan-text>span{font-size:9px}.home-plan-text i{padding:0 4px}.home-stage-content{gap:8px}.home-stage-legend{gap:9px}.home-stage-legend>li{gap:6px}.home-mini-quadrant{font-size:9px;padding:10px 7px}.home-customer-stage{font-size:9px}.home-status{font-size:9px}.home-results-heading{padding:8px}.home-result-group{padding:8px}.home-result-label{flex-wrap:wrap;gap:6px}.home-result-label .home-text-button{font-size:9px}.home-search-hit>small{display:none}}

/* Original CRM module-area navigation: compact blue section bars and icon rows. */
body:not(.module-mode) .sidebar{width:190px;padding:12px 8px 10px;background:var(--crm-page);border-right:1px solid var(--crm-border);overflow-y:auto}
body:not(.module-mode) .brand{height:42px;padding:0 8px 12px;font-size:20px;color:var(--crm-heading-ink);border-bottom:0}
body:not(.module-mode) .brand-mark{width:32px;height:32px;border-radius:3px;box-shadow:0 2px 5px var(--crm-shadow)}
body:not(.module-mode) .workspace{margin:6px 3px 10px;padding:9px 10px;border:1px solid var(--crm-border);border-radius:3px;background:var(--crm-surface);font-size:12px}
body:not(.module-mode) #navMenu{margin:0 2px;padding:0 0 10px;background:var(--crm-page)}
body:not(.module-mode) .nav-home-caption{display:block;margin:9px 8px 4px;color:var(--muted);font-size:11px}
.nav-section-title{display:flex;align-items:center;gap:7px;height:31px;margin:9px 0 4px;padding:0 10px;background:var(--crm-section-band);border:1px solid var(--crm-section-border);color:var(--crm-group-ink);font-size:13px;font-weight:700}
.nav-section-title>span:first-child{color:var(--crm-nav-green);font-size:14px}
body:not(.module-mode) .nav-item{height:31px;margin:1px 0;padding:0 10px;border:0;border-radius:0;background:transparent;color:var(--crm-blue-muted);font-size:12px;gap:8px}
body:not(.module-mode) .nav-item:hover{background:var(--crm-nav-hover);color:var(--crm-blue-dark);transition:background-color .12s ease,color .12s ease}
body:not(.module-mode) .nav-item.active{background:var(--crm-selected);color:var(--crm-selected-ink);font-weight:700;outline:1px solid var(--crm-selected-border);outline-offset:-1px}
body:not(.module-mode) .nav-icon{width:22px;font-size:16px;line-height:1;text-align:center;filter:saturate(.8)}
.nav-group{margin:4px 0;border:0;background:transparent}
.nav-group-heading{display:flex;align-items:center;gap:8px;min-height:31px;padding:0 9px;list-style:none;cursor:pointer;background:var(--crm-section-band);border:1px solid var(--crm-section-border);color:var(--crm-group-ink);font-size:13px;font-weight:700}
.nav-group-heading::-webkit-details-marker{display:none}
.nav-group-icon{width:19px;color:var(--crm-blue-muted);font-size:16px;text-align:center}
.nav-group-chevron{margin-left:auto;color:var(--crm-nav-link);font-size:14px;transition:transform .15s}
.nav-group:not([open]) .nav-group-chevron{transform:rotate(-90deg)}
.nav-group-items{padding:3px 2px;background:var(--crm-nav-surface);border:1px solid var(--crm-nav-border);border-top:0}
.nav-team-group{margin-top:8px}
body:not(.module-mode) .sidebar-bottom{margin-top:8px;padding-top:7px;border-top:1px solid var(--crm-border)}
body:not(.module-mode) .upgrade-link{margin:3px 0;padding:0 10px;color:var(--crm-blue-dark);font-size:11px}
body:not(.module-mode) #logoutButton{height:31px}
@media(max-width:850px){body:not(.module-mode) .sidebar{width:188px;padding:10px 8px}body:not(.module-mode) .main-area{margin-left:188px}body:not(.module-mode) .nav-caption{font-size:11px}body:not(.module-mode) .nav-item:not(.active){font-size:12px}.nav-group-heading{font-size:12px}body:not(.module-mode) .workspace{display:flex}}
@media(max-width:600px){body:not(.module-mode) .sidebar{width:150px;padding:8px 6px}body:not(.module-mode) .main-area{margin-left:150px}body:not(.module-mode) .brand{font-size:16px;gap:7px;padding-left:4px}body:not(.module-mode) .brand-mark{width:27px;height:27px}.nav-section-title{font-size:12px!important}.nav-group-heading{font-size:11px!important}.nav-item{font-size:11px!important;height:29px!important;padding:0 6px!important;gap:5px!important}body:not(.module-mode) .nav-icon{width:18px;font-size:13px}body:not(.module-mode) .workspace{padding:7px 5px;gap:5px;font-size:10px}body:not(.module-mode) .edition{font-size:9px;padding:3px 4px}}

.module-mode.navigation-open #navMenu{max-height:calc(100dvh - 120px);overflow-y:auto;scrollbar-width:thin}.module-mode .nav-section-title{margin-top:4px}.module-mode .nav-group{margin:4px 0}.module-mode .nav-group-heading{min-height:29px}.module-mode .nav-group-items .nav-item{width:100%}
