        #perm-groups .perm-group { margin: 8px 8px 14px; }
        #perm-groups .perm-group-title { padding: 10px 12px 6px; color:#c4b5fd; font-size:12px; font-weight:600; letter-spacing:0.3px; }
        #perm-groups table.perm-table { width: 100%; border-collapse: collapse; font-size: 13px; background: rgba(255,255,255,0.02); border-radius: 6px; overflow: hidden; }
        #perm-groups .perm-table th, #perm-groups .perm-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(139,92,246,0.08); }
        #perm-groups .perm-table thead th { background: rgba(139,92,246,0.08); color: #c4b5fd; font-weight: 600; font-size: 11px; letter-spacing: 0.3px; }
        #perm-groups .perm-table td.perm-rule { text-align: center; width: 80px; font-size: 13px; }
        #perm-groups .perm-table th.perm-col-current { background: rgba(139,92,246,0.22) !important; color: #ddd6fe !important; }
        #perm-groups .perm-table td.perm-rule.perm-col-current { background: rgba(139,92,246,0.10); }
        #perm-groups .perm-action-meta { color: #a1a1aa; font-size: 11px; margin-top: 2px; }
        #perm-groups .perm-note-icon { cursor: help; color:#fcd34d; font-size: 11px; margin-left: 4px; }
    

.pt-modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 1000; }
.pt-modal-bg.show { display: flex !important; align-items: center; justify-content: center; }
.pt-modal { background: #fff; border-radius: 8px; padding: 1.25rem 1.5rem; width: 440px; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.pt-pack-drawer { background: #fff; border-radius: 8px; padding: 1.1rem 1.25rem; width: min(640px, 96vw); max-height: 92vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.pt-pack-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.75rem 0.9rem; }
.pt-pack-card-title { font-size: 0.72rem; letter-spacing: 0.04em; color: #64748b; margin-bottom: 0.35rem; }
.pt-mod-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid #f1f5f9; }
.pt-mod-row label { flex: 1; min-width: 140px; }
.pt-mod-row input[type="date"] { min-width: 140px; }
.pt-form-row { margin-bottom: 0.85rem; }
.pt-form-row label { display: block; font-size: 0.82rem; color: #64748b; margin-bottom: 0.25rem; }
.pt-form-row input,
.pt-form-row select { width: 100%; padding: 0.45rem 0.6rem; border: 1px solid #e2e8f0; border-radius: 5px; font: inherit; box-sizing: border-box; }
.pt-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.pt-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.6rem 0.9rem; min-width: 120px; }
.pt-stat-k { color: #64748b; font-size: 0.72rem; letter-spacing: 0.05em; }
.pt-stat-v { font-size: 1.4rem; font-weight: 600; margin-top: 0.2rem; }

/* Phase 2b-β：从 settings_security.html 迁入的对话框基座（addUserDialog + securityMessageDialog） */
.security-dialog-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    z-index: 10000;
}
.security-dialog-card {
    width: min(600px, 100%);
    margin: 0;
    padding: 32px 32px 28px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}
.security-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 16px;
}
.security-dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}
.security-dialog-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.security-dialog-body {
    padding: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.security-dialog-body.code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 12px 0 0;
    white-space: pre-wrap;
}
.security-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 24px 0 0;
}

.settings-people-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10050;
    max-width: min(360px, calc(100vw - 48px));
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.32);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.settings-people-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.settings-people-toast.busy {
    border-color: rgba(59, 130, 246, 0.38);
    background: #eff6ff;
    color: #1d4ed8;
}
.settings-people-toast.ok {
    border-color: rgba(34, 197, 94, 0.34);
    background: #f0fdf4;
    color: #15803d;
}
.settings-people-toast.err {
    border-color: rgba(239, 68, 68, 0.34);
    background: #fef2f2;
    color: #b91c1c;
}

.s-btn.is-disabled-by-capability {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.1);
}

.iam-trust-observable-panel {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
}

.iam-trust-observable-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.iam-trust-observable-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: #334155;
}

/* ===== 编辑用户 loading overlay ===== */
.dialog-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    border-radius: 20px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.dialog-loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.dialog-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: dialog-spin 0.7s linear infinite;
}
@keyframes dialog-spin {
    to { transform: rotate(360deg); }
}
.dialog-loading-text {
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
}

.iam-trust-observable-recent {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #475569;
    font-size: 12px;
    line-height: 1.6;
}
