html[data-theme="light"] { color-scheme: light; --ng-surface: #fff; --ng-ink: #263331; --ng-line: #bcc8c5; --ng-tint: #e8efec; }
html[data-theme="dark"] { color-scheme: dark; --ng-surface: #272d2c; --ng-ink: #eef4f1; --ng-line: #596360; --ng-tint: #39433f; }
ng-theme-picker { position: relative; display: inline-flex; flex: 0 0 auto; align-self: center; color: var(--ng-ink); }
ng-theme-picker button.ng-cycle {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: auto; min-width: 44px; min-height: 44px; margin: 0; padding: 0 8px; box-sizing: border-box;
    border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ng-ink);
    font: 600 13px/1.3 system-ui,sans-serif; cursor: pointer;
}
ng-theme-picker button.ng-cycle::before { content: none; }
ng-theme-picker button.ng-cycle:hover { background: var(--ng-tint); color: var(--ng-ink); }
ng-theme-picker button.ng-cycle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
ng-theme-picker svg { display: block; width: 19px; height: 19px; flex: none; }
.ng-document-picker { float: right; margin-inline-start: 8px; }
@media print { ng-theme-picker { display: none !important; } }

/* The picture remains visible above the label, even when roles wrap. */
.client-share { --scene-art: url("share-optical.webp"); --scene-position: 50% 48%; --scene-mobile-position: 50% 48%; }
.brand .app-emblem { width: 36px; height: 36px; border-radius: 9px; }
.portal-shell .portal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; border:0; border-radius:0; overflow:visible; background:transparent; }
.portal-shell .portal-card { position:relative; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:0; padding:0; min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--paper); text-decoration:none; }
.portal-card .app-landscape { height:108px; background:var(--soft); width:100%; display:block; object-fit:cover; }
.portal-card .portal-card-copy { position:relative; padding:18px 16px 7px 66px; min-height:62px; }
.portal-card-copy > .app-emblem, .portal-card-copy > .portal-icon { position:absolute; left:16px; top:19px; width:36px; height:36px; border-radius:8px; object-fit:contain; }
.portal-card .portal-card-copy h2 { display:block; font-size:1.08rem; line-height:1.3; margin:0 0 3px; }
.portal-card .portal-domain { overflow-wrap:anywhere; font-size:.77rem; }
.portal-card .app-entry-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:auto 16px 0; padding:8px 0 10px; border-top:1px solid var(--line); }
.portal-card .portal-arrow { font-size:1.12rem; line-height:1; }
.portal-shell .portal-card:is(:hover,:focus-visible) { border-color:var(--brand); box-shadow:0 2px 8px #0002; }
.portal-shell .portal-card:focus-visible { outline:3px solid var(--brand); outline-offset:2px; }
.portal-card:is(:hover,:focus-visible) h2 { text-decoration:underline; text-underline-offset:3px; }
.portal-shell .directory-caption { margin:0 0 12px; }
.admin-shell .metrics { border-radius:10px; }
.admin-shell .metrics dd { font-size:clamp(1.7rem,3vw,2.2rem); }
.admin-shell .metrics > div:last-child dd a { color:var(--ok); }
.admin-shell .directory-filter { padding:16px; margin:0; border:1px solid var(--line); border-bottom:none; border-radius:10px 10px 0 0; background:var(--paper); }
.admin-shell .directory-filter + .user-table-wrap { border-radius:0 0 10px 10px; }
.user-table .account-cell { display:flex; align-items:center; gap:10px; }
.user-table .account-initial { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:50%; background:var(--soft); color:var(--ink); font-weight:650; }
.user-table .account-cell strong,.user-table .account-cell .muted { display:block; }
.user-table tbody tr:focus-within,.user-table tbody tr:hover { background:var(--soft); }
.user-editor .account-fields { border:0; min-width:0; padding:0; margin:0; display:grid; gap:16px; }
.user-editor .account-fields legend { font-size:1.05rem; font-weight:650; margin:0 0 12px; }
.user-editor .membership-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start; }
.user-editor .membership { background:var(--paper); border-radius:10px; min-width:0; }
.user-editor .membership-head { align-items:center; gap:8px; }
.user-editor .membership-head strong { display:flex; align-items:center; gap:8px; }
.membership-head .app-emblem { width:26px; height:26px; object-fit:contain; border-radius:6px; }
.user-editor .membership:has(.membership-head input:checked) { border-inline-start:3px solid var(--brand); }
@media(max-width:840px){ .portal-shell .portal-grid {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:620px){ .user-editor .membership-grid {grid-template-columns:1fr;} .portal-shell .portal-grid{gap:10px;} .portal-card .app-landscape{height:80px;} }
@media(max-width:480px){ .portal-shell .portal-grid {grid-template-columns:1fr;} .portal-card .app-landscape{height:94px;} .user-table .account-initial{display:none;} }

