/* Maintenance overrides: centralised final UI fixes, no step/runtime names. */

/* Hard-hide helper: prevents empty dev badge leftovers. */
[hidden]{display:none!important;}

/* Sidebar session status: old compact dot/text style, not button pills. */
.sidebar-profile-footer{display:grid!important;gap:6px!important;align-content:end!important;}
.sidebar-session-row{display:flex!important;gap:10px!important;align-items:center!important;flex-wrap:wrap!important;min-height:18px!important;}
.sidebar-status-text{
  position:relative!important;display:inline-flex!important;align-items:center!important;gap:6px!important;
  padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
  color:#dcecff!important;font-size:.82rem!important;line-height:1.18!important;font-weight:850!important;
  letter-spacing:0!important;text-transform:none!important;white-space:nowrap!important;
}
.sidebar-status-text::before{content:"";display:inline-block;width:9px;height:9px;border-radius:999px;background:currentColor;box-shadow:0 0 12px currentColor;}
.sidebar-status-text.status-connected{color:#7affcc!important;}
.sidebar-status-text.status-ready{color:#ffd36f!important;}
.sidebar-status-text.status-normal{color:#84c9ff!important;}
.sidebar-status-text.status-disconnected{color:#aab5c7!important;}
.sidebar-status-text.status-expired{color:#ff7b9a!important;}
.sidebar-status-text.sidebar-dev-badge{color:#ffd36f!important;}
.sidebar-status-text.sidebar-dev-badge[hidden],.sidebar-status-text.sidebar-dev-badge:empty{display:none!important;}
.sidebar-status-text.sidebar-dev-badge[hidden]::before,.sidebar-status-text.sidebar-dev-badge:empty::before{content:none!important;display:none!important;}

/* Consistent system-card colour: subtle border + curved left accent, never full neon frame. */
.dashboard-status-card,
.server-detail-card,
.monitoring-item,
.control-target-card,
.inventory-component-card{
  position:relative!important;overflow:hidden!important;
  border-color:color-mix(in srgb,var(--system-color,#35a7ff) 30%,rgba(109,178,255,.20))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.016),0 12px 28px rgba(0,0,0,.16)!important;
}
.dashboard-status-card::before,
.server-detail-card::before,
.monitoring-item::before,
.control-target-card::before,
.inventory-component-card::before{
  content:""!important;position:absolute!important;top:12px!important;bottom:12px!important;left:0!important;width:3px!important;
  border-radius:0 999px 999px 0!important;background:var(--system-color,#35a7ff)!important;
  box-shadow:0 0 10px color-mix(in srgb,var(--system-color,#35a7ff) 70%,transparent)!important;pointer-events:none!important;
}
.monitoring-item.open,
.control-target-card{border-color:color-mix(in srgb,var(--system-color,#35a7ff) 34%,rgba(109,178,255,.22))!important;}
.card-headline,.monitoring-summary{border-color:rgba(109,178,255,.14)!important;}

/* Permission matrix icons: centre reliably with text glyphs. */
.permission-legend{display:flex!important;gap:12px!important;flex-wrap:wrap!important;align-items:center!important;margin:10px 0 14px!important;}
.permission-legend>span{display:inline-flex!important;align-items:center!important;gap:7px!important;white-space:nowrap!important;}
.perm-state-mark,.perm-dot{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;border-radius:8px!important;
  font-size:0!important;line-height:1!important;text-align:center!important;vertical-align:middle!important;
}
.perm-state-mark::before,.perm-dot::before{
  mask:none!important;-webkit-mask:none!important;background:transparent!important;width:auto!important;height:auto!important;
  display:block!important;color:currentColor!important;font-size:17px!important;line-height:1!important;font-weight:950!important;transform:translateY(-.5px)!important;
}
.perm-state-mark[data-mark="allow"]::before,.perm-dot[data-mark="allow"]::before{content:"✓"!important;}
.perm-state-mark[data-mark="deny"]::before,.perm-dot[data-mark="deny"]::before{content:"×"!important;font-size:18px!important;}
.perm-state-standard .perm-state-mark,.perm-dot-default{color:#ffd066!important;border:1px solid rgba(255,205,92,.70)!important;background:rgba(255,190,80,.14)!important;}
.perm-state-allow .perm-state-mark,.perm-dot-allow{color:#7affcc!important;border:1px solid rgba(122,255,204,.70)!important;background:rgba(122,255,204,.16)!important;}
.perm-state-deny .perm-state-mark,.perm-dot-deny{color:#ff8aa5!important;border:1px solid rgba(255,123,154,.70)!important;background:rgba(255,123,154,.16)!important;}
.perm-right-card{grid-template-columns:28px minmax(0,1fr) 26px!important;align-items:center!important;}
.perm-help{align-self:center!important;}

/* Group/admin checkboxes: custom centred glyphs, never native white boxes. */
.group-check-row,.profile-group-check{display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;gap:8px!important;align-items:start!important;position:relative!important;}
.group-check-row input[type="checkbox"],.profile-group-check input[type="checkbox"],.z-check{
  appearance:none!important;-webkit-appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;margin:0!important;
  border-radius:6px!important;border:1px solid rgba(121,189,255,.55)!important;background:rgba(8,17,31,.72)!important;
  font-size:0!important;line-height:1!important;cursor:pointer!important;box-sizing:border-box!important;
}
.group-check-row input[type="checkbox"]::before,.profile-group-check input[type="checkbox"]::before,.z-check::before{
  content:"✓"!important;color:#dfffee!important;background:transparent!important;mask:none!important;-webkit-mask:none!important;
  width:auto!important;height:auto!important;font-size:16px!important;line-height:1!important;font-weight:950!important;transform:scale(0) translateY(-.5px)!important;transition:transform .1s ease!important;
}
.group-check-row input[type="checkbox"]:checked,.profile-group-check input[type="checkbox"]:checked,.z-check:checked{border-color:rgba(122,255,204,.76)!important;background:rgba(72,230,192,.25)!important;box-shadow:0 0 16px rgba(72,230,192,.14)!important;}
.group-check-row input[type="checkbox"]:checked::before,.profile-group-check input[type="checkbox"]:checked::before,.z-check:checked::before{transform:scale(1) translateY(-.5px)!important;}

/* Admin/VPN groups: compact, readable, no clipped descriptions. */
.profile-admin-list{display:grid!important;gap:10px!important;}
.profile-admin-card{padding:11px 12px!important;border-radius:16px!important;gap:9px!important;}
.profile-admin-main{align-items:center!important;gap:10px!important;}
.profile-admin-controls{grid-template-columns:minmax(130px,170px) minmax(130px,170px) minmax(180px,1fr) auto!important;gap:8px!important;align-items:end!important;}
.profile-groups-panel>summary,.group-admin-card details>summary{min-height:32px!important;padding:4px 0!important;display:flex!important;align-items:center!important;gap:8px!important;cursor:pointer!important;}
.group-admin-columns{display:grid!important;grid-template-columns:repeat(2,minmax(240px,1fr))!important;gap:12px!important;align-items:start!important;}
.group-check-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(170px,1fr))!important;gap:8px!important;}
.group-check-row{min-height:58px!important;padding:8px!important;border-radius:12px!important;overflow:hidden!important;}
.group-check-row strong{font-size:.86rem!important;line-height:1.05!important;display:block!important;}
.group-check-row small{font-size:.72rem!important;line-height:1.08!important;display:block!important;max-height:2.3em!important;overflow:hidden!important;text-overflow:ellipsis!important;}
@media(max-width:900px){.profile-admin-controls,.group-admin-columns{grid-template-columns:1fr!important}.group-check-grid{grid-template-columns:1fr!important}}

/* Server URL rows: left aligned, compact, and still collapsible via details. */
.server-address-row{grid-template-columns:minmax(110px,170px) minmax(0,1fr) max-content!important;text-align:left!important;align-items:center!important;}
.server-address-row code,.server-link-button{text-align:left!important;justify-self:stretch!important;justify-content:flex-start!important;}
.server-address-row .ghost-btn,.server-address-row button:not(.server-link-button){justify-self:end!important;width:auto!important;min-width:max-content!important;white-space:nowrap!important;}
.server-link-button{width:auto!important;max-width:100%!important;display:inline-flex!important;}
.server-detail-card>summary{list-style:none;cursor:pointer;display:flex!important;align-items:center!important;gap:12px!important;padding:0!important;}
.server-detail-card>summary::-webkit-details-marker{display:none;}
.server-detail-card>summary::before{content:"▶";color:var(--system-color,#35a7ff);font-weight:950;}
.server-detail-card[open]>summary::before{content:"▼";}
.server-detail-card .server-detail-body{padding-top:14px!important;}
@media(max-width:720px){.server-address-row{grid-template-columns:1fr!important}.server-address-row .ghost-btn,.server-address-row button:not(.server-link-button){justify-self:start!important}.server-link-button{width:100%!important}}

/* Inventory rows: left aligned structural cards. */
.inventory-component-card{padding:0!important;}
.inventory-component-summary{list-style:none!important;cursor:pointer!important;display:grid!important;grid-template-columns:24px minmax(0,1fr) auto!important;align-items:center!important;gap:12px!important;padding:12px 14px!important;text-align:left!important;}
.inventory-component-summary::-webkit-details-marker{display:none!important;}
.inventory-component-summary::before{content:"▶"!important;color:var(--system-color,var(--blue));font-weight:950!important;grid-column:1!important;}
.inventory-component-card[open]>.inventory-component-summary::before{content:"▼"!important;}
.inventory-component-summary>span:first-child{grid-column:2!important;display:grid!important;gap:3px!important;min-width:0!important;text-align:left!important;justify-items:start!important;}
.inventory-component-summary strong,.inventory-component-summary small,.inventory-component-summary .eyebrow{text-align:left!important;}
.inventory-component-summary small{color:var(--muted)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:100%!important;}
.inventory-component-body{padding:0 14px 14px!important;display:grid!important;gap:12px!important;}

/* Control: disabled buttons are visibly disabled and not re-enabled by generic permission glue. */
.control-action-btn:disabled,.control-action-btn[disabled]{opacity:.45!important;filter:saturate(.55)!important;cursor:not-allowed!important;box-shadow:none!important;}
.control-action-btn:disabled::after,.control-action-btn[disabled]::after{content:none!important;}

/* Layout corrections after details conversion. */
.server-detail-card{padding:14px 16px!important;}
.server-detail-card>summary>.server-detail-head{width:100%!important;margin-bottom:0!important;}
.server-detail-card:not([open]) .server-detail-body{display:none!important;}
.server-detail-card[open] .server-detail-body{display:block!important;}
.monitoring-item .monitoring-summary{position:relative!important;z-index:1!important;}
.dashboard-status-card .card-headline,.control-target-card .card-headline{position:relative!important;z-index:1!important;}


/* Final cause fixes: override older page CSS with higher specificity. */
.sidebar-session-row .sidebar-status-text,
.sidebar-session-row .sidebar-status-text.status-connected,
.sidebar-session-row .sidebar-status-text.status-ready,
.sidebar-session-row .sidebar-status-text.status-normal,
.sidebar-session-row .sidebar-status-text.status-disconnected,
.sidebar-session-row .sidebar-status-text.status-expired,
.sidebar-session-row .sidebar-status-text.sidebar-dev-badge{
  border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0!important;min-height:0!important;
}
.sidebar-session-row .sidebar-status-text::before{flex:0 0 auto!important;}

.permission-matrix-rendered .perm-state-mark::before,
.permission-matrix-rendered .perm-dot::before,
.permission-matrix-rendered .perm-state-standard.perm-standard-allow .perm-state-mark::before,
.permission-matrix-rendered .perm-state-standard.perm-standard-deny .perm-state-mark::before{
  display:block!important;visibility:visible!important;opacity:1!important;background:transparent!important;mask:none!important;-webkit-mask:none!important;
}
.permission-matrix-rendered .perm-state-standard.perm-standard-allow .perm-state-mark::before,
.permission-matrix-rendered .perm-dot-default.allow::before{content:"✓"!important;}
.permission-matrix-rendered .perm-state-standard.perm-standard-deny .perm-state-mark::before,
.permission-matrix-rendered .perm-dot-default.deny::before{content:"×"!important;}
.permission-matrix-rendered .perm-state-mark,.permission-matrix-rendered .perm-dot{font-size:0!important;line-height:1!important;}

/* Restore subtle service colour everywhere: border stays neutral, only left accent carries the service colour. */
.dashboard-status-card,
.server-detail-card,
.monitoring-item,
.control-target-card,
.inventory-component-card{
  border-color:rgba(109,178,255,.24)!important;
}
.dashboard-status-card::before,
.server-detail-card::before,
.monitoring-item::before,
.control-target-card::before,
.inventory-component-card::before{
  width:3px!important;top:10px!important;bottom:10px!important;border-radius:0 999px 999px 0!important;
}
.control-target-card::before{width:3px!important;}

/* Compact admin/vpn spacing: no large blank rows between collapsible cards. */
.admin-panel-stack,.vpn-admin-panel-stack,.admin-link-layout{gap:8px!important;}
.admin-link-body,.admin-profile-collapse-body,.permission-matrix-collapse-body,.vpn-invite-collapsible-body,.vpn-profiles-collapsible-body,.vpn-groups-collapsible-body{padding:12px 16px 14px!important;gap:10px!important;}
.admin-link-card>summary,.admin-main-card>summary,.permission-matrix-card>summary,.vpn-invite-collapsible>summary,.vpn-profiles-collapsible>summary,.vpn-groups-collapsible>summary{padding:13px 16px!important;}
.page-intro{margin-bottom:12px!important;}

/* Group fields: align both columns without clipping descriptions. */
.group-admin-columns section{min-width:0!important;}
.group-admin-columns h3{margin:0 0 3px!important;line-height:1.1!important;}
.group-note-placeholder{visibility:hidden!important;margin:0 0 6px!important;min-height:1.1em!important;}
.group-check-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;align-items:stretch!important;}
.group-check-row,.profile-group-check{min-height:66px!important;align-items:start!important;}
.group-check-row small,.profile-group-check small{max-height:none!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
.group-check-row span,.profile-group-check span{min-width:0!important;}
@media (min-width: 980px){
  .group-admin-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;}
}

/* Inventory card text: structural left alignment. */
.inventory-component-summary{justify-items:start!important;text-align:left!important;}
.inventory-component-summary>*{text-align:left!important;}
.inventory-component-summary .pill{justify-self:end!important;}

/* Stable UI cache/layout fixes: make active rules win without adding another renderer. */
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.status-connected,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.status-ready,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.status-normal,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.status-disconnected,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.status-expired,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.sidebar-dev-badge,
.sidebar-profile-footer .sidebar-session-row span.status-connected,
.sidebar-profile-footer .sidebar-session-row span.status-ready,
.sidebar-profile-footer .sidebar-session-row span.status-normal,
.sidebar-profile-footer .sidebar-session-row span.status-disconnected,
.sidebar-profile-footer .sidebar-session-row span.status-expired{
  display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;margin:0!important;min-height:0!important;
  line-height:1.15!important;white-space:nowrap!important;text-decoration:none!important;
}
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text::before{
  content:""!important;display:inline-block!important;width:8px!important;height:8px!important;border-radius:999px!important;background:currentColor!important;box-shadow:0 0 10px currentColor!important;
}
.sidebar-profile-footer .sidebar-session-row [data-env-badge][hidden],
.sidebar-profile-footer .sidebar-session-row [data-env-badge]:empty{display:none!important;}

/* Admin/VPN Admin spacing: remove the extra rows around accordions. */
.admin-panel-stack,.vpn-admin-panel-stack,.admin-link-layout{margin:0!important;gap:8px!important;}
.admin-panel-stack > .card,.vpn-admin-panel-stack > .card,.admin-link-layout > .card{margin:0!important;}
.page-intro{margin-bottom:10px!important;}
.admin-link-card>summary,.admin-main-card>summary,.permission-matrix-card>summary,
.vpn-invite-collapsible>summary,.vpn-profiles-collapsible>summary,.vpn-groups-collapsible>summary{padding:12px 14px!important;min-height:58px!important;}
.admin-link-body,.admin-profile-collapse-body,.permission-matrix-collapse-body,
.vpn-invite-collapsible-body,.vpn-profiles-collapsible-body,.vpn-groups-collapsible-body{padding:12px 14px!important;gap:8px!important;}

/* Profile group panel: always expose content correctly when opened and keep both columns aligned. */
.profile-groups-panel{display:block!important;margin-top:8px!important;border-top:1px solid rgba(109,178,255,.12)!important;padding-top:6px!important;overflow:visible!important;}
.profile-groups-panel>summary{display:flex!important;align-items:center!important;gap:10px!important;min-height:32px!important;cursor:pointer!important;list-style:none!important;}
.profile-groups-panel>summary::-webkit-details-marker{display:none!important;}
.profile-groups-panel>summary::before{content:"▶"!important;color:var(--blue)!important;font-weight:950!important;}
.profile-groups-panel[open]>summary::before{content:"▼"!important;}
.profile-groups-panel:not([open])>.group-admin-columns{display:none!important;}
.profile-groups-panel[open]>.group-admin-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;align-items:start!important;margin-top:8px!important;overflow:visible!important;}
.profile-groups-panel .group-admin-columns section{display:grid!important;grid-template-rows:auto minmax(1.15em,auto) auto!important;gap:4px!important;min-width:0!important;}
.profile-groups-panel .group-admin-columns h3{margin:0!important;line-height:1.15!important;}
.profile-groups-panel .group-admin-columns .small-note{margin:0!important;min-height:1.15em!important;}
.group-check-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(205px,1fr))!important;gap:8px!important;align-items:stretch!important;}
.group-check-row,.profile-group-check{min-width:0!important;min-height:58px!important;padding:8px 9px!important;overflow:visible!important;}
.group-check-row span,.profile-group-check span{min-width:0!important;display:grid!important;gap:1px!important;}
.group-check-row strong,.profile-group-check strong{line-height:1.05!important;}
.group-check-row small,.profile-group-check small{line-height:1.08!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
@media(max-width:980px){.profile-groups-panel[open]>.group-admin-columns{grid-template-columns:1fr!important;}}

/* Permission matrix: use real text glyphs as fallback and centre them; do not rely on pseudo icons only. */
.permission-matrix-rendered .perm-state-mark,
.permission-matrix-rendered .perm-dot,
.perm-state-mark,.perm-dot{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;
  width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;
  font-size:17px!important;line-height:1!important;font-weight:950!important;color:inherit!important;
}
.permission-matrix-rendered .perm-state-mark::before,
.permission-matrix-rendered .perm-dot::before,
.perm-state-mark::before,.perm-dot::before{content:none!important;display:none!important;}
.permission-matrix-rendered .perm-state-standard .perm-state-mark,
.permission-matrix-rendered .perm-dot-default{color:#ffd066!important;border-color:rgba(255,205,92,.72)!important;background:rgba(255,190,80,.14)!important;}
.permission-matrix-rendered .perm-state-allow .perm-state-mark,
.permission-matrix-rendered .perm-dot-allow{color:#7affcc!important;}
.permission-matrix-rendered .perm-state-deny .perm-state-mark,
.permission-matrix-rendered .perm-dot-deny{color:#ff8aa5!important;}

/* Service cards: neutral card, subtle coloured border and curved left accent. */
.dashboard-status-card,.server-detail-card,.monitoring-item,.control-target-card,.inventory-component-card{
  border:1px solid color-mix(in srgb,var(--system-color,#35a7ff) 38%,rgba(109,178,255,.18))!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.014),0 10px 24px rgba(0,0,0,.14)!important;
}
.dashboard-status-card::before,.server-detail-card::before,.monitoring-item::before,.control-target-card::before,.inventory-component-card::before{
  content:""!important;position:absolute!important;left:0!important;top:10px!important;bottom:10px!important;width:3px!important;
  border-radius:0 999px 999px 0!important;background:var(--system-color,#35a7ff)!important;box-shadow:0 0 10px color-mix(in srgb,var(--system-color,#35a7ff) 72%,transparent)!important;
}

/* Inventory summaries: structural left alignment. */
.inventory-component-summary{justify-items:start!important;text-align:left!important;}
.inventory-component-summary>span:first-child{justify-items:start!important;text-align:left!important;}
.inventory-component-summary strong,.inventory-component-summary small,.inventory-component-summary .eyebrow{text-align:left!important;}

/* Final isolated Admin/VPN group panel fix: do not touch Permission-Matrix icons. */
.profile-admin-card .profile-groups-panel,
.group-admin-card details{
  display:block!important;
  margin:6px 0 0!important;
  padding:0!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  border:1px solid rgba(109,178,255,.34)!important;
  border-radius:15px!important;
  background:rgba(8,22,40,.22)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.018)!important;
}
.profile-admin-card .profile-groups-panel>summary,
.group-admin-card details>summary{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  width:100%!important;
  min-height:42px!important;
  padding:9px 12px!important;
  margin:0!important;
  list-style:none!important;
  cursor:pointer!important;
  border-radius:14px!important;
  background:rgba(73,145,220,.08)!important;
  text-align:left!important;
}
.profile-admin-card .profile-groups-panel>summary::-webkit-details-marker,
.group-admin-card details>summary::-webkit-details-marker{display:none!important;}
.profile-admin-card .profile-groups-panel>summary::before,
.group-admin-card details>summary::before{
  content:"▶"!important;
  color:var(--accent,#63dfff)!important;
  font-weight:950!important;
  font-size:1rem!important;
  flex:0 0 auto!important;
  line-height:1!important;
}
.profile-admin-card .profile-groups-panel[open]>summary::before,
.group-admin-card details[open]>summary::before{content:"▼"!important;}
.profile-admin-card .profile-groups-panel>summary strong,
.group-admin-card details>summary strong{
  display:inline!important;
  margin:0!important;
  font-size:.98rem!important;
  line-height:1.05!important;
}
.profile-admin-card .profile-groups-panel>summary small,
.group-admin-card details>summary small{
  display:inline!important;
  margin-left:4px!important;
  color:var(--muted,#b8c8e6)!important;
  font-size:.82rem!important;
  font-weight:750!important;
  line-height:1.05!important;
}
.profile-admin-card .profile-groups-panel:not([open])>.group-admin-columns,
.group-admin-card details:not([open])>.group-admin-columns,
.group-admin-card details:not([open])>.group-admin-actions{display:none!important;}
.profile-admin-card .profile-groups-panel[open]>.group-admin-columns,
.group-admin-card details[open]>.group-admin-columns{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:12px!important;
  border-top:1px solid rgba(109,178,255,.22)!important;
  overflow:visible!important;
}
.profile-admin-card .group-admin-columns section,
.group-admin-card .group-admin-columns section{
  display:block!important;
  min-width:0!important;
  overflow:visible!important;
  border:1px solid rgba(109,178,255,.24)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.03)!important;
  padding:10px!important;
}
.profile-admin-card .group-admin-columns h3,
.group-admin-card .group-admin-columns h3{
  margin:0 0 4px!important;
  padding:0!important;
  font-size:.96rem!important;
  line-height:1.15!important;
}
.profile-admin-card .group-admin-columns .small-note,
.group-admin-card .group-admin-columns .small-note{
  display:block!important;
  margin:0 0 8px!important;
  min-height:0!important;
  color:var(--muted,#b8c8e6)!important;
  font-size:.78rem!important;
  line-height:1.2!important;
}
.profile-admin-card .group-note-placeholder[aria-hidden="true"],.group-admin-card .group-note-placeholder[aria-hidden="true"]{display:block!important;visibility:hidden!important;min-height:1.15em!important;}
.profile-admin-card .group-check-grid,
.group-admin-card .group-check-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(178px,1fr))!important;
  gap:8px!important;
  margin:0!important;
  align-items:stretch!important;
}
.profile-admin-card .group-check-row,
.profile-admin-card .profile-group-check,
.group-admin-card .group-check-row,
.group-admin-card .tri-state-row{
  display:grid!important;
  grid-template-columns:26px minmax(0,1fr)!important;
  align-items:start!important;
  gap:8px!important;
  min-width:0!important;
  min-height:0!important;
  padding:8px!important;
  overflow:visible!important;
  border-radius:12px!important;
  border:1px solid rgba(109,178,255,.24)!important;
  background:rgba(255,255,255,.035)!important;
}
.profile-admin-card .group-check-row input,
.profile-admin-card .profile-group-check input,
.group-admin-card .group-check-row input,
.group-admin-card .tri-state-row input{
  margin:1px 0 0!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  flex:0 0 auto!important;
}
.profile-admin-card .group-check-row span,
.profile-admin-card .profile-group-check span,
.group-admin-card .group-check-row span,
.group-admin-card .tri-state-row span{
  display:grid!important;
  min-width:0!important;
  gap:1px!important;
  overflow:visible!important;
}
.profile-admin-card .group-check-row strong,
.profile-admin-card .profile-group-check strong,
.group-admin-card .group-check-row strong,
.group-admin-card .tri-state-row strong{
  display:block!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
}
.profile-admin-card .group-check-row small,
.profile-admin-card .profile-group-check small,
.group-admin-card .group-check-row small,
.group-admin-card .tri-state-row small{
  display:block!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.group-admin-card details[open]>.group-admin-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin:0!important;
  padding:0 12px 12px!important;
}
@media(max-width:980px){
  .profile-admin-card .profile-groups-panel[open]>.group-admin-columns,
  .group-admin-card details[open]>.group-admin-columns{grid-template-columns:1fr!important;}
}

/* Matrix icons regression fix.
   Ursache: ältere spezifischere ::before-Regeln waren stärker als der spätere Reset.
   Lösung: Pseudo-Icons für Matrix/Legende mit gleicher/höherer Spezifität hart abschalten.
   Die echten Zeichen aus permission_matrix.js bleiben die einzige Icon-Quelle. */
.permission-matrix-rendered .perm-state-standard.perm-standard-allow .perm-state-mark::before,
.permission-matrix-rendered .perm-state-standard.perm-standard-deny .perm-state-mark::before,
.permission-matrix-rendered .perm-state-allow .perm-state-mark::before,
.permission-matrix-rendered .perm-state-deny .perm-state-mark::before,
.permission-matrix-rendered .perm-state-mark[data-mark="allow"]::before,
.permission-matrix-rendered .perm-state-mark[data-mark="deny"]::before,
.permission-matrix-rendered .perm-dot-default.allow::before,
.permission-matrix-rendered .perm-dot-default.deny::before,
.permission-matrix-rendered .perm-dot-allow::before,
.permission-matrix-rendered .perm-dot-deny::before,
.permission-legend .perm-dot::before,
.permission-legend .perm-dot-default.allow::before,
.permission-legend .perm-dot-default.deny::before,
.permission-legend .perm-dot-allow::before,
.permission-legend .perm-dot-deny::before{
  content:none!important;
  display:none!important;
  visibility:hidden!important;
}
.permission-matrix-rendered .perm-state-mark,
.permission-matrix-rendered .perm-dot,
.permission-legend .perm-dot{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  padding:0!important;
  margin:0!important;
  box-sizing:border-box!important;
  border-radius:8px!important;
  font-size:17px!important;
  line-height:1!important;
  font-weight:950!important;
  text-align:center!important;
  overflow:hidden!important;
}
.permission-matrix-rendered .perm-state-standard .perm-state-mark,
.permission-matrix-rendered .perm-dot-default{
  color:#ffd066!important;
  border:1px solid rgba(255,205,92,.72)!important;
  background:rgba(255,190,80,.14)!important;
}
.permission-matrix-rendered .perm-state-allow .perm-state-mark,
.permission-matrix-rendered .perm-dot-allow{
  color:#7affcc!important;
  border:1px solid rgba(122,255,204,.70)!important;
  background:rgba(122,255,204,.16)!important;
}
.permission-matrix-rendered .perm-state-deny .perm-state-mark,
.permission-matrix-rendered .perm-dot-deny{
  color:#ff8aa5!important;
  border:1px solid rgba(255,123,154,.70)!important;
  background:rgba(255,123,154,.16)!important;
}

/* Step 29AA: Admin/VPN Admin Gruppenfeld links, Speichern rechts. */
.profile-admin-card:not(.group-admin-card){
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 150px!important;
  gap:12px!important;
  align-items:start!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-admin-main,
.profile-admin-card:not(.group-admin-card)>.profile-admin-controls{
  grid-column:1 / -1!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-groups-panel{
  grid-column:1 / 2!important;
  margin:6px 0 0!important;
  width:100%!important;
  min-width:0!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-admin-actions{
  grid-column:2 / 3!important;
  margin:6px 0 0!important;
  padding:0!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:flex-start!important;
  align-self:start!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-admin-actions .btn{
  width:100%!important;
  min-width:140px!important;
  white-space:nowrap!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-groups-panel[open]{
  grid-column:1 / -1!important;
}
.profile-admin-card:not(.group-admin-card)>.profile-groups-panel[open] + .profile-admin-actions{
  grid-column:2 / 3!important;
  grid-row:auto!important;
  justify-self:end!important;
}
@media (max-width:980px){
  .profile-admin-card:not(.group-admin-card){grid-template-columns:1fr!important;}
  .profile-admin-card:not(.group-admin-card)>.profile-groups-panel,
  .profile-admin-card:not(.group-admin-card)>.profile-groups-panel[open],
  .profile-admin-card:not(.group-admin-card)>.profile-admin-actions{
    grid-column:1 / -1!important;
  }
  .profile-admin-card:not(.group-admin-card)>.profile-admin-actions{justify-content:flex-end!important;}
  .profile-admin-card:not(.group-admin-card)>.profile-admin-actions .btn{width:auto!important;min-width:140px!important;}
}

/* Non-dev profiles must not show an empty Dev badge residue.
   This intentionally targets only the sidebar env badge and does not touch Matrix icons. */
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.sidebar-dev-badge[hidden],
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.sidebar-dev-badge:empty,
.sidebar-profile-footer .sidebar-session-row span[data-env-badge][hidden],
.sidebar-profile-footer .sidebar-session-row span[data-env-badge]:empty{
  display:none!important;
}
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.sidebar-dev-badge[hidden]::before,
.sidebar-profile-footer .sidebar-session-row span.sidebar-status-text.sidebar-dev-badge:empty::before,
.sidebar-profile-footer .sidebar-session-row span[data-env-badge][hidden]::before,
.sidebar-profile-footer .sidebar-session-row span[data-env-badge]:empty::before{
  content:none!important;
  display:none!important;
}


.control-action-btn{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;text-align:center!important;line-height:1.1!important;min-height:56px!important;}
.control-action-btn .control-btn-label{display:block!important;}
.control-action-btn .control-btn-hint{display:block!important;font-size:.72rem!important;opacity:.9!important;line-height:1!important;}

/* VPN profile action buttons should stay compact. */
.vpn-profiles-collapsible .profile-admin-controls{
  grid-template-columns:minmax(120px,180px) minmax(120px,180px) auto!important;
  align-items:end!important;
}
.vpn-profiles-collapsible .profile-admin-controls .btn{
  width:auto!important;
  min-width:140px!important;
  justify-self:start!important;
  padding-inline:18px!important;
}
@media(max-width:900px){
  .vpn-profiles-collapsible .profile-admin-controls{grid-template-columns:1fr!important;}
  .vpn-profiles-collapsible .profile-admin-controls .btn{justify-self:start!important;width:auto!important;}
}


.profile-admin-actions.compact-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important;justify-content:flex-end!important;}
.profile-admin-actions .compact-danger{min-width:auto!important;width:auto!important;padding-inline:18px!important;}
.blocked-profile-card .profile-admin-actions .btn,.blocked-profile-card .profile-admin-actions .danger-btn{min-height:44px!important;}

/* Blocked profile delete buttons stay compact in the blocked-profile area. */
.blocked-profile-card .blocked-profile-controls {
  display: grid !important;
  grid-template-columns: minmax(130px, 180px) max-content max-content !important;
  justify-content: start !important;
  align-items: end !important;
  gap: 10px !important;
}

.blocked-profile-card .blocked-profile-controls .btn,
.blocked-profile-card .blocked-profile-controls .danger-btn,
.blocked-profile-card .blocked-profile-controls .compact-danger,
.blocked-profile-card .blocked-profile-controls button[data-action="delete-blocked-profile"],
.blocked-profile-card .blocked-profile-controls button[data-vpn-action="delete-blocked-profile"] {
  width: auto !important;
  min-width: 104px !important;
  max-width: 150px !important;
  justify-self: start !important;
  align-self: end !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  white-space: nowrap !important;
}

@media (max-width: 720px) {
  .blocked-profile-card .blocked-profile-controls {
    grid-template-columns: 1fr !important;
  }
  .blocked-profile-card .blocked-profile-controls .btn,
  .blocked-profile-card .blocked-profile-controls .danger-btn,
  .blocked-profile-card .blocked-profile-controls .compact-danger {
    justify-self: start !important;
  }
}

