/* GFloor light/dark surfaces and touch layouts. */
:root{color-scheme:light;--surface:#fff;--page:#f4f4f4;--text:#303030;--soft:#f7f5f5;--muted:#707070}
:root[data-theme=dark]{color-scheme:dark;--surface:#23262c;--page:#17191e;--text:#f0f1f4;--soft:#2c3038;--muted:#b6bac4;--line:#424650}
:root[data-theme=dark],:root[data-theme=dark] body{background:var(--page);color:var(--text)}
[data-theme=dark] :is(.topbar,.panel,.metric,.definitions,.record-filters,.presence-strip,dialog,.modal-head,.modal-foot,.login-card,.donut>div,#cityList,#employeeList){background:var(--surface);color:var(--text);border-color:var(--line)}
[data-theme=dark] :is(.login,.demo-strip){background:var(--page);color:var(--muted)}
[data-theme=dark] :is(input,textarea,select,.btn){background:var(--soft);color:var(--text);border-color:var(--line)}
[data-theme=dark] :is(.btn.primary,nav button.active){background:#d93222;border-color:#d93222;color:#fff}
[data-theme=dark] :is(th,.online-person,.compare-track,.bar-track,.forecast-track,.avatar){background:var(--soft);color:var(--text)}
[data-theme=dark] :is(td,th,.panel-head,.attention,.event,.record-filters){border-color:var(--line)}
[data-theme=dark] :is(label,.metric .label,.crumb strong,.attention button,td .link,.compare-track span){color:var(--text)}
[data-theme=dark] :is(.sub,small,.price-hint,.footer,.forecast-months span,.forecast-months small,.definitions p,.chart-scale,.customer-card-head small,#passwordGeneratedHint,.combo-hint){color:var(--muted)}
[data-theme=dark] :is(.metric.feature,.notice,.report-note){background:#3c2827;color:#ffdad4;border-color:#875047}
[data-theme=dark] .badge{background:#3c414c;color:#f2f3f5}
[data-theme=dark] :is(.badge.hot,.badge.lost){background:#612f2a;color:#ffe1dc}
[data-theme=dark] .city-option:hover,[data-theme=dark] .city-option[aria-selected=true]{background:#542d29;color:white}
[data-theme=dark] .compare-bar.won{background:#8bcc97}
[data-theme=dark] .chart-legend .won-key:before{background:#8bcc97}
[data-theme=dark] .brand-logo{background:white;border-radius:4px}
.profile-button{border:0;background:none;display:flex;align-items:center;gap:9px;text-align:left;color:inherit;font-size:12px;padding:4px;min-width:0}
.profile-button>span:last-child{max-width:180px;overflow-wrap:anywhere}
.profile-button small{display:block}.mobile-menu{display:none}.theme-toggle{white-space:nowrap}
.assignment-preview{width:100%;min-height:360px;max-height:55dvh;line-height:1.7;font-size:14px}
.danger-panel{margin-top:28px;border-color:#d48b84}.danger-panel .btn{border-color:#d48b84;color:#aa2519}
[data-theme=dark] .danger-panel .btn{color:#ffb6ab}.danger-notice{border-color:#cf675c}
.form-grid>*{min-width:0}.form-grid input,.form-grid select,.form-grid textarea{width:100%}
.form-grid input[type=checkbox]{width:auto}.shell,main,.grid>*{min-width:0}
.lead-summary strong,.customer-card-head strong{overflow-wrap:anywhere}
.table-wrap{border-radius:8px;scrollbar-width:thin}.table-wrap:focus-visible{outline:2px solid #db3a28}
button,.btn{min-height:42px}.profile-button{min-height:44px}
@media(min-width:701px) and (max-width:1100px){
 aside{width:180px;padding:24px 12px}.shell{margin-left:180px}main{padding:24px 20px}.topbar{height:auto;min-height:80px;padding:12px 20px;flex-wrap:wrap;gap:8px}.profile{margin-left:auto;flex-wrap:wrap;gap:8px}.grid{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.record-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-button>span:last-child{max-width:150px}
}
@media(max-width:700px){
 aside{display:none;position:fixed;inset:70px 12px auto 12px;max-height:calc(100dvh - 90px);overflow:auto;width:auto;padding:18px;z-index:25;border-radius:12px;box-shadow:0 18px 70px #0008}
 .nav-open aside{display:flex}aside .brand,aside .workspace{display:none}aside nav{display:grid;grid-template-columns:1fr 1fr;overflow:visible;gap:8px}aside nav button{white-space:normal;min-height:48px;padding:12px 10px}
 .shell{margin-left:0}.mobile-menu{display:inline-flex}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;padding:10px 12px;gap:8px;min-height:64px}.crumb{display:none}.profile{flex:1;justify-content:flex-end;gap:6px}.profile .btn{padding:8px;font-size:11px;min-height:42px}.profile-button{font-size:11px;max-width:130px}.profile-button .avatar{display:none}.profile-button small{font-size:9px}.profile-button>span:last-child{max-width:120px}
 main{padding:22px 14px}.heading{margin-bottom:22px}h1{font-size:25px;line-height:1.2}.grid{grid-template-columns:1fr;gap:12px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{padding:16px 12px;min-height:120px}.metric .value{font-size:clamp(17px,4.5vw,24px);letter-spacing:-.5px}.panel-head,.panel-body{padding:17px}.presence-strip{padding:12px}.online-users{gap:6px}.online-person{font-size:11px}
 .record-filters,.report-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}.record-search{grid-column:1/-1}.record-filters .actions{grid-column:1/-1}.filters input{min-width:0;width:100%}.filters select{max-width:none;flex:1}.report-controls{gap:10px}.report-controls label{flex-basis:130px}.form-grid{grid-template-columns:1fr}.span2{grid-column:1/-1}.lead-summary{grid-template-columns:1fr 1fr;gap:18px}.modal-head{padding:14px 16px;z-index:18}.modal-head h2{font-size:17px}.modal-body{padding:16px}dialog{width:calc(100% - 16px);max-height:calc(100dvh - 24px);margin:auto}.modal-foot{flex-wrap:wrap;bottom:-16px;padding:12px 0}.modal-foot .btn{flex:1;min-width:110px}.modal-foot .sub{flex-basis:100%}input,textarea,select{font-size:16px;min-height:44px}.assignment-preview{min-height:320px;font-size:14px}.btn{min-height:44px}.actions .btn{white-space:normal}.footer{gap:10px}.login-card{padding:26px 22px}th,td{padding:13px 16px}.danger-panel .actions{display:grid;grid-template-columns:1fr}.danger-panel .btn{justify-content:flex-start}#toast{z-index:40}
}
@media(max-width:380px){.profile{flex-wrap:wrap}.profile-button{max-width:105px}.profile .btn{font-size:10px;padding:7px}.record-filters,.report-filters{grid-template-columns:1fr}.lead-summary{grid-template-columns:1fr}.product-chart{gap:15px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
