/* Admin pages — A_Users / A_Broadcasts / A_Permissions design (desktop) */
html:root.mr-desktop-ui :is(#tab-departments,#tab-broadcasts,#tab-settings){--t-sf:#fff;--t-fg:#0A0A0A;--t-mu:#5F5F5F;--t-ln:#E4E4E4;--t-ln2:#D9D9D9;--t-ct:#8A8A8A;--t-hv:#F7F7F7;--t-pb:#0A0A0A;--t-pf:#fff;--t-okb:#DDF3E8;--t-okf:#1D6B43;--t-hib:#FDE3E0;--t-hif:#A3261E}
html[data-theme="dark"]:root.mr-desktop-ui :is(#tab-departments,#tab-broadcasts,#tab-settings){--t-sf:#151515;--t-fg:#F2F2F2;--t-mu:#A3A3A3;--t-ln:#262626;--t-ln2:#303030;--t-ct:#6E6E6E;--t-hv:#1C1C1C;--t-pb:#F2F2F2;--t-pf:#0A0A0A;--t-okb:#12301F;--t-okf:#7FD6A5;--t-hib:#401A18;--t-hif:#FF9C90}
html:root.mr-desktop-ui :is(#tab-departments,#tab-broadcasts,#tab-settings) .atu-head{margin-bottom:24px}
/* ---------- users ---------- */
html:root.mr-desktop-ui #tab-departments .wf-panel{background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important}
html:root.mr-desktop-ui #tab-departments .users-panel-banner{display:none !important}
html:root.mr-desktop-ui #tab-departments #usersDeskHost{background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:24px !important;display:flex;flex-direction:column;gap:18px;box-shadow:none !important}
.atu-card-hd h2{margin:0;font-size:16px;font-weight:600;color:var(--t-fg)}.atu-card-hd p{margin:0;font-size:12px;color:var(--t-mu)}
html:root.mr-desktop-ui #tab-departments .users-meta-row,html:root.mr-desktop-ui #tab-departments .user-role-dd,html:root.mr-desktop-ui #tab-departments .users-io-btn:not(.rp-tool-btn-primary){display:none !important}
html:root.mr-desktop-ui #tab-departments .users-controls,html:root.mr-desktop-ui #tab-departments .users-filters-row,html:root.mr-desktop-ui #tab-departments .users-filters-toolbar{display:flex !important;flex-direction:row-reverse;flex-wrap:nowrap;gap:12px;align-items:stretch;width:100%;margin:0 !important;padding:0 !important;background:transparent !important;border:0 !important}
html:root.mr-desktop-ui #tab-departments .users-filters-toolbar .wf-search{flex:1 1 auto}
html:root.mr-desktop-ui #tab-departments .users-filters-toolbar>div:last-child,html:root.mr-desktop-ui #tab-departments .users-io-group{display:flex;gap:0}
html:root.mr-desktop-ui #tab-departments #user-search{height:46px;border:1px solid var(--t-ct) !important;border-radius:4px !important;background:var(--t-sf) !important;color:var(--t-fg) !important;box-shadow:none !important}
html:root.mr-desktop-ui #tab-departments .rp-tool-btn-primary{height:46px;padding:0 22px;border:0 !important;border-radius:4px !important;background:var(--t-pb) !important;color:var(--t-pf) !important;font-weight:600;box-shadow:none !important}
html:root.mr-desktop-ui #tab-departments .rp-tool-btn-primary i{display:none}
html:root.mr-desktop-ui #tab-departments .mr-users-list-wrap,html:root.mr-desktop-ui #tab-departments #usersList{background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important}
.atu-scroll{overflow-x:auto}.atu-table{width:100%;min-width:600px;border-collapse:collapse;font-size:14px;color:var(--t-fg)}
.atu-table th{text-align:start;font-weight:500;font-size:12px;color:var(--t-mu);padding:10px 8px;border-bottom:1px solid var(--t-fg)}
.atu-table td{padding:12px 8px;border-top:1px solid var(--t-ln);text-align:start;vertical-align:middle}.atu-table tbody tr:first-child td{border-top:0}
.atu-tr:hover{background:var(--t-hv)}.atu-no{color:var(--t-fg) !important;font-size:14px !important}
.atu-st{padding:2px 10px;border-radius:4px;font-size:13px;font-weight:600}.atu-st.is-on{background:var(--t-okb);color:var(--t-okf)}.atu-st.is-off{background:var(--t-hib);color:var(--t-hif)}
.atu-edit{height:38px;padding:0 16px;border:1px solid var(--t-fg);border-radius:4px;background:transparent;color:var(--t-fg);font:600 13px inherit;font-family:inherit;cursor:pointer}
.atu-off{height:38px;padding:0 10px;margin-inline-start:6px;border:0;background:transparent;color:var(--t-mu);font:13px inherit;font-family:inherit;cursor:pointer;text-decoration:underline}
/* ---------- broadcasts ---------- */
html:root.mr-desktop-ui #tab-broadcasts .bc-page{display:flex !important;flex-wrap:wrap;gap:20px;align-items:flex-start;background:transparent !important;border:0 !important;padding:0 !important}
html:root.mr-desktop-ui #tab-broadcasts .atu-head{flex:0 0 100%;margin:0}
html:root.mr-desktop-ui #tab-broadcasts .bc-page-head{display:none !important}
html:root.mr-desktop-ui #tab-broadcasts .bc-page-form,html:root.mr-desktop-ui #tab-broadcasts .bc-history{box-sizing:border-box;background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:24px !important;box-shadow:none !important;min-width:0}
html:root.mr-desktop-ui #tab-broadcasts .bc-page-form{flex:7 1 460px;order:1}
html:root.mr-desktop-ui #tab-broadcasts .bc-page-form::before{content:'نشرة جديدة';display:block;font-size:16px;font-weight:600;margin-bottom:14px;color:var(--t-fg)}
html:root.mr-desktop-ui #tab-broadcasts .bc-history{flex:5 1 340px;order:2}
html:root.mr-desktop-ui #tab-broadcasts .bc-history-stats{display:none !important}
html:root.mr-desktop-ui #tab-broadcasts .bc-history-title{font-size:16px;font-weight:600;color:var(--t-fg)}
html:root.mr-desktop-ui #tab-broadcasts :is(input,select,textarea,.mk-dt-control,.wf-status-trigger){border:1px solid var(--t-ct) !important;border-radius:4px !important;background:var(--t-sf) !important;color:var(--t-fg) !important;box-shadow:none !important}
html:root.mr-desktop-ui #tab-broadcasts :is(.mk-field__lbl,label){font-weight:400 !important;color:var(--t-fg)}
html:root.mr-desktop-ui #tab-broadcasts .mk-req,html:root.mr-desktop-ui #tab-broadcasts .required-mark{display:none}
html:root.mr-desktop-ui #tab-broadcasts .bc-form-actions .btn-primary,html:root.mr-desktop-ui #tab-broadcasts .bc-form-actions button{height:46px;border-radius:4px !important;background:var(--t-pb) !important;color:var(--t-pf) !important;border:0 !important;box-shadow:none !important;font-weight:600}
/* ---------- permissions ---------- */
html:root.mr-desktop-ui #tab-settings .wf-panel{background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:24px !important;box-shadow:none !important;position:relative}
html:root.mr-desktop-ui #tab-settings .wf-panel-intro{display:none !important}
html:root.mr-desktop-ui #tab-settings .mr-settings-toolbar .mr-settings-seg{display:none !important}
html:root.mr-desktop-ui #tab-settings .mr-settings-note{font-size:12px;color:var(--t-mu)}
html:root.mr-desktop-ui #tab-settings .mr-perm-toggle__track{width:20px !important;height:20px !important;border-radius:3px !important;border:1px solid var(--t-ct) !important;background:var(--t-sf) !important;position:relative;box-shadow:none !important}
html:root.mr-desktop-ui #tab-settings .mr-perm-toggle__track::after{display:none !important}
html:root.mr-desktop-ui #tab-settings .mr-perm-toggle input:checked+.mr-perm-toggle__track,html:root.mr-desktop-ui #tab-settings .mr-perm-toggle.is-on .mr-perm-toggle__track{background:var(--t-pb) !important;border-color:var(--t-pb) !important}
html:root.mr-desktop-ui #tab-settings .mr-perm-toggle input:checked+.mr-perm-toggle__track::before{content:'';position:absolute;inset-inline-start:6px;top:2px;width:5px;height:10px;border:solid var(--t-pf);border-width:0 2px 2px 0;transform:rotate(45deg);background:transparent !important}
html:root.mr-desktop-ui #tab-settings .mr-settings-actions .btn-primary{height:46px;border-radius:4px !important;background:var(--t-pb) !important;color:var(--t-pf) !important;border:0 !important;box-shadow:none !important;font-weight:600}

html:root.mr-desktop-ui.mr-desktop-ui #tab-departments #usersDeskHost{background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:24px !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .figma-search-wrap{border:0 !important;background:transparent !important;box-shadow:none !important;flex:1 1 auto}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments #user-search{border:1px solid var(--t-ct) !important;border-radius:4px !important;background:var(--t-sf) !important;box-shadow:none !important;width:100%}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .users-io-menu,html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .users-meta-actions,html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .users-filters-toolbar .rp-tool-btn:not(.rp-tool-btn-primary){display:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page{flex-wrap:wrap !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-settings>*:not(.wf-panel):not(.atu-head){display:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-settings .wf-panel-banner,html:root.mr-desktop-ui.mr-desktop-ui #tab-settings .mr-settings-actions,html:root.mr-desktop-ui.mr-desktop-ui #tab-settings .mr-users-list-wrap{background:transparent !important;border:0 !important;box-shadow:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .wf-search,html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .users-filters-toolbar{border:0 !important;background:transparent !important;padding:0 !important;box-shadow:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-settings :is(thead,th,.mr-perm-head,.mr-settings-grp,.mr-perm-group,[class*='group']){background:transparent !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page{width:100%;overflow:visible !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page-form{overflow:visible !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .atu-head{flex:0 0 100% !important;width:100% !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page-form{flex:7 1 460px !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-history{flex:5 1 340px !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page{flex-direction:row !important;align-items:flex-start !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .atu-head{height:auto !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .atu-head{margin:0 !important;align-self:flex-start !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-form-grid :is(.wf-status-filter,.bc-dd,select){width:100% !important;max-width:100% !important;min-width:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-form-grid>*{min-width:0}
html:root.mr-desktop-ui.mr-desktop-ui #tab-broadcasts .bc-page{align-content:flex-start !important}
/* ---------- locations + violation types ---------- */
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations){--t-sf:#fff;--t-fg:#0A0A0A;--t-mu:#5F5F5F;--t-ln:#E4E4E4;--t-ln2:#D9D9D9;--t-ct:#8A8A8A;--t-hv:#F7F7F7;--t-pb:#0A0A0A;--t-pf:#fff;--t-lowb:#E4EEFC;--t-lowf:#1B4F9E;--t-medb:#FDF0CF;--t-medf:#7A4F00;--t-hib:#FDE3E0;--t-hif:#A3261E;--t-exb:#DDF3E8;--t-exf:#1D6B43;--t-gdb:#E4EEFC;--t-gdf:#1B4F9E;--t-mdb:#FDF0CF;--t-mdf:#7A4F00;--t-bdb:#FDE3E0;--t-bdf:#A3261E}
html[data-theme="dark"]:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations){--t-sf:#151515;--t-fg:#F2F2F2;--t-mu:#A3A3A3;--t-ln:#262626;--t-ln2:#303030;--t-ct:#6E6E6E;--t-hv:#1C1C1C;--t-pb:#F2F2F2;--t-pf:#0A0A0A;--t-lowb:#14233F;--t-lowf:#9CC0FF;--t-medb:#3A2F12;--t-medf:#F0C25B;--t-hib:#401A18;--t-hif:#FF9C90;--t-exb:#12301F;--t-exf:#7FD6A5;--t-gdb:#14233F;--t-gdf:#9CC0FF;--t-mdb:#3A2F12;--t-mdf:#F0C25B;--t-bdb:#401A18;--t-bdf:#FF9C90}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .atu-head{margin-bottom:24px}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .wf-panel{background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:24px !important;box-shadow:none !important;display:flex;flex-direction:column;gap:18px}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .wf-panel-intro,html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .wf-count{display:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rb-toolbar .rp-tool-btn:not(.rp-tool-btn-primary),html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rb-drill-summary{display:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rp-tool-btn-primary,html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .rp-tool-btn-primary{height:46px;padding:0 22px;border:0 !important;border-radius:4px !important;background:var(--t-pb) !important;color:var(--t-pf) !important;font-weight:600;box-shadow:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rp-tool-btn-primary i,html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .rp-tool-btn-primary i{display:none}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rb-toolbar{display:flex !important;flex-direction:row-reverse;gap:12px;align-items:stretch;background:transparent !important;border:0 !important;padding:0 !important;margin:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rb-search-combo,html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .wf-search{flex:1 1 auto;background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations #br-search{height:46px;border:1px solid var(--t-ct) !important;border-radius:4px !important;background:var(--t-sf) !important;color:var(--t-fg) !important;box-shadow:none !important;width:100%}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) :is(.wf-panel-banner,#regionsDeskHost,#violDeskHost,.mr-users-list-wrap,#regionsList,#violGrid,.viol-types-meta-row){background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important;margin:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .viol-types-meta-row{display:flex;justify-content:flex-end}
.atu-empty{text-align:center !important;color:var(--t-mu);padding:28px !important}
.atd-sev--md{background:var(--t-medb);color:var(--t-medf)}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .rb-toolbar button:not(#br-panel-action-btn):not(.figma-search-btn){display:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations :is(.cmp-neo-search-combo__field,.figma-search-wrap){border:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui :is(#violGrid,#regionsList,#usersList){display:block !important;width:100% !important;max-width:none !important;grid-template-columns:none !important}
html:root.mr-desktop-ui.mr-desktop-ui :is(#violGrid,#regionsList,#usersList) .atu-scroll{width:100%}
html:root.mr-desktop-ui.mr-desktop-ui .atu-table{width:100% !important;min-width:0}
.atu-no{direction:ltr;text-align:start}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .wf-panel{align-items:stretch !important}
html:root.mr-desktop-ui.mr-desktop-ui :is(#tab-locations,#tab-violations) .wf-panel>*,html:root.mr-desktop-ui.mr-desktop-ui :is(#regionsDeskHost,#violDeskHost,.mr-users-list-wrap){width:100% !important;max-width:none !important;align-self:stretch !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .atu-table{min-width:0 !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .rd-viol-list{display:block !important;grid-template-columns:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-violations .rd-viol-list>.atu-scroll{width:100% !important}
html:root.mr-desktop-ui.mr-desktop-ui.mr-desktop-ui #tab-violations #violGrid.rd-viol-list.rd-viol-list--desk.viol-grid{display:block !important;grid-template-columns:none !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations :is(#br-search,.figma-search,.wf-search) input{border:0 !important;box-shadow:none !important;background:transparent !important}

/* locations drill-down header (region → branches → employees) */
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-drill{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 0 18px;flex-direction:row-reverse}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-drill__t{text-align:start}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-drill__t h2{margin:2px 0 4px;font-size:22px;font-weight:600;color:var(--t-fg);font-family:'Readex Pro','IBM Plex Sans Arabic',sans-serif}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-drill__t p{margin:0}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-back{height:38px;padding:0 14px;border:1px solid var(--t-ct);border-radius:4px;background:transparent;color:var(--t-fg);font:inherit;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-back:hover{background:var(--t-hv)}

/* locations lists (regions / branches): aligned columns, icon + name, pills, clear actions */
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .wf-panel>.wf-panel-title,html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .wf-panel h2.wf-title{display:none}
html:root.mr-desktop-ui.mr-desktop-ui .atl-table{table-layout:fixed}
html:root.mr-desktop-ui.mr-desktop-ui .atl-table th{padding:12px 12px}
html:root.mr-desktop-ui.mr-desktop-ui .atl-table td{padding:16px 12px}
.atl-tr{cursor:pointer}
.atl-name{display:inline-flex;align-items:center;gap:12px;font-weight:600;font-size:15px;color:var(--t-fg)}
.atl-ico{width:36px;height:36px;border:1px solid var(--t-ln2);border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;color:var(--t-fg);background:var(--t-hv);flex:none}
.atl-sup{display:inline-flex;align-items:center;gap:8px;color:var(--t-fg);font-size:14px}.atl-sup i{color:var(--t-ct);font-size:13px}
.atl-pill{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border:1px solid var(--t-ln2);border-radius:4px;font-size:13px;color:var(--t-mu);white-space:nowrap}.atl-pill b{color:var(--t-fg);font-size:14px}
.atl-acts{text-align:end !important;white-space:nowrap}
.atl-btn{height:36px;padding:0 14px;margin-inline-start:8px;border:1px solid var(--t-ct);border-radius:4px;background:transparent;color:var(--t-fg);font:600 13px inherit;font-family:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.atl-btn i{font-size:12px}.atl-btn:hover{background:var(--t-fg);color:var(--t-pf);border-color:var(--t-fg)}
.atl-btn--del{color:var(--t-hif);border-color:var(--t-hib)}.atl-btn--del:hover{background:var(--t-hif);color:#fff;border-color:var(--t-hif)}
.atl-go{color:var(--t-ct);text-align:center;font-size:12px}.atl-tr:hover .atl-go{color:var(--t-fg)}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations #rbPanelIntro,html:root.mr-desktop-ui.mr-desktop-ui #tab-locations #rbPanelTitle,html:root.mr-desktop-ui.mr-desktop-ui #tab-locations #rbPanelSub{display:none !important}
.atl-btn--del{color:var(--t-fg) !important;border-color:var(--t-ct) !important}.atl-btn--del:hover{background:var(--t-fg) !important;color:var(--t-pf) !important;border-color:var(--t-fg) !important}
html:root.mr-desktop-ui.mr-desktop-ui #tab-locations .atu-card-hd{display:none !important}
.atl-ico--av{border-radius:50%;font-weight:700;font-size:14px}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .atu-st{border-radius:4px}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments :is(.wf-panel-intro,.wf-panel-banner>.wf-panel-intro){display:none !important}

html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .figma-search-wrap.wf-search{border:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important;height:auto}html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .figma-search-wrap.wf-search #user-search{height:46px !important;min-height:46px;padding:0 40px 0 14px !important;width:100% !important;font-size:14px}
html:root.mr-desktop-ui.mr-desktop-ui #tab-departments .figma-search-wrap.wf-search{position:relative;min-width:340px}

/* ===== Violation types — mobile + iPad: same table design as desktop ===== */
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations{--t-sf:#fff;--t-fg:#0A0A0A;--t-mu:#5F5F5F;--t-ln:#E4E4E4;--t-ln2:#D9D9D9;--t-ct:#8A8A8A;--t-hv:#F7F7F7;--t-pb:#0A0A0A;--t-pf:#fff;--t-lowb:#E4EEFC;--t-lowf:#1B4F9E;--t-medb:#FDF0CF;--t-medf:#7A4F00;--t-hib:#FDE3E0;--t-hif:#A3261E}
html[data-theme="dark"]:root.mr-mobile-ui.mr-mobile-ui #tab-violations{--t-sf:#151515;--t-fg:#F2F2F2;--t-mu:#A3A3A3;--t-ln:#262626;--t-ln2:#303030;--t-ct:#6E6E6E;--t-hv:#1C1C1C;--t-pb:#F2F2F2;--t-pf:#0A0A0A;--t-lowb:#14233F;--t-lowf:#9CC0FF;--t-medb:#3A2F12;--t-medf:#F0C25B;--t-hib:#401A18;--t-hif:#FF9C90}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations #violGrid{display:block !important;background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:8px 12px !important;box-shadow:none !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations .atu-table{min-width:0 !important;width:100%}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations .atu-table :is(th,td){padding:12px 6px;font-size:13px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations .atu-table :is(th,td):nth-child(4){display:none}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations .atu-edit{height:34px;padding:0 12px;font-size:12px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations .atu-table td:first-child{font-weight:500;color:var(--t-fg)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-violations #violGrid{height:auto !important;min-height:0 !important;flex:0 0 auto !important;align-self:flex-start;width:100% !important}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-violations :is(.rd-viol-desk-add,.rp-tool-btn-primary,button[onclick*="openViolModal"]){background:var(--t-pb) !important;color:var(--t-pf) !important;border:1px solid var(--t-pb) !important;border-radius:6px !important;box-shadow:none !important;height:46px;width:100%}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-violations :is(.rd-viol-desk-add,.rp-tool-btn-primary,button[onclick*="openViolModal"]) *{color:var(--t-pf) !important}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-violations :is(#violGrid.rd-viol-list,#violGrid,.mr-users-list-wrap,#violDeskHost){flex:0 0 auto !important;flex-grow:0 !important;height:auto !important;min-height:0 !important}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-violations .mr-users-list-wrap{background:transparent !important;border:0 !important;padding:0 !important}

/* ===== Regions & branches — mobile + iPad: same table design as desktop ===== */
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations{--t-sf:#fff;--t-fg:#0A0A0A;--t-mu:#5F5F5F;--t-ln:#E4E4E4;--t-ln2:#D9D9D9;--t-ct:#8A8A8A;--t-hv:#F7F7F7;--t-pb:#0A0A0A;--t-pf:#fff;--t-hib:#FDE3E0;--t-hif:#A3261E;--t-exb:#DDF3E8;--t-exf:#1D6B43;--t-gdb:#E4EEFC;--t-gdf:#1B4F9E;--t-mdb:#FDF0CF;--t-mdf:#7A4F00;--t-bdb:#FDE3E0;--t-bdf:#A3261E}
html[data-theme="dark"]:root.mr-mobile-ui.mr-mobile-ui #tab-locations{--t-sf:#151515;--t-fg:#F2F2F2;--t-mu:#A3A3A3;--t-ln:#262626;--t-ln2:#303030;--t-ct:#6E6E6E;--t-hv:#1C1C1C;--t-pb:#F2F2F2;--t-pf:#0A0A0A;--t-hib:#401A18;--t-hif:#FF9C90;--t-exb:#12301F;--t-exf:#7FD6A5;--t-gdb:#14233F;--t-gdf:#9CC0FF;--t-mdb:#3A2F12;--t-mdf:#F0C25B;--t-bdb:#401A18;--t-bdf:#FF9C90}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-locations #regionsDeskHost{display:block !important;flex:0 0 auto !important;height:auto !important;min-height:0 !important;background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:8px 12px !important;box-shadow:none !important;margin-top:12px !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table{min-width:0 !important;width:100%;color:var(--t-fg)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table col{width:auto !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table :is(th,td){padding:12px 5px;font-size:13px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table th{color:var(--t-mu);border-bottom:1px solid var(--t-fg)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table td{border-top:1px solid var(--t-ln)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table :is(th,td):nth-child(2){display:none}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-name{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--t-fg);white-space:normal}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-ico{flex:0 0 auto;width:30px;height:30px;font-size:13px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-pill{white-space:nowrap;font-size:12px;padding:2px 7px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-acts{white-space:nowrap}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-btn{width:34px;height:34px;padding:0;font-size:0;gap:0;justify-content:center;display:inline-flex;align-items:center}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-btn i{font-size:13px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-drill{display:flex;flex-direction:column;gap:8px;margin:0 0 10px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-drill__t h2{font-size:18px;margin:2px 0}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations :is(.atu-scroll,.atu-table,.atu-table thead,.atu-table tbody,.atu-table tr,.atu-table th,.atu-table td){background:transparent !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-tr:active{background:var(--t-hv) !important}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-locations :is(.mr-users-list-wrap,#regionsList){background:transparent !important;border:0 !important;padding:0 !important;box-shadow:none !important;height:auto !important;min-height:0 !important;flex:0 0 auto !important;overflow:visible !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-back{align-self:flex-start;height:36px;padding:0 14px;border:1px solid var(--t-fg) !important;border-radius:4px !important;background:transparent !important;color:var(--t-fg) !important;font:600 13px inherit;font-family:inherit;cursor:pointer}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-drill{margin:4px 0 12px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-name{white-space:nowrap}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-name>span:last-child{white-space:nowrap}
@media (max-width:520px){
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-ico{display:none}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-go{display:none}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-btn{width:30px;height:30px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-acts{display:table-cell}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atu-table :is(th,td){padding:12px 3px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-locations .atl-pill{padding:2px 5px;font-size:11px}
}

/* ===== Users — mobile + iPad: same table design as desktop ===== */
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments{--t-sf:#fff;--t-fg:#0A0A0A;--t-mu:#5F5F5F;--t-ln:#E4E4E4;--t-ln2:#D9D9D9;--t-ct:#8A8A8A;--t-hv:#F7F7F7;--t-pb:#0A0A0A;--t-pf:#fff;--t-okb:#DDF3E8;--t-okf:#1D6B43;--t-hib:#FDE3E0;--t-hif:#A3261E}
html[data-theme="dark"]:root.mr-mobile-ui.mr-mobile-ui #tab-departments{--t-sf:#151515;--t-fg:#F2F2F2;--t-mu:#A3A3A3;--t-ln:#262626;--t-ln2:#303030;--t-ct:#6E6E6E;--t-hv:#1C1C1C;--t-pb:#F2F2F2;--t-pf:#0A0A0A;--t-okb:#12301F;--t-okf:#7FD6A5;--t-hib:#401A18;--t-hif:#FF9C90}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-departments .mr-users-list-wrap{display:block !important;flex:0 0 auto !important;height:auto !important;min-height:0 !important;max-height:none !important;background:var(--t-sf) !important;border:1px solid var(--t-ln2) !important;border-radius:6px !important;padding:8px 12px !important;box-shadow:none !important;margin-top:12px !important;overflow:visible !important}
html:root.mr-mobile-ui.mr-mobile-ui #appWrap#appWrap #tab-departments #usersList{background:transparent !important;border:0 !important;padding:0 !important;height:auto !important;min-height:0 !important;max-height:none !important;flex:0 0 auto !important;overflow:visible !important;display:block !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-scroll{overflow-x:auto}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table{min-width:0 !important;width:100%;color:var(--t-fg)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table col{width:auto !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table :is(th,td){padding:12px 4px;font-size:13px;background:transparent !important}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table th{color:var(--t-mu);border-bottom:1px solid var(--t-fg)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table td{border-top:1px solid var(--t-ln)}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table tbody tr:first-child td{border-top:0}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-name{display:flex;align-items:center;gap:8px;font-weight:600;white-space:nowrap}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-ico{flex:0 0 auto;width:30px;height:30px;font-size:13px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-pill{white-space:nowrap;font-size:11px;padding:2px 6px}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-acts{white-space:nowrap}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-btn{width:32px;height:32px;padding:0;font-size:0;gap:0;display:inline-flex;align-items:center;justify-content:center}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-btn i{font-size:13px}
@media (max-width:520px){
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atl-ico{display:none}
html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table :is(th,td):nth-child(2),html:root.mr-mobile-ui.mr-mobile-ui #tab-departments .atu-table :is(th,td):nth-child(4){display:none}
}

/* ───────── Ticket detail modal — B&W redesign (desktop + mobile) ───────── */
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .modal-card{border:1px solid #0a0a0a!important;border-radius:10px!important;background:#fff!important;color:#0a0a0a!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rdTdHd{display:flex!important;flex-direction:column!important;gap:10px!important;padding:2px 0 14px!important;margin:0 0 12px!important;border-bottom:2px solid #0a0a0a!important;position:relative!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__id{font:600 11px/1 'Courier New',monospace!important;letter-spacing:.14em!important;color:#555!important;direction:ltr!important;text-transform:uppercase!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__print{display:inline-flex!important;align-items:center!important;gap:7px!important;height:34px!important;padding:0 14px!important;border:1px solid #0a0a0a!important;border-radius:4px!important;background:#0a0a0a!important;color:#fff!important;font:700 12px inherit!important;font-family:inherit!important;transform:none!important;box-shadow:none!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__print:hover{background:#2a2a2a!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__main{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__name{font-size:22px!important;font-weight:800!important;line-height:1.25!important;color:#0a0a0a!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__type{display:block!important;font-size:13px!important;font-weight:500!important;color:#555!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__side{display:flex!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__badge,html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rd-td-badge{display:inline-flex!important;align-items:center!important;gap:7px!important;padding:4px 12px!important;border:1px solid #0a0a0a!important;border-radius:4px!important;background:#fff!important;color:#0a0a0a!important;font:700 12px/1.3 inherit!important;font-family:inherit!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rd-td-badge::before{content:""!important;width:7px!important;height:7px!important;border-radius:50%!important;background:#0a0a0a!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tabs{display:flex!important;gap:0!important;padding:0!important;border:1px solid #0a0a0a!important;border-radius:6px!important;background:#fff!important;overflow:hidden!important;margin:0 0 14px!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab{flex:1!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:38px!important;padding:0 8px!important;border:0!important;border-radius:0!important;border-inline-start:1px solid #d4d4d4!important;background:#fff!important;color:#0a0a0a!important;font:600 12.5px inherit!important;font-family:inherit!important;text-decoration:none!important;box-shadow:none!important;position:relative!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab:first-child{border-inline-start:0!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab *{color:inherit!important;text-decoration:none!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab.active{background:#0a0a0a!important;color:#fff!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab.td-tab--needs-action:not(.active){color:#0a0a0a!important;background:#fff!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab.td-tab--needs-action:not(.active)::after{content:""!important;position:absolute!important;top:8px!important;inset-inline-end:10px!important;width:7px!important;height:7px!important;border-radius:50%!important;background:#0a0a0a!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-info-rows{border:1px solid #d4d4d4!important;border-radius:8px!important;background:#fff!important;padding:2px 14px!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-row{display:flex!important;justify-content:space-between!important;align-items:baseline!important;gap:14px!important;padding:11px 0!important;border-bottom:1px solid #ececec!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-row:last-child{border-bottom:0!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-label{flex:none!important;font-size:12px!important;font-weight:600!important;color:#666!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-value{font-size:13.5px!important;font-weight:700!important;color:#0a0a0a!important;text-align:end!important;min-width:0!important;overflow-wrap:anywhere!important}
html:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-value.no-reply{color:#8a8a8a!important;font-weight:500!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .modal-card{background:#141414!important;color:#f2f2f2!important;border-color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rdTdHd{border-bottom-color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__name,html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-value{color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__id,html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__type,html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-label{color:#aaa!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__print{background:#f2f2f2!important;color:#0a0a0a!important;border-color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .rd-td-hd__badge,html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rd-td-badge{background:#141414!important;color:#f2f2f2!important;border-color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal #rd-td-badge::before{background:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tabs{background:#141414!important;border-color:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab{background:#141414!important;color:#f2f2f2!important;border-inline-start-color:#3a3a3a!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab.active{background:#f2f2f2!important;color:#0a0a0a!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-tab.td-tab--needs-action:not(.active)::after{background:#f2f2f2!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .td-info-rows{background:#141414!important;border-color:#3a3a3a!important}
html[data-theme="dark"]:root:root:root:is(.mr-desktop-ui,.mr-mobile-ui) #ticketModal .info-row{border-bottom-color:#2a2a2a!important}
