/* =====================================================================
   Smart Stavba — "Liquid Glass" skin (2026-10-26)
   Active when <html class="skin-glass"> and the dark theme is on.
   Classic look: localStorage.smartstavba_skin = 'classic' (or remove this file).
   ===================================================================== */

html.skin-glass:not([data-theme="light"]){
  --glass-bg:rgba(14,24,50,.42);
  --glass-bg-strong:rgba(12,20,44,.72);
  --glass-line:rgba(255,255,255,.12);
  --glass-line-strong:rgba(255,255,255,.2);
  --glass-hi:rgba(255,255,255,.07);
  --glass-blur:blur(22px) saturate(125%);
  --glass-shadow:0 18px 40px -18px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.08);

  --color-background:#0a1532;
  --color-surface-container-lowest:var(--glass-bg);
  --color-surface-container-low:rgba(255,255,255,.045);
  --color-surface-container:rgba(255,255,255,.07);
  --color-surface-container-high:rgba(255,255,255,.1);
  --color-surface-container-highest:rgba(255,255,255,.14);
  --color-surface-variant:rgba(255,255,255,.08);
  --color-outline-variant:var(--glass-line);
  --color-primary:#7aa7ff;
  --card:var(--glass-bg);
  --sidebar:var(--glass-bg);
  --input-bg:rgba(255,255,255,.06);
  --border:var(--glass-line);
}

/* ---------- Background: night construction scene ---------- */
html.skin-glass:not([data-theme="light"]),
html.skin-glass:not([data-theme="light"]) body{background:#081430 !important;}
html.skin-glass:not([data-theme="light"]) body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    linear-gradient(180deg,rgba(6,12,30,.05) 0%,rgba(6,12,30,.18) 55%,rgba(5,8,18,.5) 100%),
    url("/img/bg-crane.jpg") center bottom / cover no-repeat,
    #081430;
}
html.skin-glass:not([data-theme="light"]) #appShell{position:relative;z-index:1;background:transparent;}
html.skin-glass:not([data-theme="light"]) .layout,
html.skin-glass:not([data-theme="light"]) #roleAdmin,
html.skin-glass:not([data-theme="light"]) #roleWorker{z-index:1;background:transparent !important;}
html.skin-glass:not([data-theme="light"]) .main-area,
html.skin-glass:not([data-theme="light"]) .content-area,
html.skin-glass:not([data-theme="light"]) body[data-role="admin"]{background:transparent !important;}

/* ---------- Glass surfaces ---------- */
html.skin-glass:not([data-theme="light"]) :is(
  .card,.top-header,.sidebar,
  .dzx-panel,.dzx-kpi,.dza-panel,.dza-kpi,
  .mtx-panel,.mtx-kpi,.mtx-cat,
  .sg-card,.sg-row,.mk-panel,.smod-card,
  .db-hero,.db-tile,.db-approve,.db-week,.dash-panel,
  .sk-stat,.dk-stat,.diary-kpi .dk-stat,.sites-filter-bar,.admin-site-card,
  .hours-filter-bar,.km-filter-bar,.settings-integ-chips,.mat-tabs,
  .sd-modal,.modal
){
  -webkit-backdrop-filter:var(--glass-blur);
  backdrop-filter:var(--glass-blur);
  border-color:var(--glass-line) !important;
  box-shadow:var(--glass-shadow);
}
html.skin-glass:not([data-theme="light"]) .card{background:var(--glass-bg);}
html.skin-glass:not([data-theme="light"]) :is(.modal,.sd-modal){background:var(--glass-bg-strong) !important;}
html.skin-glass:not([data-theme="light"]) .modal-overlay{background:rgba(4,8,20,.5);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);}

/* ---------- Floating sidebar (desktop) ---------- */
@media (min-width:901px){
  html.skin-glass:not([data-theme="light"]) .sidebar{
    top:16px;left:16px;height:calc(100vh - 32px);height:calc(100dvh - 32px);
    border:1px solid var(--glass-line);border-radius:26px;
    background:var(--glass-bg);
  }
  html.skin-glass:not([data-theme="light"]) #adminMain{margin-left:272px;}
  html.skin-glass:not([data-theme="light"]) #adminMain.sidebar-collapsed{margin-left:104px;}
  html.skin-glass:not([data-theme="light"]) #adminMain > .top-header,
  html.skin-glass:not([data-theme="light"]) #roleWorker > .top-header{
    margin:16px 16px 0 0;border:1px solid var(--glass-line);border-radius:22px;height:60px;
    background:var(--glass-bg);
  }
  html.skin-glass:not([data-theme="light"]) #roleWorker > .top-header{margin:16px 16px 0 16px !important;}
  html.skin-glass:not([data-theme="light"]) .content-area{padding:24px 16px 24px 0;}
  html.skin-glass:not([data-theme="light"]) #roleWorker .content-area{padding-left:16px;}
}

/* ---------- Mobile chrome ---------- */
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) .top-header{
    margin:8px 10px 0;border:1px solid var(--glass-line);border-radius:20px;background:var(--glass-bg);
  }
  html.skin-glass:not([data-theme="light"]) .sidebar{
    top:10px;left:10px;height:calc(100dvh - 20px);border:1px solid var(--glass-line);border-radius:24px;
    background:var(--glass-bg-strong);
  }
}

/* ---------- Sidebar navigation ---------- */
html.skin-glass:not([data-theme="light"]) .sidebar-brand{border-bottom-color:transparent !important;}
html.skin-glass:not([data-theme="light"]) .sidebar-nav a{border-radius:14px;color:rgba(232,240,255,.78);}
html.skin-glass:not([data-theme="light"]) .sidebar-nav a:hover{background:rgba(255,255,255,.08);color:#fff;}
html.skin-glass:not([data-theme="light"]) .sidebar-nav a.active{
  background:#fff;color:#0b1430;font-weight:700;
  box-shadow:0 8px 20px -10px rgba(255,255,255,.6);
}
html.skin-glass:not([data-theme="light"]) .sidebar-nav a.active i{color:#0b1430;}
html.skin-glass:not([data-theme="light"]) .sidebar-nav-sub a.active{background:rgba(255,255,255,.14);color:#fff;box-shadow:none;}
html.skin-glass:not([data-theme="light"]) .sidebar-nav-sub a.active i{color:#fff;}
html.skin-glass:not([data-theme="light"]) .sidebar-logout{border-top-color:transparent !important;}
html.skin-glass:not([data-theme="light"]) .sidebar-logout button{
  border-radius:16px;border:1px solid var(--glass-line-strong);background:rgba(255,255,255,.06);color:#fff;
}

/* ---------- Header pieces ---------- */
html.skin-glass:not([data-theme="light"]) .header-search,
html.skin-glass:not([data-theme="light"]) .header-search input{background:transparent;}
html.skin-glass:not([data-theme="light"]) .header-search{border-radius:999px;border:1px solid var(--glass-line);background:rgba(255,255,255,.05);}
html.skin-glass:not([data-theme="light"]) .header-meta,
html.skin-glass:not([data-theme="light"]) .lang-btn{border-radius:999px;border-color:var(--glass-line);background:rgba(255,255,255,.06);}

/* ---------- Controls ---------- */
html.skin-glass:not([data-theme="light"]) .btn-primary{
  background:linear-gradient(180deg,#4a86ff,#2f6bff);border-color:transparent;color:#fff;
  box-shadow:0 10px 24px -12px rgba(47,107,255,.9),inset 0 1px 0 rgba(255,255,255,.25);
}
html.skin-glass:not([data-theme="light"]) .btn-secondary{
  background:rgba(255,255,255,.06);border:1px solid var(--glass-line-strong);color:#fff;
}
html.skin-glass:not([data-theme="light"]) :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]){
  background-color:rgba(255,255,255,.06);border-color:var(--glass-line);
}
html.skin-glass:not([data-theme="light"]) .badge{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);}

/* ---------- Toasts / dropdowns stay readable ---------- */
html.skin-glass:not([data-theme="light"]) :is(.lang-dropdown,.account-dropdown,.global-search-dd,.ss-picker-sheet,.settings-feat-tip){
  background:var(--glass-bg-strong) !important;-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);
  border-color:var(--glass-line-strong) !important;
}

@media (prefers-reduced-transparency: reduce){
  html.skin-glass:not([data-theme="light"]){--glass-bg:rgba(14,24,50,.92);--glass-bg-strong:rgba(12,20,44,.96);}
}

/* ---------- Brand mark ---------- */
html.skin-glass:not([data-theme="light"]) #adminSidebar:not(.collapsed) .sidebar-brand{justify-content:flex-start;padding:0 22px;height:76px;}
html.skin-glass:not([data-theme="light"]) .sidebar-brand .brand-wordmark{display:inline-flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em;}
html.skin-glass:not([data-theme="light"]) .sidebar-brand .brand-wordmark::before{
  content:"";flex:0 0 42px;height:42px;border-radius:14px;
  -webkit-mask:none;
  background-image:
    url("/brand-icon-white.svg"),
    radial-gradient(120% 70% at 30% 0%,rgba(255,255,255,.42),rgba(255,255,255,0) 60%),
    radial-gradient(90% 60% at 80% 110%,rgba(120,170,255,.45),rgba(120,170,255,0) 70%),
    linear-gradient(160deg,rgba(255,255,255,.20),rgba(255,255,255,.05));
  background-size:24px 24px,cover,cover,cover;background-position:center 54%,center,center,center;background-repeat:no-repeat;
  -webkit-backdrop-filter:blur(14px) saturate(180%);backdrop-filter:blur(14px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    inset 0 -1px 0 rgba(255,255,255,.12),
    inset 1px 0 0 rgba(255,255,255,.18),
    inset -1px 0 0 rgba(255,255,255,.10),
    0 0 0 1px rgba(255,255,255,.14),
    0 10px 24px -10px rgba(10,20,60,.75),
    0 0 18px -6px rgba(110,160,255,.55);
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.04));
}
@media (max-width:900px){html.skin-glass:not([data-theme="light"]) .top-header{padding:0 10px;}}

