:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#1F2937;background:#F7F9FC;font-size:14px;--blue:#2563EB;--muted:#64748B}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #E2E8F0;border-radius:7px;background:#fff;padding:8px 12px;color:#1F2937}button:hover{border-color:#93B4EF;background:#F0F5FC}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:#1D4ED8;color:white}.danger{color:#bb3848}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 70% 20%,#dce7fb,transparent 60%),#F7F9FC}.login-card{width:min(410px,92vw);padding:36px;background:white;border:1px solid #E2E8F0;border-radius:18px;box-shadow:0 22px 80px #22395715}.eyebrow{font-size:10px;letter-spacing:2px;color:#64748B;font-weight:700}h1{font-size:27px;letter-spacing:-.7px;margin:8px 0 13px}p{line-height:1.7}.login-card p{color:var(--muted);font-size:13px}.login-card button{width:100%;margin-top:18px}.login-card label{margin-top:15px}.hint{font-size:12px;color:var(--muted);line-height:1.6}.error{color:#bb3848!important}label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#64748B}input,select,textarea{border:1px solid #E2E8F0;border-radius:6px;padding:9px;background:white;color:#1F2937;min-width:0;width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #BFDBFE;outline-offset:1px}textarea{min-height:90px;resize:vertical}aside{position:fixed;inset:0 auto 0 0;width:212px;background:#FFFFFF;color:#64748B;display:flex;flex-direction:column;padding:28px 16px}.brand{font-size:19px;color:#fff;font-weight:700;margin:0 12px 34px}.brand span{display:block;font-size:11px;letter-spacing:2px;color:#64748B;margin-top:9px}nav{display:grid;gap:6px}nav button{border:0;text-align:left;color:#64748B;background:transparent;padding:12px 15px;font-size:13px}nav button.active{background:#EFF6FF;color:#fff}nav button:hover{background:#F0F5FC;color:#fff}.aside-foot{margin-top:auto;display:grid;gap:8px;padding:16px 10px}.aside-foot span{font-size:12px;margin-bottom:8px}.aside-foot button{font-size:11px;background:transparent;color:#64748B;border-color:#E2E8F0}.workspace{margin-left:212px}header{height:62px;display:flex;align-items:center;gap:20px;padding:0 32px;background:white;border-bottom:1px solid #E2E8F0;font-size:12px;color:#64748B}#updated{margin-left:auto}main{max-width:1530px;margin:auto;padding:28px 32px}.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.page-title h1{font-size:25px}.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-bottom:20px;padding:16px;border:1px solid #E2E8F0;border-radius:10px;background:white}.filters label{flex:1;min-width:110px;max-width:190px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.card,.panel{background:white;border:1px solid #E2E8F0;border-radius:10px;box-shadow:0 3px 12px #14213d04}.card{padding:20px}.card .label{font-size:12px;color:#64748B}.card strong{display:block;font-size:32px;font-variant-numeric:tabular-nums;margin-top:9px}.card small{font-size:11px;color:#64748B}.panel{padding:20px;margin-bottom:16px;min-width:0}.panel h2{font-size:15px;margin:0 0 16px}.panel-head{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px}.panel-head h2{margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}th{padding:11px 10px;font-size:11px;font-weight:600;color:#64748B;background:#F8FAFC;white-space:nowrap}td{padding:13px 10px;border-bottom:1px solid #E2E8F0;max-width:320px;overflow-wrap:anywhere;vertical-align:top}tr:last-child td{border-bottom:0}.muted{font-size:11px;color:#64748B;margin-top:4px}.pill{display:inline-block;border-radius:20px;padding:3px 9px;font-size:11px;background:#F1F5F9;color:#64748B;white-space:nowrap}.pill.good{color:#14815b;background:#e8f7ef}.pill.warn{color:#ab761a;background:#fff4d9}.pill.bad{color:#b83d54;background:#fff0f2}.actions{display:flex;flex-wrap:wrap;gap:5px}.actions button{font-size:11px;padding:5px 8px}.empty{text-align:center;padding:35px;color:#64748B}.notice{border:1px solid #eedcaf;background:#fff9eb;color:#9d791f;border-radius:8px;padding:11px 15px;font-size:12px;line-height:1.7;margin-bottom:16px}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.rows{display:grid;gap:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.wide{grid-column:1/-1}.form-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}.pager{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:16px;color:var(--muted);font-size:12px}.trend{display:grid;grid-template-columns:80px 1fr 80px;gap:8px 12px;align-items:center;font-size:12px}.trend progress{width:100%;height:16px;accent-color:var(--blue)}.trend .sent{accent-color:#39a987}.body-text{white-space:pre-wrap;line-height:1.7;max-height:250px;overflow:auto}.footer{font-size:11px;color:#64748B;text-align:right}.subfilters{display:flex;gap:10px;max-width:600px;margin-bottom:15px}.subfilters>*{min-width:100px}.login-card .error{min-height:18px}dialog{border:1px solid #E2E8F0;border-radius:14px;padding:28px;width:min(680px,94vw);max-height:88vh;box-shadow:0 22px 100px #14213940}dialog::backdrop{background:#0c182f70}dialog h2{font-size:18px;margin:0 0 18px}.dialog-close{position:absolute;right:12px;top:10px;border:0;font-size:23px;background:transparent}.source{border-left:3px solid #93B4EF;padding:10px 14px;background:#F0F5FC;margin:12px 0}#toast{position:fixed;right:25px;bottom:25px;max-width:min(500px,90vw);padding:14px 20px;border:1px solid #E2E8F0;border-radius:10px;background:#fff;color:#1F2937;box-shadow:0 12px 60px #1c305230;z-index:10}code{background:#F1F5F9;padding:2px 5px;border-radius:3px;font-size:12px}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}aside{width:178px}.workspace{margin-left:178px}main{padding:22px}header{padding:0 22px}}@media(max-width:700px){aside{position:static;width:auto;padding:15px}.brand{margin:0 0 15px}.brand span{display:inline;margin-left:10px}nav{display:flex;overflow:auto}nav button{white-space:nowrap;padding:8px 10px}.aside-foot{display:flex;align-items:center;padding:10px 0 0}.aside-foot span{margin:0 auto 0 0}.workspace{margin-left:0}main{padding:16px}.form-grid{grid-template-columns:1fr}header{gap:10px;padding:0 16px}.card{padding:15px}.card strong{font-size:27px}.filters label{max-width:none}}

