/* ============================================================
   dashboard.css — right-side widget column + device switcher
   ============================================================ */

/* ---------- desk area split: dashboard (left) + icons (right) ---------- */
.desk-area{display:flex;gap:18px;direction:ltr;}
.dash{order:1;}
.desk-grid{order:2;flex:1;min-width:0;height:100%;
  column-width:94px;column-gap:4px;column-fill:auto;direction:rtl;
  overflow-x:auto;overflow-y:hidden;padding:2px 2px 8px;scrollbar-width:thin;}
.desk-grid::-webkit-scrollbar{height:8px;}
.desk-grid::-webkit-scrollbar-thumb{background:rgba(255,255,255,.28);border-radius:6px;}
.desk-app{display:flex;flex-direction:column;align-items:center;gap:8px;padding:9px 4px;
  width:90px;margin:0 auto 4px;border-radius:18px;break-inside:avoid;transition:transform .16s,background .16s;
  touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
.desk-app:hover{background:rgba(255,255,255,.16);}
.desk-app:active{transform:scale(.93);}
/* drag-reorder */
.desk-grid.is-dragging{cursor:grabbing;}
.desk-grid.is-dragging .desk-app{transition:transform .18s cubic-bezier(.2,.9,.3,1),background .16s;}
.desk-app.app-drag{opacity:.32;}
.desk-app.app-drag:active{transform:none;}
.desk-ghost{position:fixed;z-index:300;pointer-events:none;transform:translate(-50%,-52%) scale(1.06);
  display:flex;flex-direction:column;align-items:center;gap:8px;width:90px;
  filter:drop-shadow(0 18px 30px rgba(6,8,22,.55));opacity:.96;}
.desk-ico-wrap{position:relative;width:58px;height:58px;}
.desk-ico{width:58px;height:58px;border-radius:var(--radius-app);display:block;
  box-shadow:0 10px 20px -9px rgba(20,24,45,.55), inset 0 1px 0 rgba(255,255,255,.35);}
.desk-badge{position:absolute;top:-6px;right:-8px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;
  background:linear-gradient(150deg,#FF5A52,#E11D17);color:#fff;font-size:10.5px;font-weight:700;
  display:grid;place-items:center;box-shadow:0 3px 7px rgba(225,29,23,.55);border:1.5px solid rgba(255,255,255,.6);
  font-variant-numeric:tabular-nums;line-height:1;}
.desk-label{font-size:12px;font-weight:500;color:#fff;
  text-align:center;line-height:1.25;max-width:86px;
  padding:3px 9px;border-radius:9px;
  background:rgba(22,24,42,.34);
  backdrop-filter:blur(7px) saturate(140%);-webkit-backdrop-filter:blur(7px) saturate(140%);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 3px 10px -4px rgba(10,12,30,.5);
  text-shadow:0 1px 2px rgba(0,0,0,.35);}

/* ---------- dashboard column ---------- */
.dash{width:336px;flex:none;height:100%;overflow-y:auto;display:flex;flex-direction:column;gap:13px;
  padding-inline-end:4px;scrollbar-width:thin;direction:rtl;}
.dash::-webkit-scrollbar{width:7px;}
.dash::-webkit-scrollbar-thumb{background:rgba(255,255,255,.3);border-radius:6px;}
.dash-card{border-radius:20px;padding:15px 16px;box-shadow:var(--shadow-soft);
  background:rgba(255,255,255,.42);
  backdrop-filter:blur(30px) saturate(165%);-webkit-backdrop-filter:blur(30px) saturate(165%);
  border:1px solid rgba(255,255,255,.5);}

/* ---------- device switcher (in dashboard header) ---------- */
.dev-switch{position:relative;margin-bottom:13px;}
.ds-current{display:flex;align-items:center;gap:11px;width:100%;padding:4px 2px 13px;border-bottom:1px solid var(--hairline);}
.ds-av{width:42px;height:42px;border-radius:13px;flex:none;display:grid;place-items:center;color:#fff;
  box-shadow:0 8px 16px -7px rgba(20,24,45,.5), inset 0 1px 0 rgba(255,255,255,.3);}
.ds-av.sm{width:34px;height:34px;border-radius:11px;}
.ds-meta{display:flex;flex-direction:column;gap:2px;text-align:start;min-width:0;flex:1;}
.ds-meta b{font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ds-meta span{font-size:11.5px;color:var(--ink-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ds-sync{font-size:10.5px;font-weight:700;padding:4px 9px;border-radius:9px;white-space:nowrap;flex:none;}
.ds-sync.on{color:#1c8a64;background:rgba(39,174,131,.15);}
.ds-sync.off{color:#9A6712;background:rgba(226,160,63,.16);}
.ds-os{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;padding:4px 10px;border-radius:9px;
  white-space:nowrap;flex:none;color:var(--ink-soft);background:rgba(31,36,51,.07);}
.ds-os svg{color:var(--ink-faint);}
.ds-caret{color:var(--ink-faint);flex:none;}
.ds-scrim{position:fixed;inset:0;z-index:40;}
.ds-menu{position:absolute;top:48px;inset-inline-start:0;width:296px;z-index:41;border-radius:16px;padding:7px;
  box-shadow:var(--shadow-win);animation:fadeIn .15s both;}
.ds-menu-h{font-size:11px;font-weight:700;color:var(--ink-faint);padding:7px 10px 4px;}
.ds-item{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:12px;transition:.13s;}
.ds-item:hover{background:rgba(31,36,51,.06);}
.ds-on{background:var(--accent-soft)!important;}
.dot-status{width:9px;height:9px;border-radius:50%;flex:none;}
.ds-online{background:#27AE83;box-shadow:0 0 0 3px rgba(39,174,131,.2);}
.ds-offline{background:#B7BECC;}
.ds-check{color:var(--accent-deep);flex:none;}
.ds-add{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;margin-top:4px;padding:10px;
  border-radius:12px;color:var(--accent-deep);background:var(--accent-soft);font-size:12.5px;font-weight:700;transition:.13s;}
.ds-add:hover{background:var(--accent);color:#fff;}

/* ---------- status row (battery + lines) ---------- */
.status-row{display:flex;align-items:center;gap:16px;}
.bat-ring-wrap{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;}
.bat-ring{position:relative;width:64px;height:64px;flex:none;}
.bat-ring svg{transform:rotate(-90deg);}
.br-track{fill:none;stroke:rgba(31,36,51,.1);stroke-width:6;}
.br-val{fill:none;stroke-width:6;stroke-linecap:round;transition:stroke-dashoffset .6s ease;}
.br-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.br-label b{font-size:18px;font-weight:800;color:var(--ink);line-height:1;display:inline-flex;align-items:baseline;}
.br-label b span{font-size:10px;font-weight:600;margin-inline-start:1px;}
.br-chg{color:#27AE83;margin-top:1px;}
.bat-foot{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:800;}
.bat-foot-ic{display:flex;}

/* ---------- news / announcements widget ---------- */
.news-hero{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;
  display:grid;place-items:center;color:rgba(255,255,255,.92);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25), 0 8px 20px -12px rgba(20,24,45,.6);}
.news-hero::after{content:"";position:absolute;inset:0;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.06) 0 12px,rgba(255,255,255,0) 12px 24px);}
.news-hero-ic{position:relative;z-index:1;opacity:.9;}
.news-tag{position:absolute;top:9px;inset-inline-end:9px;z-index:2;font-size:10.5px;font-weight:800;
  padding:4px 10px;border-radius:8px;color:#fff;background:rgba(10,12,30,.32);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.22);}
.news-body{padding:11px 1px 2px;}
.news-title{display:block;font-size:14px;font-weight:800;color:var(--ink);line-height:1.45;}
.news-desc{margin:5px 0 10px;font-size:12px;line-height:1.7;color:var(--ink-faint);text-wrap:pretty;}
.news-btn{display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 15px;border-radius:11px;
  font-size:12.5px;font-weight:800;color:#fff;background:linear-gradient(150deg,var(--accent),var(--accent-deep));
  box-shadow:0 8px 18px -9px var(--accent-glow);transition:.14s;}
.news-btn:hover{filter:brightness(1.05);transform:translateY(-1px);}
/* compact inline variant — floats to the end of the description so the
   widget loses the extra button row and shrinks in height */
.news-btn-inline{height:28px;padding:0 12px;font-size:11.5px;border-radius:9px;
  float:inline-end;margin:1px 0 4px 10px;margin-inline-start:10px;margin-inline-end:0;}
.news-more{display:flex;flex-direction:column;margin-top:11px;border-top:1px solid var(--hairline);padding-top:5px;}
.news-item{display:flex;align-items:center;gap:9px;width:100%;padding:9px 6px;border-radius:11px;text-align:start;transition:.13s;}
.news-item:hover{background:rgba(31,36,51,.05);}
.news-item-tag{flex:none;font-size:9.5px;font-weight:800;padding:3px 8px;border-radius:7px;
  color:var(--accent-deep);background:var(--accent-soft);}
.news-item-title{flex:1;min-width:0;font-size:12px;font-weight:600;color:var(--ink-soft);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.news-item-chev{flex:none;color:var(--ink-faint);display:flex;}

/* ---------- dashboard scroll affordance ---------- */
.dash-more{position:sticky;bottom:6px;align-self:center;margin-top:-44px;z-index:5;
  width:36px;height:36px;border-radius:50%;flex:none;display:grid;place-items:center;
  color:#fff;background:linear-gradient(150deg,var(--accent),var(--accent-deep));
  box-shadow:0 10px 22px -8px var(--accent-glow), 0 0 0 4px rgba(255,255,255,.35);
  opacity:0;transform:translateY(8px);transition:.22s;pointer-events:none;}
.dash-more.on{opacity:1;transform:none;pointer-events:auto;}
.dash-more:hover{filter:brightness(1.06);}
.status-lines{flex:1;display:flex;flex-direction:column;gap:7px;min-width:0;}
.sl{display:flex;align-items:center;gap:8px;font-size:12.5px;}
.sl-ic{color:var(--ink-faint);flex:none;display:flex;}
.sl-k{color:var(--ink-faint);flex:none;}
.sl-v{margin-inline-start:auto;font-weight:700;color:var(--ink);text-align:end;}

/* ---------- quick stat tiles ---------- */
.dash-tiles{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px;}
.stat-tile{display:flex;flex-direction:column;gap:5px;padding:11px 11px 12px;border-radius:15px;
  background:rgba(255,255,255,.5);border:1px solid var(--hairline);box-shadow:var(--shadow-soft);}
.st-ic{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;color:#fff;}
.st-val{font-size:13.5px;font-weight:800;color:var(--ink);line-height:1.1;}
.st-label{font-size:10.5px;color:var(--ink-faint);font-weight:600;line-height:1.2;}
.tone-ok .st-ic{background:linear-gradient(150deg,#34C759,#27A653);}
.tone-warn .st-ic{background:linear-gradient(150deg,#FFB23E,#F0872A);}
.tone-warn .st-val{color:#C77E14;}
.tone-info .st-ic{background:linear-gradient(150deg,#4FB4F5,#1E80E6);}
.tone-mute .st-ic{background:linear-gradient(150deg,#9AA3B5,#6B7488);}
.tone-mute .st-val{color:var(--ink-faint);}

/* ---------- storage card ---------- */
.stor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px;}
.stor-cap{font-size:11px;color:var(--ink-faint);font-weight:600;display:block;}
.stor-num{font-size:14px;color:var(--ink);}
.stor-backup{font-size:11px;color:var(--ink-faint);white-space:nowrap;}
.spark{width:100%;height:46px;display:block;margin:2px 0 10px;}
.stor-bar{display:flex;height:9px;border-radius:6px;overflow:hidden;gap:2px;margin-bottom:9px;background:rgba(31,36,51,.06);}
.stor-bar span{display:block;border-radius:3px;}
.stor-legend{display:flex;flex-wrap:wrap;gap:5px 12px;margin-bottom:13px;}
.leg{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--ink-soft);font-weight:600;}
.leg i{width:9px;height:9px;border-radius:3px;}
.sys-rows{display:flex;flex-direction:column;gap:1px;border-top:1px solid var(--hairline);padding-top:11px;}
.sys-rows.first{border-top:none;padding-top:2px;}
.sys-row{display:flex;align-items:center;justify-content:space-between;padding:6px 0;font-size:12px;}
.sys-row span{display:flex;align-items:center;gap:7px;color:var(--ink-faint);}
.sys-row b{color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums;font-size:11.5px;}
.sys-row b.val-ok{color:#1c8a64;}
.sys-row b.val-warn{color:#c2802a;}

/* ---------- install status ---------- */
.inst-label{display:flex;align-items:center;gap:10px;font-size:11.5px;font-weight:700;color:var(--ink-soft);
  margin:15px 0 6px;text-align:center;}
.inst-label::before,.inst-label::after{content:"";flex:1;height:1px;background:var(--hairline);}
.inst-label span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.inst-label svg{color:var(--ink-faint);}
.inst-rows{display:flex;flex-direction:column;}
.inst-row{display:flex;align-items:center;gap:9px;padding:7px 0;font-size:12px;}
.inst-ic{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;
  color:var(--ink-soft);background:rgba(31,36,51,.06);}
.inst-k{color:var(--ink-soft);font-weight:600;flex:1;}
.inst-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:4px 9px;border-radius:8px;white-space:nowrap;}
.inst-pill i{width:7px;height:7px;border-radius:50%;}
.inst-pill.ip-on{color:#1c8a64;background:rgba(39,174,131,.12);}
.inst-pill.ip-on i{background:#27AE83;}
.inst-pill.ip-off{color:#C77E14;background:rgba(226,160,63,.16);}
.inst-pill.ip-off i{background:#E2A03F;}
.inst-pill.ip-na{color:var(--ink-faint);background:rgba(31,36,51,.07);}
.inst-pill.ip-na i{background:#9AA3B5;}
.perm-chips{display:flex;flex-wrap:wrap;gap:6px;margin:11px 0 13px;}
.perm-chip{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:5px 10px;border-radius:9px;}
.perm-chip i{width:7px;height:7px;border-radius:50%;}
.perm-chip.pc-on{color:#1c8a64;background:rgba(39,174,131,.12);}
.perm-chip.pc-on i{background:#27AE83;}
.perm-chip.pc-off{color:#9A6712;background:rgba(226,160,63,.14);}
.perm-chip.pc-off i{background:#E2A03F;}
.dash-btns{display:flex;gap:9px;margin-top:13px;}
.db-primary{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;border-radius:13px;
  color:#fff;font-size:12.5px;font-weight:700;background:linear-gradient(150deg,var(--accent),var(--accent-deep));
  box-shadow:0 8px 18px -8px var(--accent-glow);transition:.14s;}
.db-primary:hover{filter:brightness(1.05);}
.db-ghost{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;padding:0 16px;border-radius:13px;
  color:var(--ink);font-size:12.5px;font-weight:700;background:rgba(31,36,51,.06);transition:.14s;}
.db-ghost:hover{background:rgba(31,36,51,.11);}

/* ---------- reports card ---------- */
.dash-card.reports{display:flex;flex-direction:column;gap:2px;}
.rep-head{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:var(--ink);margin-bottom:7px;}
.rep-head svg{color:var(--ink-faint);}
.rep-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--hairline);}
.rep-row:first-of-type{border-top:none;}
.rep-dot{width:10px;height:10px;border-radius:50%;flex:none;box-shadow:0 0 0 3px rgba(255,255,255,.5);}
.rep-k{font-size:12.5px;color:var(--ink-soft);font-weight:600;}
.rep-v{margin-inline-start:auto;font-size:11.5px;color:var(--ink-faint);white-space:nowrap;}
.rep-v b{font-size:15px;color:var(--ink);font-weight:800;font-variant-numeric:tabular-nums;}

/* ---------- trustpilot card ---------- */
.tp-card{display:flex;flex-direction:column;}
.tp-stars{display:flex;gap:3px;color:#00B67A;margin:2px 0 8px;}
.tp-stars svg{fill:#00B67A;}
.tp-desc{margin:0 0 13px;font-size:12.5px;line-height:1.85;color:var(--ink-soft);text-wrap:pretty;}
.tp-actions{display:flex;flex-direction:column;gap:8px;}
.tp-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:9px 16px;
  border-radius:12px;line-height:1.4;text-align:center;text-wrap:balance;
  background:#00B67A;color:#fff;font-size:13px;font-weight:700;text-decoration:none;transition:.14s;}
.tp-btn svg{flex:none;}
.tp-btn:hover{background:#03a06d;transform:translateY(-1px);}
.tp-btn svg{fill:#fff;}
.tp-btn-ghost{background:var(--accent);color:#fff;border:1.5px solid var(--accent);}
.tp-btn-ghost:hover{background:var(--accent-deep);border-color:var(--accent-deep);}
.tp-btn-ghost svg{fill:none;color:#fff;}

/* ---------- topbar device switcher ---------- */
.tb-device{position:relative;margin-inline-start:6px;}
.tbd-btn{display:flex;align-items:center;gap:7px;height:34px;padding:0 13px;border-radius:11px;
  background:rgba(255,255,255,.5);border:1px solid var(--hairline);font-size:12.5px;color:var(--ink);transition:.14s;}
.tbd-btn:hover{background:rgba(255,255,255,.8);}
.tbd-btn b{font-weight:700;}
.tbd-btn svg{color:var(--ink-faint);margin-inline-start:2px;}
.tbd-pair{color:var(--ink-faint);}
.tbd-dot{width:8px;height:8px;border-radius:50%;background:#B7BECC;flex:none;}
.tbd-dot[data-on="true"]{background:#27AE83;box-shadow:0 0 0 3px rgba(39,174,131,.2);}
.tbd-menu{position:absolute;top:42px;inset-inline-start:0;width:288px;z-index:41;border-radius:16px;padding:7px;
  box-shadow:var(--shadow-win);animation:fadeIn .15s both;}

/* ---------- widget chrome (closable header) ---------- */
.widget-head{display:flex;align-items:center;gap:8px;margin:-2px 0 12px;}
.widget-title{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:var(--ink);
  flex:1 1 auto;min-width:0;text-wrap:pretty;}
.widget-title svg{color:var(--ink-faint);flex:none;}
.widget-x{margin-inline-start:auto;width:28px;height:28px;border-radius:9px;flex:none;display:grid;place-items:center;
  color:var(--ink-faint);transition:.14s;opacity:.8;}
.widget-x:hover{background:rgba(31,36,51,.09);color:var(--ink);opacity:1;}

/* ---------- all-widgets-hidden empty state ---------- */
.dash-empty{display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;
  padding:34px 20px;border-radius:20px;border:1px dashed var(--hairline);background:rgba(255,255,255,.18);}
.dash-empty .de-ic{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;
  color:var(--ink-faint);background:rgba(31,36,51,.06);}
.dash-empty b{font-size:14px;color:var(--ink);}
.dash-empty>span{font-size:12px;color:var(--ink-faint);line-height:1.7;max-width:230px;}
.de-btn{display:inline-flex;align-items:center;gap:7px;margin-top:6px;height:38px;padding:0 16px;border-radius:12px;
  font-size:12.5px;font-weight:700;color:var(--accent-deep);background:var(--accent-soft);transition:.14s;}
.de-btn:hover{background:var(--accent);color:#fff;}

/* ---------- DARK (default) dashboard glass — matches widget material ---------- */
[data-theme="dark"] .dash-card{
  background:rgba(20,22,40,.46);
  backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 14px 34px -14px rgba(6,8,22,.7);
}
/* primary text → white */
[data-theme="dark"] .dash-card .dh-meta b,[data-theme="dark"] .dash-card .br-label b,[data-theme="dark"] .dash-card .sl-v,[data-theme="dark"] .dash-card .sys-row b,
[data-theme="dark"] .dash-card .rep-v b,[data-theme="dark"] .dash-card .stor-num,[data-theme="dark"] .dash-card .rep-head,[data-theme="dark"] .dash-card .st-val,
[data-theme="dark"] .dash-card .widget-title{color:#fff;}
/* secondary text → muted white */
[data-theme="dark"] .dash-card .dh-meta span,[data-theme="dark"] .dash-card .sl-k,[data-theme="dark"] .dash-card .sys-row span,[data-theme="dark"] .dash-card .inst-k,
[data-theme="dark"] .dash-card .inst-label,[data-theme="dark"] .dash-card .rep-k,[data-theme="dark"] .dash-card .stor-cap,[data-theme="dark"] .dash-card .stor-backup,
[data-theme="dark"] .dash-card .leg,[data-theme="dark"] .dash-card .st-label,[data-theme="dark"] .dash-card .rep-v{color:rgba(255,255,255,.62);}
/* icons → soft white */
[data-theme="dark"] .dash-card .sl-ic,[data-theme="dark"] .dash-card .sys-row span svg,[data-theme="dark"] .dash-card .inst-label svg,
[data-theme="dark"] .dash-card .rep-head svg,[data-theme="dark"] .dash-card .widget-title svg{color:rgba(255,255,255,.7);}
[data-theme="dark"] .dash-card .widget-x{color:rgba(255,255,255,.55);}
[data-theme="dark"] .dash-card .widget-x:hover{background:rgba(255,255,255,.12);color:#fff;}
/* battery ring */
[data-theme="dark"] .dash-card .br-track{stroke:rgba(255,255,255,.16);}
[data-theme="dark"] .dash-card .br-label b span{color:rgba(255,255,255,.7);}
/* hairlines & soft chip backgrounds → light */
[data-theme="dark"] .dash-card .sys-rows{border-top-color:rgba(255,255,255,.12);}
[data-theme="dark"] .dash-card .rep-row{border-top-color:rgba(255,255,255,.1);}
[data-theme="dark"] .dash-card .inst-label::before,[data-theme="dark"] .dash-card .inst-label::after{background:rgba(255,255,255,.16);}
[data-theme="dark"] .dash-card .inst-ic{background:rgba(255,255,255,.12);color:rgba(255,255,255,.82);}
[data-theme="dark"] .dash-card .rep-dot{box-shadow:0 0 0 3px rgba(255,255,255,.14);}
/* keep green / orange pills readable on dark */
[data-theme="dark"] .dash-card .inst-pill.ip-on,[data-theme="dark"] .dash-card .sys-row b.val-ok,[data-theme="dark"] .dash-card .perm-chip.pc-on{color:#46D596;}
[data-theme="dark"] .dash-card .inst-pill.ip-on{background:rgba(39,174,131,.2);}
[data-theme="dark"] .dash-card .inst-pill.ip-off,[data-theme="dark"] .dash-card .sys-row b.val-warn,[data-theme="dark"] .dash-card .perm-chip.pc-off{color:#F4B14E;}
[data-theme="dark"] .dash-card .inst-pill.ip-off{background:rgba(226,160,63,.22);}
[data-theme="dark"] .dash-card .inst-pill.ip-na{color:rgba(255,255,255,.55);background:rgba(255,255,255,.1);}
/* dark empty-state + device header */
[data-theme="dark"] .dash-empty{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.07);backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%);box-shadow:0 18px 40px -20px rgba(0,0,0,.55);}
[data-theme="dark"] .dash-empty .de-ic{background:rgba(255,255,255,.1);color:rgba(255,255,255,.6);}
[data-theme="dark"] .dash-empty b{color:#fff;}
[data-theme="dark"] .dash-empty>span{color:rgba(255,255,255,.58);}
[data-theme="dark"] .dev-head{border-bottom-color:rgba(255,255,255,.14);}
[data-theme="dark"] .dh-meta b{color:#fff;}
[data-theme="dark"] .dh-meta span{color:rgba(255,255,255,.6);}
[data-theme="dark"] .dh-status.on{color:#46D596;background:rgba(39,174,131,.2);}
[data-theme="dark"] .dh-status.off{color:#F4B14E;background:rgba(226,160,63,.22);}

/* ---------- DARK news widget text ---------- */
[data-theme="dark"] .dash-card .news-title{color:#fff;}
[data-theme="dark"] .dash-card .news-desc{color:rgba(255,255,255,.6);}
[data-theme="dark"] .dash-card .news-more{border-top-color:rgba(255,255,255,.12);}
[data-theme="dark"] .dash-card .news-item:hover{background:rgba(255,255,255,.07);}
[data-theme="dark"] .dash-card .news-item-title{color:rgba(255,255,255,.72);}
[data-theme="dark"] .dash-card .news-item-tag{color:#9DC4F5;background:rgba(43,166,240,.2);}

/* ---------- LIGHT dashboard glass ---------- */
[data-theme="light"] .dash-card{
  background:rgba(255,255,255,.62);
  backdrop-filter:blur(26px) saturate(165%);-webkit-backdrop-filter:blur(26px) saturate(165%);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 14px 34px -16px rgba(20,24,45,.4);
}

/* ---------- static device header (theme-neutral base) ---------- */
.dev-head{display:flex;align-items:center;gap:11px;padding:2px 2px 13px;margin-bottom:13px;
  border-bottom:1px solid var(--hairline);}
.dh-av{width:42px;height:42px;border-radius:13px;flex:none;display:grid;place-items:center;color:#fff;
  box-shadow:0 8px 16px -7px rgba(6,8,22,.6), inset 0 1px 0 rgba(255,255,255,.3);}
.dh-meta{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;text-align:start;}
.dh-meta b{font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dh-meta span{font-size:11.5px;color:var(--ink-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dh-status{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;
  padding:4px 9px;border-radius:9px;white-space:nowrap;flex:none;}
.dh-status i{width:7px;height:7px;border-radius:50%;}
.dh-status.on{color:#1c8a64;background:rgba(39,174,131,.14);}
.dh-status.on i{background:#34D08A;box-shadow:0 0 0 3px rgba(52,208,138,.18);}
.dh-status.off{color:#c2802a;background:rgba(226,160,63,.16);}
.dh-status.off i{background:#E2A03F;}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .dash{width:300px;}
}
@media (max-width:760px){
  .desk-area{flex-direction:column;overflow-y:auto;padding:14px;}
  .desk-grid{flex:none;column-width:auto;height:auto;overflow:visible;
    display:grid;grid-template-columns:repeat(4,1fr);gap:14px 4px;direction:rtl;order:2;}
  .desk-app{width:auto;margin:0;}

  /* ---- widgets become a horizontal auto-advancing carousel ----
     (so the app list sits right under one swipeable widget strip,
      instead of a tall column the user must scroll past) */
  .dash{width:100%;order:1;flex:none;height:auto;gap:0;padding:2px 0 2px;
    display:flex;flex-direction:row;align-items:stretch;
    overflow-x:auto;overflow-y:hidden;
    scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
    direction:ltr;scrollbar-width:none;}
  .dash::-webkit-scrollbar{display:none;}
  .dash-card,.dash-empty{flex:0 0 100%;margin:0;direction:rtl;scroll-snap-align:start;}
  .dash-more{display:none!important;}

  /* pager dots: pulled up to sit on the widget's lower edge, trimming the
     empty gap above/below so they don't create a dead strip */
  .dash-dots{order:1;display:flex;justify-content:center;gap:7px;padding:0;
    margin:-16px 0 6px;position:relative;z-index:3;direction:ltr;}
  .dd-dot{width:7px;height:7px;border-radius:50%;padding:0;flex:none;
    background:rgba(255,255,255,.34);transition:.18s;}
  .dd-dot.on{background:#fff;width:20px;border-radius:4px;}
  [data-theme="light"] .dd-dot{background:rgba(31,36,51,.24);}
  [data-theme="light"] .dd-dot.on{background:var(--accent);}

  /* let long widget titles (e.g. Trustpilot) wrap instead of being clipped */
  .widget-title{white-space:normal;line-height:1.3;}
}