/* ---------- Worker shell ---------- */
html.skin-glass:not([data-theme="light"]) body::before{top:0 !important;bottom:0 !important;height:auto !important;display:block !important;transform:none !important;}
html.skin-glass:not([data-theme="light"]) .bottom-nav{
  background:var(--glass-bg-strong) !important;border-top:1px solid var(--glass-line) !important;
  -webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);
}
@media (min-width:901px){
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav{
    border:1px solid var(--glass-line) !important;border-radius:26px;
  }
}

/* ---------- Login ---------- */
html.skin-glass:not([data-theme="light"]) #loginScreen{
  background:
    linear-gradient(180deg,rgba(6,12,30,.25) 0%,rgba(5,8,18,.55) 100%),
    url("/img/bg-crane.jpg") center bottom / cover no-repeat,#081430 !important;
}
html.skin-glass:not([data-theme="light"]) #loginScreen :is(.login-card,.login-box,.auth-card){
  background:var(--glass-bg) !important;border:1px solid var(--glass-line) !important;
  -webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-shadow);
}
@media (min-width:901px){
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav{
    top:16px !important;left:16px !important;bottom:16px !important;height:auto !important;
    background:var(--glass-bg) !important;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav a.active,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav .nav-item.active{
    background:#fff !important;color:#0b1430 !important;border-radius:14px;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav a.active i,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #workerNav .nav-item.active i{color:#0b1430 !important;}
}
/* Brand: icon sits inside the wordmark, so lift the width cap */
html.skin-glass:not([data-theme="light"]) #adminSidebar:not(.collapsed) .sidebar-brand .brand-wordmark{max-width:none;overflow:visible;font-size:17px;}

/* Opacity animations on ancestors make Safari drop backdrop-filter until they end
   (the "flash of see-through panels"). Slide in instead of fading. */
@keyframes glassTabIn{from{transform:translateY(6px)}to{transform:none}}
html.skin-glass:not([data-theme="light"]) .tab-content{animation:glassTabIn .25s cubic-bezier(.22,1,.36,1);}
html.skin-glass:not([data-theme="light"]) :is(.card,.modal,.modal-overlay,.dzx,.dza,.mtx,.sg,.dash-bento,.dash-layout){animation-name:none;}
html.skin-glass:not([data-theme="light"]) :is(#admin-settings .settings-panel.active,#admin-settings .settings-integ-pane.active,#admin-material .mat-body){animation:glassTabIn .22s cubic-bezier(.22,1,.36,1);}
html.skin-glass:not([data-theme="light"]) .modal{animation:glassTabIn .25s cubic-bezier(.22,1,.36,1);}

/* Wrapper "cards" that only group other glass cards must not blur themselves
   (nested blur over a transparent box = solid saturated blue sheet). */
html.skin-glass:not([data-theme="light"]) :is(#settingsPanel-profile,#settingsPanel-company,#settingsPanel-roles,#settingsInteg-sheets,#settingsInteg-api,#settingsInteg-export,#settingsInteg-make) > .card{
  background:transparent !important;border:0 !important;box-shadow:none !important;
  -webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
html.skin-glass:not([data-theme="light"]) #settingsPanel-profile .prof-hero{
  margin-bottom:14px;padding:22px 0;border-radius:24px;border:1px solid var(--glass-line);
  background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-shadow);
}

/* Mobile header: float below the status bar / notch, never wider than the screen */
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) body[data-role="admin"] #roleAdmin .top-header,
  html.skin-glass:not([data-theme="light"]) #roleWorker > .top-header{
    box-sizing:border-box;width:auto !important;max-width:calc(100vw - 16px);
    margin:calc(var(--safe-top) + 6px) 8px 0 8px !important;
    padding:8px 10px !important;min-height:56px;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="admin"] #roleAdmin .top-header .header-search{min-width:0;flex:1 1 auto;}
}
@media (max-width:900px) and (orientation:portrait){
  html.skin-glass:not([data-theme="light"]) body::before{
    background:linear-gradient(180deg,rgba(6,12,30,.05) 0%,rgba(6,12,30,.18) 55%,rgba(5,8,18,.5) 100%),url("/img/bg-crane-portrait.jpg") center bottom / cover no-repeat,#081430;
  }
  html.skin-glass:not([data-theme="light"]) #loginScreen{
    background:linear-gradient(180deg,rgba(6,12,30,.25) 0%,rgba(5,8,18,.55) 100%),url("/img/bg-crane-portrait.jpg") center bottom / cover no-repeat,#081430 !important;
  }
}

/* Native shells (iOS/Android WebView) paint the app containers with --bg; keep them see-through */
html.skin-glass:not([data-theme="light"]) :is(#appShell,#roleAdmin,#roleWorker,#adminMain,.main-area,.content-area,body){background:transparent !important;background-color:transparent !important;}
/* iPhone (Safari + native shell) forces --bg on these with !important — out-rank it */
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #appShell,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #roleAdmin,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #roleAdmin .main-area,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #roleAdmin .content-area,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #roleWorker,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #roleWorker .content-area,
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role]{background:transparent !important;}
html.skin-glass:not([data-theme="light"])[data-ios-ui] body[data-role] #appShell::before{display:none !important;}
/* Worker header on phones is position:fixed and iOS adds the notch inset as padding — float it instead */
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #roleWorker > .top-header{
    top:calc(var(--safe-top) + 6px) !important;left:8px !important;right:8px !important;
    margin:0 !important;width:auto !important;height:auto !important;min-height:56px !important;
    padding:8px 12px !important;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #roleWorker .content-area.builder-main{
    margin-top:calc(var(--safe-top) + 72px) !important;
  }
}

