.user-admin-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 102;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(0, 0, 0, .97);
    color: #d8d8d8;
    font-family: "Courier New", Courier, monospace;
}
.user-admin-editor-overlay[hidden] { display: none; }
.user-admin-editor-window {
    width: min(97vw, 1280px);
    height: min(94dvh, 920px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid #777;
    background: #020202;
    box-shadow: 0 0 28px rgba(85, 255, 255, .09);
}
.user-admin-editor-header,
.user-admin-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    background: #111;
}
.user-admin-editor-header { border-bottom: 1px solid #555; }
.user-admin-editor-footer { border-top: 1px solid #555; color: #858c8f; font-size: .8rem; }
.user-admin-editor-header > div { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.user-admin-editor-header span { color: #8a9295; font-size: .75rem; }
.user-admin-editor-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
}
.user-admin-browser {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-right: 1px solid #444;
    background: #080808;
}
.user-admin-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 11px;
    border-bottom: 1px solid #333;
}
.user-admin-search-row label { display: grid; gap: 5px; color: #8a9295; font-size: .72rem; }
.user-admin-search-row input,
.user-admin-search-row select,
.user-admin-control-row select {
    min-width: 0;
    border: 1px solid #555;
    border-radius: 0;
    background: #000;
    color: #eee;
    padding: 8px 9px;
    font: inherit;
}
.user-admin-search-row input:focus,
.user-admin-search-row select:focus,
.user-admin-control-row select:focus { border-color: #55ffff; outline: none; }
.user-admin-list { min-height: 0; overflow: auto; padding: 7px; }
.user-admin-row {
    width: 100%;
    display: grid;
    gap: 5px;
    margin: 0 0 6px;
    padding: 10px;
    border: 1px solid #2f2f2f;
    border-radius: 0;
    background: #050505;
    color: #ccc;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.user-admin-row:hover,
.user-admin-row:focus { border-color: #55ffff; outline: none; }
.user-admin-row.is-selected { border-color: rgb(182, 215, 168); background: #0d120c; }
.user-admin-row-top { display: flex; justify-content: space-between; gap: 10px; }
.user-admin-row-top strong { color: #f0f0f0; overflow-wrap: anywhere; }
.user-admin-row-top code { color: #8a9295; }
.user-admin-row-meta { color: #7e8588; font-size: .76rem; }
.user-admin-row-flags,
.user-admin-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.user-admin-badge {
    display: inline-flex;
    width: fit-content;
    padding: 3px 6px;
    border: 1px solid #555;
    color: #aaa;
    font-size: .66rem;
    line-height: 1;
}
.user-admin-badge.is-warn { border-color: #a77718; color: #ffcf55; }
.user-admin-badge.is-ok { border-color: #396c3b; color: rgb(182, 215, 168); }
.user-admin-badge.is-danger { border-color: #8a3333; color: #ff7777; }
.user-admin-badge.is-member { border-color: #326b73; color: #55ffff; }
.user-admin-badge.is-owner { border-color: #75683a; color: #ffff77; }
.user-admin-detail { min-height: 0; overflow: auto; padding: 16px; background: #020202; }
.user-admin-notice,
.user-admin-temporary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #3d6868;
    background: #071111;
    color: #55ffff;
    overflow-wrap: anywhere;
}
.user-admin-temporary { border-color: #9a7b25; background: #171304; color: #ffff77; font-weight: bold; }
.user-admin-identity {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #444;
}
.user-admin-identity span { color: #8a9295; font-size: .78rem; }
.user-admin-identity h2 { margin: 4px 0 0; color: #fff; font-size: clamp(1.35rem, 3vw, 2.2rem); overflow-wrap: anywhere; }
.user-admin-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 14px 0;
    background: #333;
    border: 1px solid #333;
}
.user-admin-facts > div { min-width: 0; display: grid; gap: 5px; padding: 10px; background: #080808; }
.user-admin-facts span { color: #7f878a; font-size: .7rem; text-transform: uppercase; }
.user-admin-facts strong { color: #ddd; font-size: .83rem; overflow-wrap: anywhere; }
.user-admin-section { padding: 14px 0; border-top: 1px solid #333; }
.user-admin-section > header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.user-admin-section > header strong { color: rgb(182, 215, 168); }
.user-admin-section > header span { color: #737a7d; font-size: .75rem; text-align: right; }
.user-admin-actions,
.user-admin-permissions,
.user-admin-control-row { display: flex; flex-wrap: wrap; gap: 8px; }
.user-admin-control-row select { flex: 1 1 260px; }
.user-admin-editor-window button {
    border: 1px solid #666;
    border-radius: 0;
    background: #000;
    color: #ddd;
    padding: 8px 10px;
    font: inherit;
    cursor: pointer;
}
.user-admin-editor-window button:hover,
.user-admin-editor-window button:focus { border-color: #55ffff; color: #55ffff; outline: none; }
.user-admin-editor-window button:disabled { border-color: #303030; color: #555; cursor: not-allowed; }
.user-admin-permissions button { flex: 1 1 240px; text-align: left; }
.user-admin-danger button:last-child:not(:disabled) { border-color: #733; color: #ff7777; }
.user-admin-help { margin: 9px 0 0; color: #747b7e; font-size: .78rem; line-height: 1.4; }
.user-admin-empty { padding: 24px; color: #686f72; text-align: center; }
.user-admin-editor-overlay.is-busy { cursor: progress; }

@media (max-width: 820px) {
    .user-admin-editor-overlay { padding: 5px; }
    .user-admin-editor-window { width: 100%; height: calc(100dvh - 10px); }
    .user-admin-editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(190px, 38%) minmax(0, 1fr); }
    .user-admin-browser { border-right: 0; border-bottom: 1px solid #444; }
    .user-admin-detail { padding: 12px; }
    .user-admin-editor-header, .user-admin-editor-footer { font-size: 12px; }
}

@media (max-width: 520px) {
    .user-admin-search-row { grid-template-columns: 1fr; }
    .user-admin-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-admin-identity { display: grid; }
    .user-admin-section > header { display: grid; }
    .user-admin-section > header span { text-align: left; }
    .user-admin-actions button, .user-admin-control-row button { flex: 1 1 100%; }
}