/* D: warm white and indigo */
:root{color-scheme:light}a{color:#2563EB;text-decoration:none}a:hover{text-decoration:underline}.login{background:#F7F9FC}.brand{color:#1F2937}aside{border-right:1px solid #E2E8F0}nav button.active,nav button:hover{color:#2563EB}nav button.active{font-weight:600}.aside-foot a{font-size:12px;padding:5px 0}.aside-foot button:hover{background:#EFF6FF;color:#2563EB}.login-card{box-shadow:0 12px 48px #1F293709}.eyebrow{color:#64748B}dialog{color:#1F2937;background:#fff}dialog::backdrop{background:#1F293755}:focus-visible{outline:2px solid #93B4EF;outline-offset:3px}@media(max-width:700px){.aside-foot{flex-wrap:wrap}aside{border-right:0;border-bottom:1px solid #E2E8F0}}

/* Daily message line chart */
.trend-legend{display:flex;align-items:center;gap:20px;flex-wrap:wrap;font-size:12px;color:#64748B;margin-bottom:8px}.trend-legend span{display:inline-flex;align-items:center;gap:8px}.trend-legend i{width:24px;border-top:3px solid #2563EB}.trend-legend i.sent{border-color:#16805D;border-top-style:dashed}.trend-period{margin-left:auto;font-variant-numeric:tabular-nums}.trend-scroll{overflow-x:auto}.trend-chart{display:block;width:100%;min-width:540px;height:auto}.trend-grid{stroke:#E2E8F0;stroke-dasharray:3 5;stroke-width:1}.trend-axis{fill:#64748B;font-size:12px}.trend-line{fill:none;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}.trend-line.inbound{stroke:#2563EB}.trend-line.sent{stroke:#16805D;stroke-dasharray:7 5}.trend-dot{fill:#fff;stroke-width:2;vector-effect:non-scaling-stroke}.trend-dot.inbound{stroke:#2563EB}.trend-dot.sent{stroke:#16805D}.trend-hit{fill:transparent;cursor:crosshair}.trend-guide{stroke:#93B4EF;stroke-dasharray:4 4;opacity:0}.trend-point:hover .trend-guide{opacity:1}.trend-point:hover .trend-dot{stroke-width:3}.trend-detail{font-size:12px;color:#1F2937;min-height:22px;margin:4px 0;font-variant-numeric:tabular-nums}.trend-data{margin-top:14px}.trend-data summary{cursor:pointer;color:#2563EB;font-size:12px;padding:5px 0}.trend-data .table-wrap{max-height:320px;margin-top:10px}@media(max-width:700px){.trend-period{margin-left:0;width:100%}.trend-legend{gap:10px 18px}}

.fleet-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.fleet-item{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;padding:16px;min-width:0}.fleet-item b{font-size:12px;max-width:100%;overflow-wrap:anywhere}.fleet-item small{color:var(--muted)}.fleet-item span{display:flex;flex-wrap:wrap;gap:5px}

/* Device and conversation workspace: online state never changes card opacity. */
.device-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}.device-card{background:#fff;border:1px solid #E2E8F0;border-radius:12px;padding:18px;opacity:1;color:#1F2937;min-width:0}.device-card[role=button]{cursor:pointer;transition:border-color .15s,box-shadow .15s}.device-card[role=button]:hover{border-color:#93B4EF;box-shadow:0 6px 22px #2563EB10}.device-card:focus-visible{outline:2px solid #93B4EF;outline-offset:3px}.device-card-top{display:flex;align-items:center;gap:12px;justify-content:space-between}.device-card-top b{font-size:11px;overflow-wrap:anywhere}.device-profile{display:flex;align-items:center;gap:12px;margin:20px 0 12px}.device-profile>div{min-width:0}.device-profile h2{font-size:16px;margin:0 0 5px;overflow-wrap:anywhere}.device-profile p{font-size:12px;color:#64748B;margin:0;overflow-wrap:anywhere}.device-avatar,.conversation-avatar{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:#EFF6FF;color:#2563EB;font-size:19px;font-weight:600}.device-profile-stats{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:#64748B}.device-facts{font-size:12px;margin:16px 0}.device-facts>div{display:flex;gap:12px;justify-content:space-between;padding:7px 0;border-bottom:1px solid #F1F5F9}.device-facts dt{color:#64748B;flex:none}.device-facts dd{margin:0;text-align:right;overflow-wrap:anywhere}.device-card .actions button{padding:7px 9px}.device-back{margin-bottom:18px}.device-heading{display:flex;gap:14px;align-items:baseline;flex-wrap:wrap;margin-bottom:18px}.device-heading h2{margin:0;font-size:23px}.device-heading>span{font-size:12px;color:#64748B;overflow-wrap:anywhere}.device-detail-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}.device-detail-main{background:#fff;border:1px solid #E2E8F0;border-radius:12px;overflow:hidden;min-width:0}.device-tabs{display:flex;gap:20px;padding:0 20px;border-bottom:1px solid #E2E8F0}.device-tabs button{border:0;border-radius:0;background:transparent;padding:16px 4px;color:#64748B;border-bottom:3px solid transparent}.device-tabs button.active{border-bottom-color:#2563EB;color:#2563EB;font-weight:600}.conversation-search{display:flex;gap:10px;align-items:center;padding:14px 16px;border-bottom:1px solid #E2E8F0}.conversation-search input{flex:1;max-width:400px}.conversation-search span{white-space:nowrap;font-size:12px;color:#64748B}.conversation-layout{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:500px}.conversation-list{border-right:1px solid #E2E8F0;max-height:640px;overflow:auto}.conversation-item{display:flex;gap:10px;width:100%;padding:16px 12px;border:0;border-bottom:1px solid #F1F5F9;border-radius:0;text-align:left;background:white;color:#1F2937}.conversation-item.active{background:#EFF6FF;box-shadow:inset 3px 0 #2563EB}.conversation-item:hover{background:#F0F5FC}.conversation-avatar{width:34px;height:34px;font-size:15px}.conversation-info{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.conversation-info b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#64748B}.conversation-info small{font-size:10px;color:#64748B}.conversation-view{min-width:0;display:flex;flex-direction:column;background:#F8FAFC}.chat-heading{display:flex;flex-direction:column;gap:7px;padding:18px;border-bottom:1px solid #E2E8F0;background:#fff;overflow-wrap:anywhere}.chat-heading span{font-size:11px;color:#64748B}.chat-paging{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:10px;font-size:11px;color:#64748B}.chat-paging button{font-size:11px;padding:5px 8px}.chat-messages{padding:12px 18px 24px;overflow:auto;height:480px;min-height:260px}.chat-date{text-align:center;font-size:11px;color:#64748B;margin:18px 0}.chat-row{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:15px 0}.chat-row.out{align-items:flex-end}.chat-bubble{background:#fff;border:1px solid #E2E8F0;border-radius:12px 12px 12px 3px;padding:11px 14px;max-width:90%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:13px}.chat-row.out .chat-bubble{background:#EFF6FF;border-color:#BFDBFE;border-radius:12px 12px 3px 12px}.chat-row.out .chat-bubble.failed{border-color:#F3B7C2;background:#FFF0F2}.chat-meta{font-size:10px;color:#64748B}.conversation-note{padding:0 16px 12px}.device-detail-main>.table-wrap{padding:16px;max-height:650px;overflow:auto}@media(max-width:1250px){.device-detail-layout{grid-template-columns:1fr}.device-detail-layout>.device-card{max-width:none}.conversation-layout{grid-template-columns:250px minmax(0,1fr)}}@media(max-width:700px){.device-grid{grid-template-columns:1fr}.conversation-layout{grid-template-columns:1fr}.conversation-list{max-height:230px;border-right:0;border-bottom:1px solid #E2E8F0}.chat-messages{height:440px}.conversation-search{flex-wrap:wrap}.conversation-search input{max-width:none}.device-tabs{gap:16px}.device-heading{gap:8px}}

/* Cloud white and blue; account card and personal center. */
aside{background:#F9FAFB}.card,.panel,.device-card{box-shadow:none}.login-card{box-shadow:0 10px 35px #1F293708}.aside-foot{padding:12px 0 0;border-top:1px solid #E2E8F0}.aside-foot .account-card{display:flex;width:100%;gap:10px;align-items:center;text-align:left;padding:12px 10px;background:#fff;border:1px solid #E2E8F0;border-radius:12px;color:#1F2937;font-size:13px}.account-avatar{display:grid!important;place-items:center;flex:none;width:40px;height:40px;border-radius:50%;background:#DBEAFE;color:#1D4ED8;font-size:15px!important;font-weight:700;letter-spacing:.5px}.aside-foot .account-card span{margin:0}.account-copy{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.account-copy strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-copy small{font-size:11px;color:#64748B}.account-arrow{color:#64748B;font-size:18px!important}.profile-hero{display:flex;gap:18px;align-items:center;margin-bottom:24px}.profile-hero .account-avatar{width:64px;height:64px;font-size:24px!important}.profile-hero h2{font-size:23px;margin:0 0 8px}.profile-hero p{margin:0;color:#64748B}.profile-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px;max-width:1000px}.profile-layout .panel{margin:0}.profile-layout input[readonly]{background:#F8FAFC;color:#64748B}.profile-security{display:grid;gap:14px}.profile-security p{color:#64748B;font-size:13px}.device-label-hint{font-size:11px;color:#64748B;margin:8px 0}@media(max-width:700px){.profile-layout{grid-template-columns:1fr}.aside-foot .account-card{width:auto;min-width:200px}.aside-foot{padding-top:12px}.account-copy{min-width:100px}}

/* Department organization and online ordering. */
.device-card.is-online{background:#ECFDF3;border-color:#86D6A6}.device-card.is-online[role=button]:hover{border-color:#34A66B;box-shadow:0 5px 18px #15803D12}.device-card.is-online .device-avatar{background:#D1FAE5;color:#166534}.device-card.is-online .device-facts>div{border-bottom-color:#D7EFDF}.check-row{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:13px;line-height:1.7}.check-row input[type=checkbox]{width:17px;height:17px;flex:none;accent-color:#2563EB}#deleteOrgForm{margin-top:20px}#dialog details{margin:14px 0}#dialog details .table-wrap{max-height:230px;overflow:auto}#deviceAssignmentForm input[readonly]{background:#F8FAFC;color:#64748B}.device-card .actions{gap:8px}.device-card .actions button{white-space:normal}

/* Enterprise blue palette inspired by the local SAP DESIGN.md; page geometry remains unchanged. */
:root{--blue:#0057D2;--muted:#475E75;color:#223548;background:#F5F6F7}body{background:#F5F6F7;color:#223548}
.login{background:radial-gradient(ellipse at 70% 20%,#EBF8FF,transparent 60%),#F5F6F7}.login-card{border-color:#DFE4E8;box-shadow:0 14px 42px #2235480b}
aside{background:#F5F6F7;color:#354A5F;border-right:1px solid #DFE4E8}.brand{color:#223548}.brand span{color:#64788B}
nav button{background:transparent;color:#475E75;border-radius:8px}nav button:hover{background:#EAECEE;color:#223548}nav button.active{background:#EBF8FF;color:#0057D2;box-shadow:inset 3px 0 #0057D2;font-weight:650}
.aside-foot .account-card{background:#fff;border-color:#DFE4E8;color:#223548}.account-avatar{background:#EBF8FF;color:#0040B0}.account-copy small,.account-arrow{color:#64788B}
.workspace{background:#F5F6F7}header{background:#fff;border-color:#DFE4E8;color:#475E75}main{color:#223548}.eyebrow,.hint,.muted,.footer{color:#64788B}
.page-title h1{color:#172B3E}.filters{background:#fff;border-color:#DFE4E8;border-radius:8px;box-shadow:none}.filters label{color:#475E75}
input,select,textarea{border-color:#D5DDE3;color:#223548;border-radius:6px}input:focus,select:focus,textarea:focus{outline:2px solid #C7E5F8;border-color:#0057D2}
button{background:#fff;border-color:#C9D3DB;color:#354A5F;border-radius:6px}button:hover{background:#F5FAFF;border-color:#8EB2DA;color:#0040B0}button.primary,.primary{background:#0057D2;border-color:#0057D2;color:#fff;box-shadow:none}button.primary:hover,.primary:hover{background:#0040B0;border-color:#0040B0;color:#fff}
button.danger,.danger{background:#FFF0F0;border-color:#E9B8B8;color:#A9303B}button.danger:hover,.danger:hover{background:#FCE4E4;border-color:#D98B8B;color:#8E202B}
.card,.panel,.device-card{background:#fff;border-color:#DFE4E8;border-radius:8px;box-shadow:none}.card .label,.card small,.panel .muted,th{color:#475E75}.panel h2{color:#172B3E}
th{background:#F5F6F7}td{border-color:#E5E9EC;color:#354A5F}tr:hover td{background:#F5FAFF}
.pill.good{color:#187447;background:#E8F5EC}.pill.warn{color:#9B6A18;background:#FFF4DD}.pill.bad{color:#A9303B;background:#FFF0F0}
.notice{border-color:#F0D99F;background:#FFF9E9;color:#886317}.source{border-color:#7BB5E0;background:#EBF8FF}
.device-card.is-online{background:#F0F9F2;border-color:#A9D2B4}.device-card.is-online .device-avatar{background:#DDF1E2;color:#187447}.device-card.is-online .device-facts>div{border-color:#DDEBE0}
.device-tabs button.active{color:#0057D2;border-bottom-color:#0057D2}.conversation-item{background:#fff}.conversation-item:hover{background:#F5FAFF}.conversation-item.active{background:#EBF8FF;box-shadow:inset 3px 0 #0057D2}.conversation-avatar{background:#EBF8FF;color:#0057D2}
.chat-row.out .chat-bubble{background:#EBF8FF;border-color:#CDE8F7}.chat-row.out .chat-bubble.failed{background:#FFF0F0;border-color:#E9B8B8}.chat-heading{border-color:#DFE4E8}.conversation-view{background:#F5F6F7}
.trend-legend,.trend-axis{color:#64788B}.trend-legend i,.trend-line.inbound,.trend-dot.inbound{border-color:#0057D2;stroke:#0057D2}.trend-legend i.sent,.trend-line.sent,.trend-dot.sent{border-color:#E69B2D;stroke:#E69B2D}.trend-grid{stroke:#DFE4E8}.trend-detail{color:#223548}.trend-data summary{color:#0057D2}.trend-guide{stroke:#8EB2DA}
.fleet-item:hover{background:#F5FAFF;border-color:#8EB2DA}.profile-hero .account-avatar{background:#EBF8FF;color:#0040B0}.profile-security p{color:#64788B}
.roster-own{background:#F5FAFF;border-color:#CDE8F7}.roster-toolbar select{background:#fff}.roster-link{background:#EBF8FF;border-color:#CDE8F7;color:#0040B0}.roster-link:hover{background:#DDF1FB}
#dialog{border-color:#DFE4E8;color:#223548}#dialog::backdrop{background:#10253F70}#toast{border-color:#DFE4E8;color:#223548;box-shadow:0 12px 40px #22354820}
.roster-overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}.roster-overview-stats>div{display:flex;align-items:baseline;gap:9px;background:#fff;border:1px solid #DFE4E8;border-radius:8px;padding:14px 16px}.roster-overview-stats b{font-size:22px;color:#0057D2;font-variant-numeric:tabular-nums}.roster-overview-stats span{font-size:12px;color:#475E75}.roster-own-v2{padding:18px;margin:0 0 16px;border-radius:8px}.roster-own-heading,.roster-fallback-title,.roster-group-card-head,.roster-department-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.roster-own-heading h3{margin:5px 0;font-size:17px;color:#172B3E}.roster-upload{align-items:end}.roster-hierarchy-panel{padding:18px}.roster-hierarchy{display:grid;gap:14px}.roster-fallback-card,.roster-department{border:1px solid #DFE4E8;border-radius:8px;background:#fff;padding:15px}.root-fallback{background:#F7FAFF;border-color:#D4E3F2}.roster-level-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#EBF8FF;color:#0057D2;font-size:12px;font-weight:700;flex:none}.roster-fallback-title>div:nth-child(2),.roster-department-head>div{display:flex;align-items:center;gap:10px;flex:1}.roster-fallback-title b,.roster-department-head h2{font-size:14px;color:#223548;margin:0}.roster-fallback-title small,.roster-department-head small{display:block;color:#64788B;font-size:11px;margin-top:4px}.roster-department-head{padding-bottom:12px;border-bottom:1px solid #E5E9EC}.roster-dept-fallback{margin:10px 0;background:#F5FAFF;border:1px solid #DFEAF4;border-radius:6px;padding:8px 11px}.roster-groups-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:10px;padding-top:12px}.roster-group-card{border:1px solid #E5E9EC;border-radius:7px;padding:12px;background:#fff;min-width:0}.roster-group-card-head{align-items:flex-start}.roster-group-card h3{font-size:13px;margin:0;color:#223548}.roster-group-card p,.roster-empty-line,.roster-missing{font-size:11px;color:#64788B;margin:6px 0 0}.roster-record{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;border-top:1px solid #E9EDF0}.roster-record-main{display:flex;flex-direction:column;gap:4px;min-width:0}.roster-record-main b{color:#223548;font-size:11px}.roster-record-main span,.roster-record-main small{color:#64788B;font-size:10px}.roster-record-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.roster-record-actions button,.roster-record-actions .roster-link{padding:5px 8px;font-size:10px}.roster-missing{border-top:1px solid #E9EDF0;margin-top:10px;padding-top:10px}.roster-all-records summary{cursor:pointer;color:#0057D2;font-weight:600}.roster-all-records[open] summary{margin-bottom:14px}
@media(max-width:900px){.roster-overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.roster-groups-grid{grid-template-columns:1fr}.roster-record{align-items:flex-start;flex-direction:column}.roster-record-actions{width:100%}}

/* Refined blue / teal palette and colored action buttons. */
:root{--blue:#3464D9;--muted:#68788F;color:#24344B;background:#F3F6FB}
button{background:#EAF0FC;border-color:#CCD9F3;color:#34578D;font-weight:500;transition:background .16s,border-color .16s,box-shadow .16s}
button:hover{background:#DCE7FC;border-color:#9CB7E8;color:#244574}
button.primary,.conversation-search button[type=submit]{background:#3464D9;border-color:#3464D9;color:#fff;box-shadow:0 2px 5px #3464D91A}
button.primary:hover,.conversation-search button[type=submit]:hover{background:#2853BF;border-color:#2853BF;color:#fff}
button[data-action=deviceEdit],button[data-action=editUser],button[data-action=departmentEdit],button[data-action=groupEdit],button[data-action=control-approve],button[data-action=control-unblock]{background:#168578;border-color:#168578;color:#fff}
button[data-action=deviceEdit]:hover,button[data-action=editUser]:hover,button[data-action=departmentEdit]:hover,button[data-action=groupEdit]:hover,button[data-action=control-approve]:hover,button[data-action=control-unblock]:hover{background:#106C62;border-color:#106C62;color:#fff}
button.danger,button[data-action=control-block]{background:#FCE9ED;border-color:#F1BDC7;color:#A72E49}
button.danger:hover,button[data-action=control-block]:hover{background:#F8D6DE;border-color:#DD94A5;color:#8C203A}
button:disabled{opacity:.55;box-shadow:none;cursor:not-allowed}
button:focus-visible{outline:3px solid #91B3F1;outline-offset:3px}
aside{background:#F8FAFE;border-right-color:#E0E7F2}
nav button{background:#EEF2F9;color:#566B88;border-radius:9px}
nav button:hover{background:#E0E9FB;color:#2E58B6}
nav button.active{background:#3464D9;color:#fff;box-shadow:0 3px 9px #3464D91C}
.aside-foot .account-card{background:#EAF0FC;border-color:#D4DFF3;color:#293F63}
.aside-foot .account-card:hover{background:#DFE9FB;border-color:#ABC1E7}
.account-avatar{background:#D3E1FC;color:#315DBB}
.card,.panel,.filters{border-color:#E0E7F2;border-radius:13px;box-shadow:0 3px 14px #22395704}
.device-grid{gap:18px}
.device-card{border-color:#DCE4F0;border-radius:16px;padding:20px;background:#fff;box-shadow:0 4px 18px #22395706;color:#293950;opacity:1}
.device-card[role=button]:hover{border-color:#ABC1E7;box-shadow:0 7px 24px #305CA012}
.device-card-top b{font-weight:500;color:#718198;letter-spacing:.2px}
.device-card-top .pill{background:#EEF2F7;color:#64748B;border:1px solid #DFE6EF;font-weight:600;padding:4px 10px}
.device-profile{margin:21px 0 16px;gap:13px}
.device-profile h2{color:#233550;font-size:17px;line-height:1.4}
.device-profile p{color:#7A889C;line-height:1.7}
.device-avatar{width:46px;height:46px;border-radius:14px;background:#E2EBFD;color:#3561BF;border:1px solid #CCDDFC;font-size:21px}
.device-facts{background:#F6F8FC;border:1px solid #EBEFF6;border-radius:10px;padding:5px 12px;margin:16px 0 18px}
.device-facts>div{padding:9px 0;border-bottom-color:#E7EDF5;line-height:1.5}
.device-facts>div:last-child{border-bottom:0}
.device-facts dt{color:#7A879B}
.device-facts dd{color:#40516B;font-variant-numeric:tabular-nums}
.device-card .actions{gap:8px}
.device-card .actions button{padding:9px 12px;border-radius:8px;font-size:12px;line-height:1.5}
.device-card.is-online{background:#EEF9F3;border-color:#A1D6B9;box-shadow:0 4px 18px #23875408}
.device-card.is-online[role=button]:hover{border-color:#64B88A;box-shadow:0 7px 24px #23875414}
.device-card.is-online .device-avatar{background:#D6F0E1;border-color:#B8DFC8;color:#27764E}
.device-card.is-online .device-facts{background:#F7FCF9;border-color:#D9ECDF}
.device-card.is-online .device-facts>div{border-bottom-color:#E0EEE5}
.device-card.is-online .device-card-top .pill.good{background:#D5F0DF;border-color:#A9D8BC;color:#267047}
.device-tabs{padding:10px 16px;gap:8px}
.device-tabs button{padding:9px 14px;background:#EDF2FC;border:1px solid #DAE4F6;border-radius:8px;color:#52709B}
.device-tabs button:hover{background:#DFE9FC}
.device-tabs button.active{background:#3464D9;border-color:#3464D9;color:#fff}
.conversation-item{background:#F8FAFE}
.conversation-item:hover{background:#EEF3FD}
.conversation-item.active{background:#E6EEFD;box-shadow:inset 3px 0 #3464D9}
.fleet-item{background:#EEF3FC;border-color:#D8E3F5}
.dialog-close{background:#EDF2FC;color:#58709B;border:1px solid #DCE5F5;border-radius:8px;padding:1px 9px}
.dialog-close:hover{background:#DDE7FA;color:#34578D}
@media(max-width:700px){.device-card{padding:17px}.device-tabs{gap:6px}.device-tabs button{padding:9px 12px}}
@media(prefers-reduced-motion:reduce){button,.device-card[role=button]{transition:none}}

/* Stronger sidebar typography. */
aside .brand{font-weight:800}
aside .brand span{font-weight:600}
aside nav button{font-weight:650}
aside nav button.active{font-weight:750}
.aside-foot .account-copy strong{font-weight:700}
.aside-foot .account-copy small{font-weight:600}

.submission-status{display:flex;align-items:center;gap:7px}.submission-info{width:23px;height:23px;padding:0;border-radius:50%;font-weight:700}.submission-status:has(.bad) .submission-info{background:#FCE9ED;color:#A72E49;border-color:#F1BDC7}.submission-response{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto;font-size:12px;line-height:1.6}.table-wrap td .muted{max-width:240px}button[data-action=editLead]{background:#168578;color:white;border-color:#168578}

/* Roster upload, preview and editable grid. */
.roster-dialog{width:min(1500px,96vw);max-width:96vw}.roster-upload,.roster-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:16px 0}.roster-upload label{max-width:420px}.roster-toolbar input{width:170px}.roster-table-scroll{overflow:auto;max-height:58vh}.roster-table{width:max-content;min-width:100%}.roster-table th{position:sticky;top:0;z-index:1;background:#EDF3FC}.roster-table th,.roster-table td{min-width:170px;max-width:260px}.roster-table td:nth-child(2){min-width:230px;max-width:260px}.roster-table textarea{min-height:160px;line-height:1.7}.roster-table th button{font-size:11px;margin-top:6px;padding:4px 8px}.roster-names{white-space:pre-wrap;line-height:1.8}.roster-link{display:inline-block;border:1px solid #CCD9F3;border-radius:8px;padding:8px 12px;background:#EAF0FC;color:#34578D}.roster-link:hover{background:#DCE7FC;text-decoration:none}.roster-table select{max-width:250px}#rosterUploadErrors li,#rosterEditErrors li{margin:5px 0}

.roster-own{padding:18px;margin:16px 0 24px;border:1px solid #cbdde8;border-radius:12px;background:#f3f8fc}.roster-own h3{margin-top:0}.roster-toolbar select{min-width:150px}.roster-own .roster-upload{margin-bottom:0}

/* Immediate navigation feedback; periodic updates preserve the current content. */
.page-loading{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-height:340px;padding:48px 24px;border:1px solid #dbe6ee;border-radius:14px;background:#fff;overflow:hidden;text-align:center;color:#294861}
.page-loading p{margin:0;line-height:1.7}.page-loading strong{font-size:17px}
.page-loading-spinner{display:block;width:36px;height:36px;border:3px solid #e2edf6;border-top-color:#327db0;border-radius:50%;animation:page-loading-spin .8s linear infinite}
.page-loading-track{position:absolute;inset:0 0 auto;height:3px;background:#eaf2f8;overflow:hidden}.page-loading-track span{display:block;width:35%;height:100%;background:#327db0;animation:page-loading-slide 1.5s ease-in-out infinite}
.page-load-error{text-align:center;padding:48px 24px}
@keyframes page-loading-spin{to{transform:rotate(360deg)}}
@keyframes page-loading-slide{from{transform:translateX(-110%)}to{transform:translateX(390%)}}
@media(prefers-reduced-motion:reduce){.page-loading-spinner,.page-loading-track span{animation:none}}

.channel-tags{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.channel-category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;max-height:320px;overflow:auto;padding:12px;border:1px solid #ddd;border-radius:10px}.channel-category-grid [hidden]{display:none}.channel-category-grid .check-row{margin:0;padding:8px}.channel-category-grid input{flex-shrink:0}