/* Hours KPI: liquid glass — dark but see-through so the crane scene shows through */
html.skin-glass:not([data-theme="light"]) :is(#admin-hours,#w-hours) .hours-kpi .hk-stat{
  --hk-base:rgba(8,14,32,.48);
  background:
    linear-gradient(160deg,rgba(255,255,255,.1) 0%,rgba(255,255,255,0) 42%),
    linear-gradient(165deg,color-mix(in srgb,var(--tone) 14%,rgba(8,14,32,.42)),rgba(6,12,28,.52) 78%) !important;
  border-color:color-mix(in srgb,var(--tone) 22%,var(--glass-line)) !important;
  -webkit-backdrop-filter:blur(22px) saturate(150%) !important;
  backdrop-filter:blur(22px) saturate(150%) !important;
  box-shadow:
    0 18px 36px -18px rgba(0,0,0,.55),
    0 8px 18px -12px color-mix(in srgb,var(--tone) 28%,transparent),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.04) !important;
}
html.skin-glass:not([data-theme="light"]) :is(#admin-hours,#w-hours) .hours-kpi .hk-stat .sc-icon{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14);
}
@media (max-width:720px){
  html.skin-glass:not([data-theme="light"]) :is(#admin-hours,#w-hours) .hours-kpi{
    background:rgba(8,14,32,.48) !important;
    border-color:var(--glass-line) !important;
    -webkit-backdrop-filter:blur(22px) saturate(150%) !important;
    backdrop-filter:blur(22px) saturate(150%) !important;
    box-shadow:var(--glass-shadow) !important;
  }
  html.skin-glass:not([data-theme="light"]) :is(#admin-hours,#w-hours) .hours-kpi .hk-stat{
    background:transparent !important;box-shadow:none !important;border:0 !important;
    -webkit-backdrop-filter:none !important;backdrop-filter:none !important;
  }
}

/* ---------- Date-period dropdown (filters) ----------
   Filter bars carry backdrop-filter, which makes them a stacking context (the popup could
   never rise above the next blocks) and a backdrop root (the popup's own blur only saw the
   bar). While the popup is open its container is lifted and loses the blur, so the frosted
   popup samples the real page underneath; the bar gets a denser tint to look the same. */
html.skin-glass:not([data-theme="light"]) .date-period-popup{
  background:
    linear-gradient(160deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,.02) 38%,rgba(255,255,255,0) 100%),
    rgba(14,24,52,.74) !important;
  -webkit-backdrop-filter:blur(26px) saturate(160%);backdrop-filter:blur(26px) saturate(160%);
  border:1px solid var(--glass-line-strong) !important;border-radius:20px;padding:12px;
  box-shadow:0 30px 70px -18px rgba(0,0,0,.75),0 0 0 1px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(255,255,255,.04);
}
html.skin-glass:not([data-theme="light"]) :has(> .date-period-popup.show),
html.skin-glass:not([data-theme="light"]) :is(.card,.hours-filter-bar,.km-filter-bar,.sites-filter-bar,.dzx-panel,.dza-panel,.mtx-panel,.mk-panel,.dash-panel):has(.date-period-popup.show){
  position:relative;z-index:120;
  -webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
html.skin-glass:not([data-theme="light"]) :is(.card,.hours-filter-bar,.km-filter-bar,.sites-filter-bar,.dzx-panel,.dza-panel,.mtx-panel,.mk-panel,.dash-panel):has(.date-period-popup.show){
  background:var(--glass-bg-strong) !important;
}
html.skin-glass:not([data-theme="light"]) .date-period-popup .dp-presets{
  background:rgba(0,0,0,.18);border-color:var(--glass-line);border-radius:14px;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.25);
}
html.skin-glass:not([data-theme="light"]) .date-period-popup .dp-preset{border-radius:10px;}
html.skin-glass:not([data-theme="light"]) .date-period-popup.date-period-fs .dp-presets{margin:10px 14px 4px !important;padding:3px;}
html.skin-glass:not([data-theme="light"]) .date-period-popup.date-period-fs .dp-fs-bar{background:transparent;border-bottom-color:var(--glass-line);}
html.skin-glass:not([data-theme="light"]) .date-period-popup .dp-preset.selected,
html.skin-glass:not([data-theme="light"]) .date-period-popup :is(.dp-month-cell,.dp-week-cell,.dp-day).is-on{
  background:linear-gradient(180deg,#4a86ff,#2f6bff);border-color:transparent;color:#fff;
  box-shadow:0 8px 20px -10px rgba(47,107,255,.95),inset 0 1px 0 rgba(255,255,255,.28);
}
html.skin-glass:not([data-theme="light"]) .date-period-popup :is(.dp-month-cell,.dp-week-cell,.dp-nav,.dp-today,.dp-back-btn){
  background:rgba(255,255,255,.05);border-color:var(--glass-line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);transition:background .15s,border-color .15s,color .15s;
}
html.skin-glass:not([data-theme="light"]) .date-period-popup .dp-month-cell.is-now:not(.is-on){border-color:rgba(110,168,255,.5);color:#9cc2ff;}
@media (hover:hover) and (pointer:fine){
  html.skin-glass:not([data-theme="light"]) .date-period-popup :is(.dp-month-cell,.dp-week-cell,.dp-nav,.dp-today,.dp-back-btn):hover:not(.is-on){
    background:rgba(110,168,255,.12);border-color:rgba(110,168,255,.45);color:#cfe0ff;
  }
  html.skin-glass:not([data-theme="light"]) .date-period-popup .dp-day:hover:not(.is-on){background:rgba(255,255,255,.07);}
}
@media (prefers-reduced-transparency: reduce){
  html.skin-glass:not([data-theme="light"]) .date-period-popup{background:#0f1a38 !important;}
}

/* ---------- Search fields with an icon ----------
   The wrapper is the visible field; the glass input tint above must not paint a second box inside it. */
html.skin-glass:not([data-theme="light"]) :is(.wsite-picker-search,.dzx-search,.dza-search,.mtx-search) input{
  background:transparent !important;border:0 !important;box-shadow:none !important;
}

/* ---------- Worker detail dashboard ---------- */
html.skin-glass:not([data-theme="light"]) #workerDetailModal :is(.wd-tabs,.wd-kpi,.wd-card,.wd-month-nav,.wd-contact-btn,.wd-export-btn.is-alt,.wd-modal-header .modal-close){
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.02)) !important;
  border-color:var(--glass-line) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
html.skin-glass:not([data-theme="light"]) #workerDetailModal .wd-empty{border-color:var(--glass-line);}
/* The detail window sat in the same navy as the blurred page behind it — lift it a step lighter,
   give it a brighter rim and a soft blue halo so its edge reads at a glance. */
html.skin-glass:not([data-theme="light"]) #workerDetailModal.modal-overlay{background:rgba(3,6,16,.62);}
html.skin-glass:not([data-theme="light"]) #workerDetailModal .worker-detail-modal{
  background:
    radial-gradient(120% 60% at 0% 0%,rgba(110,168,255,.16),transparent 60%),
    linear-gradient(180deg,rgba(34,50,96,.86),rgba(20,30,62,.88)) !important;
  border:1px solid rgba(140,180,255,.28) !important;
  box-shadow:0 40px 90px -20px rgba(0,0,0,.8),0 0 0 1px rgba(0,0,0,.35),0 0 60px -10px rgba(74,134,255,.35),
    inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html.skin-glass:not([data-theme="light"]) #workerDetailModal :is(.wd-modal-header,.modal-footer){border-color:rgba(140,180,255,.14);}

/* ---------- Site detail: same lifted window as worker detail ---------- */
html.skin-glass:not([data-theme="light"]) #siteDetailModal.modal-overlay{background:rgba(3,6,16,.62);}
html.skin-glass:not([data-theme="light"]) #siteDetailModal .sd-modal{
  background:
    radial-gradient(120% 60% at 0% 0%,rgba(110,168,255,.16),transparent 60%),
    linear-gradient(180deg,rgba(34,50,96,.86),rgba(20,30,62,.88)) !important;
  border:1px solid rgba(140,180,255,.28) !important;
  box-shadow:0 40px 90px -20px rgba(0,0,0,.8),0 0 0 1px rgba(0,0,0,.35),0 0 60px -10px rgba(74,134,255,.35),
    inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html.skin-glass:not([data-theme="light"]) #siteDetailModal .sd-head{border-color:rgba(140,180,255,.14);}
html.skin-glass:not([data-theme="light"]) #siteDetailModal :is(.sd-stat,.sd-sec,.sd-head .modal-close){
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.02)) !important;
  border-color:var(--glass-line) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
html.skin-glass:not([data-theme="light"]) #siteDetailModal .sd-actions .btn-secondary{background:rgba(255,255,255,.06);border-color:var(--glass-line);}
html.skin-glass:not([data-theme="light"]) :is(#workerDetailModal .wd-kpi,#siteDetailModal .sd-stat){
  border-color:color-mix(in srgb,var(--tone) 30%,var(--glass-line)) !important;
}

