html.identity-loading body,html.identity-revalidating main { visibility:hidden; }
.identity-card,.identity-panel { padding:24px; background:var(--surface); border:1px solid var(--line); border-radius:5px; }
.identity-login { min-width:320px; }.login-shell { width:min(480px,calc(100% - 32px)); margin:8vh auto 32px; }.login-brand { display:grid; gap:10px; text-decoration:none; margin:0 0 28px; }.login-brand img { width:230px; }.login-brand span,.login-caption { color:var(--muted); font-size:13px; }.identity-card h1 { margin:8px 0; font-size:28px; }.identity-intro { color:var(--muted); margin-bottom:24px; }
.identity-card form,.identity-dialog form { display:grid; gap:16px; }.identity-card label,.identity-dialog label { display:grid; gap:6px; font-size:13px; font-weight:600; }
.identity-card input,.identity-dialog input,.identity-dialog select,.identity-search { width:100%; min-width:0; height:43px; border:1px solid var(--line); background:var(--surface-raised); color:var(--ink); padding:9px 11px; border-radius:3px; font:inherit; }.identity-card input:focus-visible,.identity-dialog input:focus-visible,.identity-search:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.identity-password { display:flex; }.identity-password input { border-radius:3px 0 0 3px; }.identity-password button { border-radius:0 3px 3px 0; }.identity-primary { background:var(--lime); color:#1b2321; font-weight:600; }.identity-primary:hover { background:#e2ff9a; }[data-error=true],.identity-danger { color:var(--rose); }.identity-footnote,.identity-card small,.identity-dialog small { color:var(--muted); font-size:12px; }.identity-footnote { border-top:1px solid var(--line); padding-top:16px; margin-top:24px; }
.identity-card [hidden],.identity-dialog [hidden],.identity-admin [hidden] { display:none!important; }.header-account { gap:8px; }.account-profile,.account-logout { background:#283730; border-color:#4c6256; color:#edf3ef; font-size:12px; padding:8px 10px; }
.identity-toolbar { display:flex; gap:16px; justify-content:space-between; align-items:center; flex-wrap:wrap; margin-bottom:20px; }.identity-search { max-width:370px; }.identity-toolbar p { color:var(--muted); font-size:13px; margin:0; }.identity-branch { position:relative; margin-bottom:18px; border:1px solid var(--line); border-radius:5px; background:var(--surface); overflow:hidden; }.identity-branch-head { padding:18px 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; background:var(--surface-raised); border-left:4px solid var(--branch-color,var(--lime)); }.identity-branch-head h2 { margin:3px 0; font-size:19px; }.identity-level { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; }.identity-company-contact { color:var(--muted); font-size:12px; }.identity-actions { display:flex; gap:8px; flex-wrap:wrap; }.identity-actions button { font-size:12px; padding:7px 11px; }.identity-member { padding:16px 22px; border-top:1px solid var(--line); display:grid; grid-template-columns:minmax(180px,1fr) minmax(250px,2fr) auto; gap:18px; align-items:center; }.identity-person { display:grid; gap:3px; }.identity-person small { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }.identity-pending { color:var(--amber,#dfb067)!important; }.identity-rights { display:flex; gap:5px; flex-wrap:wrap; }.identity-rights span { background:var(--surface-raised); border:1px solid var(--line); border-radius:3px; padding:3px 7px; font-size:11px; }.identity-empty { color:var(--muted); font-size:13px; padding:16px 22px; margin:0; }.identity-summary { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }.identity-summary span { border:1px solid var(--line); padding:7px 12px; background:var(--surface); border-radius:4px; font-size:13px; }.identity-summary strong { color:var(--ink); }.identity-note { color:var(--muted); font-size:13px; }.identity-message { min-height:24px; color:var(--muted); }.identity-dialog { width:min(760px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; color:var(--ink); background:var(--surface); padding:24px; border:1px solid var(--line); border-radius:6px; }.identity-dialog::backdrop { background:rgb(0 0 0 / 65%); backdrop-filter:blur(4px); }.identity-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }.identity-dialog h2 { margin:0; font-size:22px; }.identity-dialog-close { padding:3px 11px; font-size:24px; }.identity-dialog-context { padding:12px 15px; background:var(--surface-raised); border-left:3px solid var(--lime); margin:0 0 20px; }.identity-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.identity-permissions { margin:4px 0; border:1px solid var(--line); padding:16px; border-radius:4px; }.identity-permission-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 24px; }.identity-permission-group strong { display:block; margin-bottom:7px; font-size:13px; }.identity-permission-grid label { display:flex; align-items:flex-start; gap:9px; margin:8px 0; font-weight:400; }.identity-permission-grid input[type=checkbox] { width:17px; height:17px; min-width:17px; padding:0; margin:1px 0 0; accent-color:var(--lime); }.identity-dialog-footer { display:flex; gap:10px; justify-content:flex-end; border-top:1px solid var(--line); padding-top:18px; }.identity-link { display:flex; gap:8px; }.identity-link input { font-size:12px; }.identity-audit { margin-top:24px; }.identity-audit summary { cursor:pointer; font-weight:600; }.identity-audit-list { display:grid; gap:0; margin-top:15px; }.identity-audit-item { display:grid; grid-template-columns:170px 150px 1fr; gap:12px; padding:10px 0; border-top:1px solid var(--line); font-size:12px; }.identity-audit-item span { overflow-wrap:anywhere; }.identity-audit-item time { color:var(--muted); }.identity-profile-layout { max-width:760px; display:grid; gap:20px; }.identity-profile-layout h2 { margin-top:0; }
@media(max-width:1000px) { .identity-member { grid-template-columns:1fr 1fr; }.identity-member .identity-actions { grid-column:1/-1; }.header-account .account-profile { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } }
@media(max-width:650px) { .identity-member { grid-template-columns:1fr; gap:12px; }.identity-branch-head { align-items:flex-start; flex-direction:column; padding:16px; }.identity-member { padding:16px; }.identity-form-grid,.identity-permission-grid { grid-template-columns:1fr; }.identity-audit-item { grid-template-columns:1fr; gap:3px; }.identity-card,.identity-panel { padding:18px; }.identity-dialog { padding:18px; }.identity-dialog-footer { flex-wrap:wrap; }.account-profile { display:none; }.header-actions { gap:8px; }.login-shell { margin-top:30px; } }

html[data-theme=light] .login-brand img { filter:brightness(0) saturate(100%) invert(15%) sepia(9%) saturate(1594%) hue-rotate(96deg); }

.login-tools { display:flex; justify-content:flex-end; padding:16px 24px 0; }.login-tools button { display:flex; align-items:center; gap:8px; font-size:12px; }.identity-login .login-shell { margin-top:4vh; }

/* Three roots share one permission model; relationships retain their project. */
.identity-toolbar { justify-content:space-between; gap:12px; padding:12px; margin-bottom:10px; background:var(--surface); border:1px solid var(--line); border-radius:5px; }
.identity-view-tabs { display:flex; gap:4px; }.identity-view-tabs button { display:flex; align-items:center; gap:8px; min-height:40px; padding:8px 16px; }
.identity-view-tabs [aria-selected=true] { background:var(--lime); color:#1b2321; border-color:var(--lime); font-weight:600; }
.identity-admin svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.identity-search-tools { display:flex; align-items:center; gap:7px; flex:1; justify-content:flex-end; min-width:0; }.identity-search-tools .identity-search { max-width:360px; height:40px; }
.identity-help-toggle,.identity-refresh { width:36px; height:36px; flex:none; padding:0; font-size:18px; }.identity-help-toggle { border-radius:50%; font-size:15px; font-weight:700; }
.identity-search-clear { min-height:36px; font-size:12px; white-space:nowrap; }.identity-scope { margin:0 0 18px; color:var(--muted); font-size:12px; }
.identity-summary { align-items:center; }.identity-add-company { margin-left:auto; font-size:12px; }.identity-tree { min-width:0; }
.identity-project-node { position:relative; }.identity-project-children { border-left:1px solid var(--line); margin-left:10px; padding-left:14px; }
.identity-project-children>.identity-project-node::before { content:""; position:absolute; width:14px; height:1px; background:var(--line); left:-14px; top:37px; }
.identity-project-tree .identity-branch { margin-bottom:18px; }.identity-project-tree>.identity-project-node:first-child .identity-branch { border-color:color-mix(in srgb,var(--branch-color) 35%,var(--line)); }
.identity-directory-scroll { max-width:100%; overflow:auto; border:1px solid var(--line); border-radius:5px; background:var(--surface); overscroll-behavior-x:contain; }
.identity-directory-grid { min-width:calc(252px + var(--identity-levels)*240px); }
.identity-directory-head,.identity-directory-row { display:grid; grid-template-columns:220px repeat(var(--identity-levels),minmax(220px,1fr)); gap:20px; padding:16px; }
.identity-directory-head { background:var(--surface-raised); border-bottom:1px solid var(--line); font-size:12px; font-weight:600; color:var(--muted); }
.identity-directory-head>span { display:flex; align-items:center; gap:7px; }.identity-directory-head i { width:8px; height:8px; flex:none; border-radius:50%; background:var(--branch-color); }
.identity-directory-row { position:relative; border-bottom:1px solid var(--line); align-items:start; }.identity-directory-row:last-child { border-bottom:0; }
.identity-directory-spine { grid-row:1; align-self:start; margin:33px 0 0 -20px; border-top:1px solid var(--line); pointer-events:none; }.identity-directory-root { grid-column:1; grid-row:1; }.identity-directory-cell { grid-row:1; }
.identity-directory-root { position:sticky; left:16px; z-index:1; min-width:0; background:var(--surface-raised); border:1px solid var(--line); border-radius:4px; padding:16px; box-shadow:0 0 0 7px var(--surface); }
.identity-directory-root h2 { font-size:16px; margin:9px 0 7px; overflow-wrap:anywhere; }.identity-directory-root small { display:block; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }.identity-directory-root p { color:var(--muted); font-size:12px; margin:12px 0 0; }.identity-root-icon { color:var(--lime); display:flex; }
.identity-directory-cell { display:grid; gap:12px; min-width:0; position:relative; }.identity-directory-cell:not([data-empty=true])::before { content:""; position:absolute; left:-10px; top:33px; bottom:33px; border-left:1px solid var(--line); }
.identity-association { position:relative; padding:13px 14px; min-width:0; border:1px solid var(--line); border-left:3px solid var(--branch-color); border-radius:4px; background:var(--surface); }
.identity-association::before { content:""; position:absolute; width:10px; border-top:1px solid var(--line); left:-13px; top:32px; }.identity-association h3 { font-size:14px; margin:0 0 8px; overflow-wrap:anywhere; }
.identity-project-link { display:block; color:var(--ink); font-size:13px; font-weight:600; text-decoration:none; overflow-wrap:anywhere; }.identity-project-link:hover { text-decoration:underline; text-underline-offset:3px; }.identity-project-code { display:block; font-size:10px; letter-spacing:.03em; color:var(--muted); margin-top:5px; }
.identity-association-people { display:grid; gap:5px; margin:13px 0; }.identity-person-link { display:flex; align-items:center; gap:7px; text-align:left; padding:6px 8px; font-size:12px; width:100%; }.identity-person-link small { display:block; font-size:10px; color:var(--muted); margin-top:3px; }.identity-association .identity-actions { margin-top:12px; gap:5px; }.identity-association .identity-actions button { font-size:11px; padding:6px 8px; }
.identity-detail-rights { display:grid; grid-template-columns:1fr 1fr; gap:7px 20px; padding-left:20px; font-size:13px; margin-bottom:24px; }.identity-search-help { width:min(660px,calc(100vw - 32px)); }.identity-search-help p { font-size:13px; line-height:1.65; }.identity-search-help dl { display:grid; grid-template-columns:minmax(150px,auto) 1fr; gap:12px 22px; font-size:13px; }.identity-search-help dd { margin:0; color:var(--muted); }.identity-search-help code { font-size:12px; color:var(--ink); }.identity-help-example { padding:13px 16px; background:var(--surface-raised); border-left:3px solid var(--lime); border-radius:3px; }
@media(max-width:1100px) { .identity-search-tools { flex-basis:100%; }.identity-search-tools .identity-search { max-width:none; }.identity-view-tabs { width:100%; }.identity-view-tabs button { flex:1; justify-content:center; } }
@media(max-width:650px) { .identity-toolbar { padding:9px; }.identity-view-tabs button { padding:8px; font-size:12px; gap:6px; }.identity-view-tabs svg { width:16px; }.identity-search-tools { flex-wrap:wrap; }.identity-search-tools .identity-search { flex:1; width:100px; }.identity-search-clear { order:4; }.identity-summary { gap:6px; }.identity-summary span { font-size:12px; padding:7px; }.identity-add-company { margin-left:0; }.identity-project-children { margin-left:5px; padding-left:11px; }.identity-project-children>.identity-project-node::before { width:11px; left:-11px; }.identity-search-help dl { grid-template-columns:1fr; gap:5px; }.identity-search-help dd { margin-bottom:10px; }.identity-detail-rights { grid-template-columns:1fr; } }

.identity-directory-head>span:first-child { position:sticky; left:16px; background:var(--surface-raised); z-index:2; }
@media(max-width:650px) { .identity-directory-grid { min-width:calc(192px + var(--identity-levels)*240px); }.identity-directory-head,.identity-directory-row { grid-template-columns:160px repeat(var(--identity-levels),minmax(220px,1fr)); }.identity-directory-root,.identity-directory-head>span:first-child { position:relative; left:auto; } }
@media(max-width:650px) { body .topbar { flex-wrap:wrap; gap:10px; }.topbar .header-actions { gap:6px; margin-left:auto; min-width:0; }.topbar .header-account { padding-left:8px; gap:6px; }#theme-button,#support-settings-button { padding:8px; } }