/* ==========================================================================
   All modals — one lifted window style (worker / site detail are the reference).
   Inside a modal --bg is re-tinted to translucent glass, so field tiles, toggle
   cards and detail rows that paint with var(--bg) read as glass instead of
   solid navy blocks.
   ========================================================================== */
html.skin-glass:not([data-theme="light"]) .modal-overlay{background:rgba(3,6,16,.62);}
html.skin-glass:not([data-theme="light"]) .modal-overlay > :is(.modal,.sd-modal):not(.tool-scan-sheet){
  --bg:rgba(255,255,255,.045);
  background:
    radial-gradient(120% 60% at 0% 0%,rgba(110,168,255,.16),transparent 60%),
    linear-gradient(180deg,rgba(34,50,96,.86),rgba(20,30,62,.88)) !important;
  border:1px solid rgba(140,180,255,.28) !important;
  box-shadow:0 40px 90px -20px rgba(0,0,0,.8),0 0 0 1px rgba(0,0,0,.35),0 0 60px -10px rgba(74,134,255,.35),
    inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal :is(.modal-header,.modal-footer){border-color:rgba(140,180,255,.14);}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal .modal-header .modal-close{
  margin:0 0 0 12px;width:40px;height:40px;padding:0;border-radius:12px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;font-size:22px;line-height:1;color:var(--text2);
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.02));
  border:1px solid var(--glass-line);box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal .modal-header .modal-close:hover{color:var(--text);border-color:var(--glass-line-strong);}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal .modal-head-ico{
  border:1px solid rgba(110,168,255,.3);box-shadow:0 10px 24px -12px rgba(74,134,255,.9),inset 0 1px 0 rgba(255,255,255,.1);
}
/* Detail tiles / rows */
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal :is(.hour-view-row,#hourViewNote,.td-detail-grid .trip-detail-row){
  background:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.02)) !important;
  border-color:var(--glass-line) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
html.skin-glass:not([data-theme="light"]) #toolDetailModal .trip-detail-rows.td-detail-grid{gap:8px;border:0;border-radius:0;background:transparent;overflow:visible;}
html.skin-glass:not([data-theme="light"]) #toolDetailModal .td-detail-grid .trip-detail-row{border:1px solid var(--glass-line);border-radius:12px;}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal .btn-secondary{
  background:linear-gradient(160deg,rgba(255,255,255,.08),rgba(255,255,255,.03));border-color:var(--glass-line-strong);
}
/* Pinned header / footer need an (almost) opaque version of the window tint so content scrolls under them cleanly. */
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal:not(.tool-scan-sheet) > .modal-header{
  background:
    radial-gradient(120% 220% at 0% 0%,rgba(110,168,255,.16),transparent 60%),
    linear-gradient(180deg,rgba(35,52,99,.97),rgba(31,46,90,.97));
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
html.skin-glass:not([data-theme="light"]) .modal-overlay > .modal:not(.tool-scan-sheet) > .modal-footer{
  background:linear-gradient(180deg,rgba(23,34,70,.97),rgba(21,31,64,.97));
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}

/* ---------- Settings → Roles ----------
   The roles page sits straight on the photo background, so its cards need the same dense
   tint + blur as the lifted modals — the plain 7% glass let the scene bleed through. */
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-hero,button.roles-card,.roles-ed-card,.roles-quick,.roles-ed-back,.roles-quick-btn){
  background:
    radial-gradient(120% 80% at 0% 0%,rgba(110,168,255,.12),transparent 60%),
    linear-gradient(180deg,rgba(30,45,88,.84),rgba(18,28,58,.88)) !important;
  -webkit-backdrop-filter:blur(22px) saturate(140%);backdrop-filter:blur(22px) saturate(140%);
  border:1px solid rgba(140,180,255,.24) !important;
  box-shadow:0 18px 40px -20px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.1);
}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-quick{border-style:solid !important;}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-quick-btn,.roles-ed-back){box-shadow:inset 0 1px 0 rgba(255,255,255,.08);}
html.skin-glass:not([data-theme="light"]) #admin-settings button.roles-card:hover{border-color:rgba(140,180,255,.5) !important;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-card-foot{border-top-color:rgba(140,180,255,.16);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-perm-chip){background:rgba(110,168,255,.18);border-color:rgba(110,168,255,.3);color:#b7d2ff;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-people{background:rgba(255,255,255,.1);}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-toolbar-count{color:var(--text);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-perm,.roles-member,.roles-tpl,.roles-preview,.roles-icon-opt,.roles-member-search){background:rgba(8,14,32,.35);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-perm.is-on,.roles-member.is-on,.roles-tpl.is-on){background:rgba(74,134,255,.16);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-hero-stats,.roles-hero-stat + .roles-hero-stat){border-color:rgba(140,180,255,.16);}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-hero-stats{background:rgba(8,14,32,.25);}

/* ==========================================================================
   All KPI widgets look like the Hours KPI tiles (reference: .hours-kpi .hk-stat
   above): tone-tinted see-through glass, tone rim + glow shadow, tone icon chip.
   ========================================================================== */
html.skin-glass:not([data-theme="light"]) :is(
  .kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,
  .mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip
){
  --tone:var(--color-primary,#7aa7ff);
  background:
    linear-gradient(160deg,rgba(255,255,255,.1) 0%,rgba(255,255,255,0) 42%),
    linear-gradient(165deg,color-mix(in srgb,var(--tone) 14%,rgba(8,14,32,.42)),rgba(6,12,28,.52) 78%) !important;
  border:1px solid color-mix(in srgb,var(--tone) 22%,var(--glass-line)) !important;
  -webkit-backdrop-filter:blur(22px) saturate(150%) !important;
  backdrop-filter:blur(22px) saturate(150%) !important;
  box-shadow:
    0 18px 36px -18px rgba(0,0,0,.55),
    0 8px 18px -12px color-mix(in srgb,var(--tone) 28%,transparent),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.04) !important;
  transition:transform .18s,box-shadow .18s,border-color .15s;
}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.green,.is-green,.is-ok,.is-done){--tone:var(--color-secondary,var(--green));}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.yellow,.is-yellow,.is-tasks){--tone:var(--yellow,#ffd600);}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.orange,.is-fuel){--tone:var(--orange,#ff9100);}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.purple,.is-notes,.tr-chip-km){--tone:#9c27b0;}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.red,.is-late){--tone:var(--red,#ff5252);}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.ws-kpi,.mat-kpi-card,.dzx-kpi,.dza-kpi,.mtx-kpi,.db-tile,.tr-chip):is(.neutral){--tone:#94a3b8;}
/* Icon chip like the Hours tiles */
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.mat-kpi-card,.db-tile,.ws-kpi,.tr-chip) :is(.sc-icon,.db-tile-ico,.ws-kpi-ico,.wc-ico){
  color:var(--tone) !important;
  background:color-mix(in srgb,var(--tone) 16%,transparent) !important;
  border:0 !important;border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14) !important;
}
html.skin-glass:not([data-theme="light"]) :is(.kk-stat,.tk-stat,.dk-stat,.sk-stat,.wk-stat,.an-stat,.mat-kpi-card,.db-tile,.ws-kpi,.tr-chip):is(.purple,.tr-chip-km) :is(.sc-icon,.db-tile-ico,.ws-kpi-ico,.wc-ico){color:#ce93d8 !important;background:rgba(156,39,176,.15) !important;}
/* Clickable tiles lift on hover like the Hours ones; the selected filter tile keeps a tone ring */
@media (hover:hover) and (pointer:fine){
  html.skin-glass:not([data-theme="light"]) :is(button.kk-stat,button.tk-stat,button.dk-stat,button.sk-stat,button.an-stat,button.db-tile,.dzx-kpi,.dza-kpi,.mtx-kpi):hover{
    transform:translateY(-2px);
    box-shadow:
      0 16px 34px -14px color-mix(in srgb,var(--tone) 62%,transparent),
      0 10px 22px -12px rgba(0,0,0,.48),
      inset 0 1px 0 rgba(255,255,255,.08) !important;
  }
}
/* Diary / archive filter tiles look exactly like the static Kilometers tiles — no hover glow or lift */
html.skin-glass:not([data-theme="light"]) button.kk-stat.kk-click:hover{
  transform:none;
  box-shadow:
    0 18px 36px -18px rgba(0,0,0,.55),
    0 8px 18px -12px color-mix(in srgb,var(--tone) 28%,transparent),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -1px 0 rgba(255,255,255,.04) !important;
}
html.skin-glass:not([data-theme="light"]) :is(.dzx-kpi,.dza-kpi,.mtx-kpi,.tk-stat,.dk-stat,.sk-stat).is-on{
  border-color:color-mix(in srgb,var(--tone) 70%,transparent) !important;
}

/* ---------- Roles: flat — one solid surface, thin lines, no gradients/glows/shadows ---------- */
html.skin-glass:not([data-theme="light"]) #admin-settings{--rl-surface:rgba(14,22,46,.9);--rl-line:rgba(255,255,255,.08);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.rl-list,.rl-stats span,.rl-tpl-btn){
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:none;
}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-ed-card,.roles-ed-back,.roles-hero,.roles-quick,.roles-quick-btn,button.roles-card){
  background:var(--rl-surface) !important;border:1px solid var(--rl-line) !important;box-shadow:none !important;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-perm,.roles-member,.roles-tpl,.roles-preview,.roles-icon-opt,.roles-member-search){background:transparent;border-color:var(--rl-line);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-perm.is-on,.roles-member.is-on,.roles-tpl.is-on){background:rgba(74,134,255,.1);border-color:rgba(74,134,255,.4);}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-ico,.roles-ed-perms .roles-perm-ico){box-shadow:none;border:0;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-ed-actions .btn{box-shadow:none !important;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-ed-actions .btn-primary{background:#2f6bff !important;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-perm.is-on .roles-switch{background:#2f6bff;}
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-color-opt.is-on{box-shadow:0 0 0 2px var(--rc);}
/* Collapsed sidebar: same liquid-glass tile as the expanded brand mark */
html.skin-glass:not([data-theme="light"]) .sidebar-brand .brand-collapsed-mark .brand-collapsed-icon{
  width:44px;height:44px;max-width:44px;padding:10px;box-sizing:border-box;border-radius:14px;
  background:
    radial-gradient(120% 70% at 30% 0%,rgba(255,255,255,.42),rgba(255,255,255,0) 60%),
    radial-gradient(90% 60% at 80% 110%,rgba(120,170,255,.45),rgba(120,170,255,0) 70%),
    linear-gradient(160deg,rgba(255,255,255,.20),rgba(255,255,255,.05));
  -webkit-backdrop-filter:blur(14px) saturate(180%);backdrop-filter:blur(14px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    inset 0 -1px 0 rgba(255,255,255,.12),
    inset 1px 0 0 rgba(255,255,255,.18),
    inset -1px 0 0 rgba(255,255,255,.10),
    0 0 0 1px rgba(255,255,255,.14),
    0 10px 24px -10px rgba(10,20,60,.75),
    0 0 18px -6px rgba(110,160,255,.55);
}

/* ---------- Worker top bar: exactly the admin sidebar brand tile before "Smart Stavba" ---------- */
html.skin-glass:not([data-theme="light"]) .header-brand:not(.has-logo) .brand-wordmark{display:inline-flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em;}
html.skin-glass:not([data-theme="light"]) .header-brand:not(.has-logo) .brand-wordmark::before{
  content:"";flex:0 0 42px;width:42px;height:42px;border-radius:14px;
  background-image:
    url("/brand-icon-white.svg"),
    radial-gradient(120% 70% at 30% 0%,rgba(255,255,255,.42),rgba(255,255,255,0) 60%),
    radial-gradient(90% 60% at 80% 110%,rgba(120,170,255,.45),rgba(120,170,255,0) 70%),
    linear-gradient(160deg,rgba(255,255,255,.20),rgba(255,255,255,.05));
  background-size:24px 24px,cover,cover,cover;background-position:center 54%,center,center,center;background-repeat:no-repeat;
  -webkit-backdrop-filter:blur(14px) saturate(180%);backdrop-filter:blur(14px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    inset 0 -1px 0 rgba(255,255,255,.12),
    inset 1px 0 0 rgba(255,255,255,.18),
    inset -1px 0 0 rgba(255,255,255,.10),
    0 0 0 1px rgba(255,255,255,.14),
    0 10px 24px -10px rgba(10,20,60,.75),
    0 0 18px -6px rgba(110,160,255,.55);
}

/* ---------- Worker bottom nav on phones: floating "Liquid Glass" capsule (iOS 26 style) ---------- */
@media (max-width:900px){
  body[data-role="worker"]{
    --lg-nav-h:66px;
    --lg-nav-bottom:max(12px, calc(env(safe-area-inset-bottom, 0px) - 10px));
    /* content and the scan bar clear the floating capsule */
    --worker-nav-total-height:calc(var(--lg-nav-h) + var(--lg-nav-bottom) + 6px);
  }
  body[data-role="worker"] #workerNav#workerNav{
    left:12px!important;right:12px!important;bottom:var(--lg-nav-bottom)!important;
    height:var(--lg-nav-h)!important;min-height:var(--lg-nav-h)!important;max-height:var(--lg-nav-h);
    padding:6px!important;gap:2px;border-radius:999px;
    border:0!important;
    /* light, see-through glass: mostly blur, only a thin tint */
    background:
      linear-gradient(180deg,rgba(255,255,255,.12) 0%,rgba(255,255,255,.04) 40%,rgba(255,255,255,.01) 100%),
      rgba(18,26,52,.42)!important;
    -webkit-backdrop-filter:blur(18px) saturate(200%) brightness(.96) contrast(1.05);
    backdrop-filter:blur(18px) saturate(200%) brightness(.96) contrast(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.22),
      inset 0 -1px 0 rgba(255,255,255,.07),
      inset 1px 0 0 rgba(255,255,255,.09),
      inset -1px 0 0 rgba(255,255,255,.07),
      inset 0 0 0 1px rgba(255,255,255,.06),
      inset 0 -12px 22px -14px rgba(140,180,255,.35),
      0 18px 40px -16px rgba(0,0,0,.7),
      0 3px 10px rgba(0,0,0,.22)!important;
    overflow:hidden!important;align-items:stretch!important;
  }
  /* specular highlight: soft light falling on the top-left of the glass */
  body[data-role="worker"] #workerNav#workerNav::before{
    content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;
    background:
      radial-gradient(60% 120% at 18% -30%,rgba(255,255,255,.16),rgba(255,255,255,0) 60%),
      radial-gradient(40% 90% at 92% 130%,rgba(120,170,255,.22),rgba(120,170,255,0) 70%);
  }
  body[data-role="worker"] #workerNav#workerNav a{
    position:relative;z-index:1;
    flex:1 1 0;min-width:0;height:auto!important;max-height:none!important;
    flex-direction:column!important;justify-content:center!important;gap:3px!important;
    border-radius:999px;padding:0 2px!important;
    color:rgba(255,255,255,.92)!important;font-size:10.5px;font-weight:650;letter-spacing:-.01em;
    text-shadow:0 1px 2px rgba(0,0,0,.35);
    background:transparent;transition:background .25s ease,color .25s ease,transform .15s ease,box-shadow .25s ease;
  }
  body[data-role="worker"] #workerNav#workerNav a i{font-size:21px!important;color:inherit!important;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));}
  body[data-role="worker"] #workerNav#workerNav a span:not(.nav-badge){color:inherit!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
  body[data-role="worker"] #workerNav#workerNav a::before,
  body[data-role="worker"] #workerNav#workerNav a::after{display:none!important;}
  body[data-role="worker"] #workerNav#workerNav a:active{transform:scale(.94);}
  /* active tab: a glass lens inside the glass */
  body[data-role="worker"] #workerNav#workerNav a.active{
    color:#6cb0ff!important;text-shadow:none;
    background:
      linear-gradient(180deg,rgba(255,255,255,.26) 0%,rgba(255,255,255,.10) 55%,rgba(255,255,255,.14) 100%)!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.3),
      inset 0 -1px 0 rgba(255,255,255,.08),
      inset 0 0 0 1px rgba(255,255,255,.08),
      0 4px 14px -6px rgba(0,0,0,.45);
  }
  body[data-role="worker"] #workerNav#workerNav a.active i{filter:drop-shadow(0 0 8px rgba(90,160,255,.55));}
  /* 6+ tabs: icons only, the active tab widens and keeps its label */
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a{flex:1 1 0;transition:flex .25s ease,background .22s ease,color .22s ease;}
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a span:not(.nav-badge){display:none;}
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a i{font-size:21px!important;}
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a.active{flex:2.4 1 0;}
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a.active span:not(.nav-badge){display:block;}
  body[data-role="worker"] #workerNav#workerNav[data-tabs-many="1"] a.active i{font-size:19px!important;}
  /* Content runs under the glass: the shell stops reserving the bar, the scroller pads its own end instead. */
  body[data-role="worker"] #roleWorker#roleWorker{padding-bottom:0!important;}
  body[data-role="worker"].worker-w-tools-active #roleWorker#roleWorker{padding-bottom:var(--tools-scan-bar-h, 0px)!important;}
  body[data-role="worker"] #roleWorker#roleWorker .content-area.builder-main{
    padding-bottom:calc(var(--worker-nav-total-height) + 18px)!important;
    scroll-padding-bottom:calc(var(--worker-nav-total-height) + 8px)!important;
  }
  body[data-role="worker"].worker-w-profile-active #roleWorker#roleWorker .content-area.builder-main{
    padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 24px)!important;
  }
  /* light theme: frosted white capsule */
  [data-theme="light"] body[data-role="worker"] #workerNav#workerNav{
    border-color:rgba(15,23,42,.08)!important;border-top-color:rgba(255,255,255,.9)!important;
    background:linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,.38)),rgba(245,247,250,.3)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 14px 30px -14px rgba(15,23,42,.35),0 2px 8px rgba(15,23,42,.08)!important;
  }
  [data-theme="light"] body[data-role="worker"] #workerNav#workerNav a{color:#2b3442!important;text-shadow:none;}
  [data-theme="light"] body[data-role="worker"] #workerNav#workerNav a i{filter:none;}
  [data-theme="light"] body[data-role="worker"] #workerNav#workerNav a.active{
    color:#1a6dff!important;background:rgba(15,23,42,.07)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
  }
}

/* ---------- Worker top bar on phones: floating Liquid Glass, content scrolls underneath ---------- */
@media (max-width:900px){
  body[data-role="worker"] #roleWorker#roleWorker .content-area.builder-main{
    margin-top:0!important;
    padding-top:var(--ss-worker-hdr, 86px)!important;
    scroll-padding-top:var(--ss-worker-hdr, 86px);
  }
  body[data-role="worker"] #roleWorker#roleWorker .top-header{
    border:0!important;
    background:
      linear-gradient(180deg,rgba(255,255,255,.12) 0%,rgba(255,255,255,.04) 45%,rgba(255,255,255,.01) 100%),
      rgba(18,26,52,.42)!important;
    -webkit-backdrop-filter:blur(18px) saturate(200%) brightness(.96) contrast(1.05)!important;
    backdrop-filter:blur(18px) saturate(200%) brightness(.96) contrast(1.05)!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.2),
      inset 0 -1px 0 rgba(255,255,255,.06),
      inset 1px 0 0 rgba(255,255,255,.08),
      inset -1px 0 0 rgba(255,255,255,.06),
      inset 0 0 0 1px rgba(255,255,255,.06),
      0 14px 32px -14px rgba(0,0,0,.6),
      0 2px 8px rgba(0,0,0,.2)!important;
  }
  [data-theme="light"] body[data-role="worker"] #roleWorker#roleWorker .top-header{
    background:linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,.38)),rgba(245,247,250,.3)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9),inset 0 0 0 1px rgba(15,23,42,.06),0 12px 28px -14px rgba(15,23,42,.3)!important;
  }
}

/* Worker notifications: denser cards so they stand out from the photo background */
html.skin-glass:not([data-theme="light"]) #w-notifications .worker-notify-card,
html.skin-glass:not([data-theme="light"]) #w-notifications .notify-filter-bar{
  background:rgba(13,21,46,.7)!important;
  border-color:rgba(130,160,230,.18)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.28)!important;
}

/* Worker diary: darker task cards and entries panel */
html.skin-glass:not([data-theme="light"]) #w-diary .site-task-card,
html.skin-glass:not([data-theme="light"]) #w-diary .worker-diary-list-panel{
  background:rgba(13,21,46,.7)!important;
  border-color:rgba(130,160,230,.18)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.28)!important;
}

/* Worker tools tab: denser surfaces so tiles, tabs and panels stand out from the photo background */
html.skin-glass:not([data-theme="light"]) #w-tools .tools-kpi .tk-stat,
html.skin-glass:not([data-theme="light"]) #w-tools .tools-admin-tabs,
html.skin-glass:not([data-theme="light"]) #w-tools .dash-panel,
html.skin-glass:not([data-theme="light"]) #w-tools .tools-mobile-list{
  background:rgba(13,21,46,.7)!important;
  border-color:rgba(130,160,230,.18);
  box-shadow:0 10px 28px rgba(0,0,0,.28)!important;
}
html.skin-glass:not([data-theme="light"]) #w-tools .tools-empty{
  background:rgba(8,14,32,.55)!important;border-color:rgba(130,160,230,.16)!important;
}

/* Worker tools (phone): only "with me" + "free", merged into one card like the hours KPI */
@media (max-width:900px){
  body[data-role="worker"] #w-tools#w-tools .tools-kpi{
    display:flex!important;align-items:stretch;gap:0!important;padding:0;overflow:hidden;box-sizing:border-box;
    border:1px solid rgba(130,160,230,.18);border-radius:16px;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-tools#w-tools .tools-kpi{
    background:rgba(13,21,46,.7);box-shadow:0 10px 28px rgba(0,0,0,.28);
  }
  body[data-role="worker"] #w-tools#w-tools .tools-kpi .tk-stat{
    flex:1 1 50%;min-width:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  }
  body[data-role="worker"] #w-tools#w-tools .tools-kpi .tk-stat.orange{border-right:1px solid rgba(130,160,230,.18)!important;}
  body[data-role="worker"] #w-tools#w-tools .tools-kpi .tk-stat.blue{display:none!important;}
}

/* Worker trips (phone): KPI card styled like the hours card */
@media (max-width:900px){
  body[data-role="worker"] #w-trips#w-trips .trips-kpi{
    display:flex!important;align-items:stretch;gap:0!important;padding:0;overflow:hidden;box-sizing:border-box;
    border-radius:16px!important;
  }
  body[data-role="worker"] #w-trips#w-trips .trips-kpi .tk-stat{
    flex:1 1 50%;min-width:0;gap:10px;padding:12px;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
  body[data-role="worker"] #w-trips#w-trips .trips-kpi .tk-stat .sc-icon{width:38px;height:38px;font-size:15px;}
  body[data-role="worker"] #w-trips#w-trips .trips-kpi .tk-value{font-size:20px;}
  body[data-role="worker"] #w-trips#w-trips .trips-kpi .tk-label{font-size:11px;}
}

/* Worker hours + trips + tools KPI card (phone): clear Liquid Glass */
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-hours#w-hours .hours-kpi,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-trips#w-trips .trips-kpi,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-tools#w-tools .tools-kpi{
    position:relative;border:0!important;border-radius:20px!important;
    /* clear glass: barely tinted and lightly blurred, so the background shows through */
    background:rgba(8,14,32,.16)!important;
    -webkit-backdrop-filter:blur(3px)!important;
    backdrop-filter:blur(3px)!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.2),
      inset 0 -1px 0 rgba(255,255,255,.07),
      inset 1px 0 0 rgba(255,255,255,.09),
      inset -1px 0 0 rgba(255,255,255,.09),
      0 0 0 1px rgba(10,16,34,.4),
      0 14px 30px -12px rgba(0,0,0,.4)!important;
  }
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-hours#w-hours .hours-kpi::before,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-trips#w-trips .trips-kpi::before,
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-tools#w-tools .tools-kpi::before{
    content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;
    background:
      radial-gradient(60% 120% at 18% -30%,rgba(255,255,255,.07),rgba(255,255,255,0) 60%);
  }
  body[data-role="worker"] #w-hours#w-hours .hours-kpi > *,
  body[data-role="worker"] #w-trips#w-trips .trips-kpi > *,
  body[data-role="worker"] #w-tools#w-tools .tools-kpi > *:not([style*="display:none"]){position:relative;z-index:1;}
  body[data-role="worker"] #w-hours#w-hours .hours-kpi .hk-stat.blue{border-right:0!important;}
  body[data-role="worker"] #w-hours#w-hours .hours-kpi :is(.hk-value,.hk-label),
  body[data-role="worker"] #w-trips#w-trips .trips-kpi :is(.tk-value,.tk-label),
  body[data-role="worker"] #w-tools#w-tools .tools-kpi :is(.tk-value,.tk-label){text-shadow:0 1px 3px rgba(0,0,0,.45);}
}

@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) body[data-role="worker"] #w-tools#w-tools .tools-kpi .tk-stat.orange{border-right:0!important;}
}

/* Worker tools: QR/NFC buttons float over the page (no opaque band behind them) */
html.skin-glass body[data-role="worker"] #workerToolsScanBar{
  background:none!important;
}
html.skin-glass body[data-role="worker"] #workerToolsScanBar .tools-scan-fab{
  box-shadow:0 10px 26px -6px rgba(0,0,0,.55),0 4px 18px rgba(80,140,255,.35)!important;
}
/* ...and step aside while any dialog / sheet is open */
body:has(.modal-overlay.show) #workerToolsScanBar,
body:has(.wsite-picker-overlay.show) #workerToolsScanBar,
body:has(.td-sheet-overlay) #workerToolsScanBar,
body.wd-composing #workerToolsScanBar{display:none!important;}

/* Worker nav (phone): one sliding glass lens instead of per-tab active backgrounds */
@media (max-width:900px){
  body[data-role="worker"] #workerNav#workerNav .lg-lens{
    position:absolute;top:6px;bottom:6px;left:0;z-index:0;pointer-events:none;border-radius:999px;
    transform-origin:center;will-change:transform,width;
    background:linear-gradient(180deg,rgba(255,255,255,.26) 0%,rgba(255,255,255,.10) 55%,rgba(255,255,255,.14) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.3),
      inset 0 -1px 0 rgba(255,255,255,.08),
      inset 0 0 0 1px rgba(255,255,255,.08),
      0 4px 14px -6px rgba(0,0,0,.45);
    transition:opacity .2s ease;
  }
  body[data-role="worker"] #workerNav#workerNav.has-lens a.active{background:transparent!important;box-shadow:none!important;}
  body[data-role="worker"] #workerNav#workerNav a{transition:color .3s ease,transform .15s ease,flex .45s cubic-bezier(.3,.7,.25,1)!important;}
  body[data-role="worker"] #workerNav#workerNav a i{transform-origin:center;}
  body[data-role="worker"] #workerNav.lg-nav-measure a{transition:none!important;}
  [data-theme="light"] body[data-role="worker"] #workerNav#workerNav .lg-lens{
    background:rgba(15,23,42,.07);box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
  }
}
@media (min-width:901px){
  #workerNav .lg-lens{display:none!important;}
}

/* Worker nav unread badge: only when there is something unread, always white digits */
@media (max-width:900px){
  body[data-role="worker"] #workerNav#workerNav .nav-badge{display:none!important;z-index:2;color:#fff!important;text-shadow:none;}
  body[data-role="worker"] #workerNav#workerNav .nav-badge.show{display:flex!important;top:2px;right:auto;left:calc(50% + 6px);}
}

/* Sheets & pickers (time wheel, calendar, address/site pickers): same frosted look as the period
   popup, but denser — several of them live inside blurred cards where their own blur can't see the page. */
html.skin-glass:not([data-theme="light"]) :is(.ios-sheet,.ss-date-cal-popup,.wsite-picker){
  background:
    linear-gradient(160deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,.02) 38%,rgba(255,255,255,0) 100%),
    rgb(16,26,54) !important;
  -webkit-backdrop-filter:blur(26px) saturate(160%);backdrop-filter:blur(26px) saturate(160%);
  border:1px solid var(--glass-line-strong) !important;
  box-shadow:0 30px 70px -18px rgba(0,0,0,.75),0 0 0 1px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.14),inset 0 -1px 0 rgba(255,255,255,.04) !important;
}
html.skin-glass:not([data-theme="light"]) :is(.ios-sheet-overlay,.ss-date-cal-overlay.show,.wsite-picker-overlay){
  background:rgba(0,0,0,.55) !important;
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
html.skin-glass:not([data-theme="light"]) .ios-sheet :is(.ios-sheet-header,.ios-time-sheet-header){background:rgba(255,255,255,.04) !important;}

/* Worker account menu: same look as the language menu (rounded rows, no tiles / separators) */
body[data-role="worker"] #workerAccountMenu{border-radius:16px;padding:6px;}
body[data-role="worker"] #workerAccountMenu .ad-header{border-radius:12px;padding:10px 10px 12px;margin-bottom:4px;}
body[data-role="worker"] #workerAccountMenu .ad-menu{padding:0;display:flex;flex-direction:column;gap:2px;}
body[data-role="worker"] #workerAccountMenu .ad-menu>.ad-item::before{display:none!important;}
body[data-role="worker"] #workerAccountMenu .ad-item{padding:11px 12px;border-radius:10px;font-size:14px;gap:12px;}
body[data-role="worker"] #workerAccountMenu .ad-item:hover,
body[data-role="worker"] #workerAccountMenu .ad-item:active{background:color-mix(in srgb, var(--primary) 10%, transparent);}
body[data-role="worker"] #workerAccountMenu .ad-ico{
  width:20px!important;height:20px!important;background:transparent!important;border:0!important;box-shadow:none!important;
  display:inline-flex;align-items:center;justify-content:center;font-size:15px;color:var(--text2);
}
body[data-role="worker"] #workerAccountMenu .ad-item.logout{color:#ff8a80;}
body[data-role="worker"] #workerAccountMenu .ad-item.logout .ad-ico{color:#ff8a80!important;}
body[data-role="worker"] #workerAccountMenu .ad-chev{opacity:.45;font-size:11px;}
/* header popovers (language + account): opaque so nothing behind them shows through */
html.skin-glass:not([data-theme="light"]) :is(.lang-dropdown,.account-dropdown){
  background:
    linear-gradient(160deg,rgba(255,255,255,.08) 0%,rgba(255,255,255,.02) 38%,rgba(255,255,255,0) 100%),
    rgb(16,26,54) !important;
  box-shadow:0 24px 60px -16px rgba(0,0,0,.75),0 0 0 1px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.12) !important;
}

/* Worker profile page: no bottom bar (it has its own "Back") — clipped, since JS pins the bar's visibility inline */
@media (max-width:900px){
  body[data-role="worker"].worker-w-profile-active #workerNav#workerNav{clip-path:inset(50%)!important;pointer-events:none!important;}
  body[data-role="worker"].worker-w-profile-active #workerNav#workerNav *{visibility:hidden!important;pointer-events:none!important;}
}

/* Worker profile: Liquid Glass avatar, role chip, stat tiles and cards (like the bottom bar) */
html.skin-glass:not([data-theme="light"]) #w-profile .prof-avatar:not(.has-photo){
  background:
    radial-gradient(120% 70% at 30% 0%,rgba(255,255,255,.30),rgba(255,255,255,0) 60%),
    radial-gradient(90% 60% at 80% 110%,rgba(120,170,255,.35),rgba(120,170,255,0) 70%),
    linear-gradient(160deg,rgba(255,255,255,.14),rgba(255,255,255,.03)),
    rgba(18,26,52,.35) !important;
  -webkit-backdrop-filter:blur(18px) saturate(180%);backdrop-filter:blur(18px) saturate(180%);
  border:0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(255,255,255,.10),
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 0 0 1px rgba(10,16,34,.5),
    0 18px 40px -14px rgba(0,0,0,.6) !important;
  color:#fff;
}
html.skin-glass:not([data-theme="light"]) #w-profile .prof-avatar:not(.has-photo) i{filter:drop-shadow(0 2px 6px rgba(0,0,0,.35));}
html.skin-glass:not([data-theme="light"]) #w-profile .prof-badge{
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05)) !important;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border:0 !important;color:#dfe8ff !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 0 0 0 1px rgba(255,255,255,.1),0 0 0 1px rgba(10,16,34,.4) !important;
}
/* the profile page wrapper is a plain container — no blur/tint over the whole background */
html.skin-glass:not([data-theme="light"]) #w-profile > .card{
  background:transparent !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
  border-color:transparent !important;box-shadow:none !important;
}

/* Admin notifications (phone): the list wrapper is just a container — cards float on the page */
@media (max-width:900px){
  html.skin-glass #admin-notifications#admin-notifications .admin-notify-table-card{
    background:transparent !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
    border:0 !important;box-shadow:none !important;
  }
}

/* Admin workers (phone): segmented filter on its own row, full-width search under it, no outer frame */
@media (max-width:900px){
  html.skin-glass #admin-workers#admin-workers .workers-filter-bar{
    background:transparent !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;
    border:0 !important;box-shadow:none !important;padding:0 !important;margin:0 0 12px !important;
  }
  #admin-workers#admin-workers .workers-filter-controls{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:8px;width:100%;}
  #admin-workers#admin-workers .workers-filter-seg{display:flex;width:100%;box-sizing:border-box;}
  #admin-workers#admin-workers .workers-filter-seg-btn{flex:1 1 0;text-align:center;padding:10px 6px;font-size:13px;}
  #admin-workers#admin-workers .workers-filter-search{flex:none;width:100%;min-height:44px;border-radius:12px;}
  #admin-workers#admin-workers .workers-filter-search input{font-size:15px;}
}
@media (max-width:900px){
  html.skin-glass #admin-workers#admin-workers .workers-filter-bar{display:grid !important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"seg seg" "search clear";gap:8px;}
  #admin-workers#admin-workers .workers-filter-controls{display:contents;}
  #admin-workers#admin-workers .workers-filter-seg{grid-area:seg;}
  #admin-workers#admin-workers .workers-filter-search{grid-area:search;}
  #admin-workers#admin-workers .workers-filter-clear{grid-area:clear;width:44px;height:44px;margin:0;}
}

/* Admin notifications (phone): filter fields sit in their own inner frame, like segmented controls */
@media (max-width:900px){
  #admin-notifications .admin-notify-filter-bar > .notify-filter-controls{
    padding:6px;border-radius:14px;box-sizing:border-box;
    background:rgba(255,255,255,.04);border:1px solid var(--glass-line,var(--border));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  }
  [data-theme="light"] #admin-notifications .admin-notify-filter-bar > .notify-filter-controls{background:#F2F4F6;border-color:#E6E8EB;}
}

/* Admin (phone): tools / kilometers / sites pair-KPIs look exactly like the hours card */
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) :is(#admin-tools .tools-kpi-pair,#admin-kilometers .km-kpi,#admin-sites .sites-kpi){
    display:flex !important;align-items:stretch;gap:0 !important;padding:0 !important;overflow:hidden;
    background:rgba(8,14,32,.48) !important;border:1px solid rgba(255,255,255,.12) !important;border-radius:16px !important;
    -webkit-backdrop-filter:blur(22px) saturate(150%);backdrop-filter:blur(22px) saturate(150%);
    box-shadow:0 18px 40px -18px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.06) !important;
  }
  html.skin-glass:not([data-theme="light"]) :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat){
    flex:1 1 50%;min-width:0;flex-direction:row !important;align-items:center;gap:10px;padding:12px !important;margin:0 !important;
    background:transparent !important;border:0 !important;border-radius:0 !important;box-shadow:none !important;
    -webkit-backdrop-filter:none !important;backdrop-filter:none !important;
  }
  html.skin-glass:not([data-theme="light"]) :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat)::before,
  html.skin-glass:not([data-theme="light"]) :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat)::after{display:none !important;}
  :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat) .sc-icon{
    width:38px !important;height:38px !important;border-radius:12px !important;font-size:15px !important;margin:0 !important;flex-shrink:0;
  }
  :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat) :is(.tk-value,.kk-value,.sk-value){font-size:20px !important;font-weight:700;line-height:1.1;}
  :is(#admin-tools .tools-kpi-pair .tk-stat,#admin-kilometers .km-kpi .kk-stat,#admin-sites .sites-kpi .sk-stat) :is(.tk-label,.kk-label,.sk-label){font-size:11px !important;line-height:1.3;}
}
@media (max-width:900px){
  html.skin-glass:not([data-theme="light"]) #admin-kilometers#admin-kilometers .km-kpi .kk-stat,
  html.skin-glass:not([data-theme="light"]) #admin-kilometers#admin-kilometers .km-kpi .kk-stat + .kk-stat,
  html.skin-glass:not([data-theme="light"]) #admin-sites#admin-sites .sites-kpi .sk-stat,
  html.skin-glass:not([data-theme="light"]) #admin-sites#admin-sites .sites-kpi .sk-stat + .sk-stat{
    background:transparent !important;border:0 !important;border-left:0 !important;border-right:0 !important;box-shadow:none !important;
  }
}

/* Admin header (phone): the language pill sits inside .header-meta's pill — keep one frame only */
@media (max-width:900px){
  html.skin-glass #roleAdmin .header-meta .lang-btn{background:transparent !important;border:0 !important;box-shadow:none !important;}
}

/* Header search: the pill (.header-search) is the only frame — the input inside stays bare */
html.skin-glass .header-search#globalSearchWrap #globalSearch,
html.skin-glass .header-search #globalSearch{
  background:transparent !important;border:0 !important;box-shadow:none !important;border-radius:999px !important;outline:none;
}

/* Roles cards: denser so they stand out from the photo background */
html.skin-glass:not([data-theme="light"]) #admin-settings .rc-card{
  background:rgba(13,21,46,.72) !important;border-color:rgba(130,160,230,.18) !important;
  box-shadow:0 10px 28px rgba(0,0,0,.3);
}

/* Roles editor: Liquid Glass panels and tiles (like the bottom bar) */
html.skin-glass:not([data-theme="light"]) #admin-settings .roles-ed-card{
  background:
    linear-gradient(180deg,rgba(255,255,255,.10) 0%,rgba(255,255,255,.03) 40%,rgba(255,255,255,0) 100%),
    rgba(18,26,52,.42) !important;
  -webkit-backdrop-filter:blur(18px) saturate(180%);backdrop-filter:blur(18px) saturate(180%);
  border:0 !important;border-radius:20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 -1px 0 rgba(255,255,255,.06),
    inset 1px 0 0 rgba(255,255,255,.08),
    inset -1px 0 0 rgba(255,255,255,.08),
    0 0 0 1px rgba(10,16,34,.5),
    0 14px 30px -12px rgba(0,0,0,.5) !important;
}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-tpl,.roles-ed-perms .roles-perm,.roles-preview,.roles-icon-opt,.roles-member,.rc-base-note,.roles-member-search){
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.02)) !important;
  border-color:rgba(255,255,255,.08) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
html.skin-glass:not([data-theme="light"]) #admin-settings :is(.roles-tpl.is-on,.roles-ed-perms .roles-perm.is-on,.roles-icon-opt.is-on,.roles-member.is-on){
  background:linear-gradient(180deg,rgba(110,168,255,.22),rgba(110,168,255,.08)) !important;
  border-color:rgba(110,168,255,.45) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 6px 16px -10px rgba(74,134,255,.6);
}
html.skin-glass:not([data-theme="light"]) #admin-settings #rolesEditorName,
html.skin-glass:not([data-theme="light"]) #admin-settings #rolesEditorDesc{
  background:rgba(8,14,32,.35) !important;border-color:rgba(255,255,255,.1) !important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.25);
}

/* Tabs open instantly: any animation on a tab ancestor (opacity OR transform) makes Safari
   render the glass panels see-through until it ends. No entrance animation for tab bodies. */
.tab-content,
#admin-settings .settings-panel.active,
#admin-settings .settings-integ-pane.active,
#admin-material .mat-body,
.pw-admin-body{animation:none!important;}
